blob: c6223f6b0900b5de573e156bd0f5d08a6f22648b [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
Georg Brandl187c1112011-07-03 09:23:20 +0200648HAS_PYTHON
649DISABLE_ASDLGEN
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
5284DISABLE_ASDLGEN=""
5285# Extract the first word of "python", so it can be a program name with args.
5286set dummy python; ac_word=$2
5287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5288$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005289if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005290 $as_echo_n "(cached) " >&6
5291else
5292 if test -n "$HAS_PYTHON"; then
5293 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5294else
5295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5296for as_dir in $PATH
5297do
5298 IFS=$as_save_IFS
5299 test -z "$as_dir" && as_dir=.
5300 for ac_exec_ext in '' $ac_executable_extensions; do
5301 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5302 ac_cv_prog_HAS_PYTHON="found"
5303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5304 break 2
5305 fi
5306done
5307 done
5308IFS=$as_save_IFS
5309
5310 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5311fi
5312fi
5313HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5314if test -n "$HAS_PYTHON"; then
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5316$as_echo "$HAS_PYTHON" >&6; }
5317else
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5319$as_echo "no" >&6; }
5320fi
5321
5322
5323if test $HAS_HG != found -o $HAS_PYTHON != found
5324then
5325 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5326fi
5327
5328
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329case $MACHDEP in
5330bsdos*|hp*|HP*)
5331 # install -d does not work on BSDI or HP-UX
5332 if test -z "$INSTALL"
5333 then
5334 INSTALL="${srcdir}/install-sh -c"
5335 fi
5336esac
5337ac_aux_dir=
5338for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005339 if test -f "$ac_dir/install-sh"; then
5340 ac_aux_dir=$ac_dir
5341 ac_install_sh="$ac_aux_dir/install-sh -c"
5342 break
5343 elif test -f "$ac_dir/install.sh"; then
5344 ac_aux_dir=$ac_dir
5345 ac_install_sh="$ac_aux_dir/install.sh -c"
5346 break
5347 elif test -f "$ac_dir/shtool"; then
5348 ac_aux_dir=$ac_dir
5349 ac_install_sh="$ac_aux_dir/shtool install -c"
5350 break
5351 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352done
5353if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005354 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355fi
5356
5357# These three variables are undocumented and unsupported,
5358# and are intended to be withdrawn in a future Autoconf release.
5359# They can cause serious problems if a builder's source tree is in a directory
5360# whose full name contains unusual characters.
5361ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5362ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5363ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5364
5365
5366# Find a good install program. We prefer a C program (faster),
5367# so one script is as good as another. But avoid the broken or
5368# incompatible versions:
5369# SysV /etc/install, /usr/sbin/install
5370# SunOS /usr/etc/install
5371# IRIX /sbin/install
5372# AIX /bin/install
5373# AmigaOS /C/install, which installs bootblocks on floppy discs
5374# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5375# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5376# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5377# OS/2's system install, which has a completely different semantic
5378# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005379# Reject install programs that cannot install multiple files.
5380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5381$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005383if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385else
5386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5387for as_dir in $PATH
5388do
5389 IFS=$as_save_IFS
5390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 # Account for people who put trailing slashes in PATH elements.
5392case $as_dir/ in #((
5393 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396 /usr/ucb/* ) ;;
5397 *)
5398 # OSF1 and SCO ODT 3.0 have their own names for install.
5399 # Don't use installbsd from OSF since it installs stuff as root
5400 # by default.
5401 for ac_prog in ginstall scoinst install; do
5402 for ac_exec_ext in '' $ac_executable_extensions; do
5403 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5404 if test $ac_prog = install &&
5405 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5406 # AIX install. It has an incompatible calling convention.
5407 :
5408 elif test $ac_prog = install &&
5409 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5410 # program-specific install script used by HP pwplus--don't use.
5411 :
5412 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 rm -rf conftest.one conftest.two conftest.dir
5414 echo one > conftest.one
5415 echo two > conftest.two
5416 mkdir conftest.dir
5417 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5418 test -s conftest.one && test -s conftest.two &&
5419 test -s conftest.dir/conftest.one &&
5420 test -s conftest.dir/conftest.two
5421 then
5422 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5423 break 3
5424 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425 fi
5426 fi
5427 done
5428 done
5429 ;;
5430esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005431
5432 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433IFS=$as_save_IFS
5434
Matthias Kloseb9621712010-04-24 17:59:49 +00005435rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
5437fi
5438 if test "${ac_cv_path_install+set}" = set; then
5439 INSTALL=$ac_cv_path_install
5440 else
5441 # As a last resort, use the slow shell script. Don't cache a
5442 # value for INSTALL within a source directory, because that will
5443 # break other packages using the cache if that directory is
5444 # removed, or if the value is a relative name.
5445 INSTALL=$ac_install_sh
5446 fi
5447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5449$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
5451# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5452# It thinks the first close brace ends the variable substitution.
5453test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5454
5455test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5456
5457test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5458
Trent Nelsona45afca2012-08-30 14:32:02 +00005459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5460$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5461if test -z "$MKDIR_P"; then
5462 if ${ac_cv_path_mkdir+:} false; then :
5463 $as_echo_n "(cached) " >&6
5464else
5465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5466for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5467do
5468 IFS=$as_save_IFS
5469 test -z "$as_dir" && as_dir=.
5470 for ac_prog in mkdir gmkdir; do
5471 for ac_exec_ext in '' $ac_executable_extensions; do
5472 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5473 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5474 'mkdir (GNU coreutils) '* | \
5475 'mkdir (coreutils) '* | \
5476 'mkdir (fileutils) '4.1*)
5477 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5478 break 3;;
5479 esac
5480 done
5481 done
5482 done
5483IFS=$as_save_IFS
5484
5485fi
5486
5487 test -d ./--version && rmdir ./--version
5488 if test "${ac_cv_path_mkdir+set}" = set; then
5489 MKDIR_P="$ac_cv_path_mkdir -p"
5490 else
5491 # As a last resort, use the slow shell script. Don't cache a
5492 # value for MKDIR_P within a source directory, because that will
5493 # break other packages using the cache if that directory is
5494 # removed, or if the value is a relative name.
5495 MKDIR_P="$ac_install_sh -d"
5496 fi
5497fi
5498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5499$as_echo "$MKDIR_P" >&6; }
5500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501
5502# Not every filesystem supports hard links
5503
5504if test -z "$LN" ; then
5505 case $ac_sys_system in
5506 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507 *) LN=ln;;
5508 esac
5509fi
5510
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005511# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005512
5513ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005514
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5517$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518
5519# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005520if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521 withval=$with_pydebug;
5522if test "$withval" != no
5523then
5524
Matthias Kloseb9621712010-04-24 17:59:49 +00005525$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5528$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005530 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005531else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5532$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533fi
5534else
Matthias Kloseb9621712010-04-24 17:59:49 +00005535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537fi
5538
5539
5540# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5541# merged with this chunk of code?
5542
5543# Optimizer/debugger flags
5544# ------------------------
5545# (The following bit of code is complicated enough - please keep things
5546# indented properly. Just pretend you're editing Python code. ;-)
5547
5548# There are two parallel sets of case statements below, one that checks to
5549# see if OPT was set and one that does BASECFLAGS setting based upon
5550# compiler and platform. BASECFLAGS tweaks need to be made even if the
5551# user set OPT.
5552
5553# tweak OPT based on compiler and platform, only if the user didn't set
5554# it on the command line
5555
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005556if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557then
5558 case $GCC in
5559 yes)
5560 if test "$CC" != 'g++' ; then
5561 STRICT_PROTO="-Wstrict-prototypes"
5562 fi
5563 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5564 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5565 WRAP="-fwrapv"
5566 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005567
5568 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005569 case $CC in
5570 *clang*) WRAP="-fwrapv"
5571 ;;
5572 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005573
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005574 case $ac_cv_prog_cc_g in
5575 yes)
5576 if test "$Py_DEBUG" = 'true' ; then
5577 # Optimization messes up debuggers, so turn it off for
5578 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005579 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580 else
5581 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5582 fi
5583 ;;
5584 *)
5585 OPT="-O3 -Wall $STRICT_PROTO"
5586 ;;
5587 esac
5588 case $ac_sys_system in
5589 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5590 ;;
5591 esac
5592 ;;
5593
5594 *)
5595 OPT="-O"
5596 ;;
5597 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598fi
5599
5600
5601
5602# The -arch flags for universal builds on OSX
5603UNIVERSAL_ARCH_FLAGS=
5604
5605
5606# tweak BASECFLAGS based on compiler and platform
5607case $GCC in
5608yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005609 # Python doesn't violate C99 aliasing rules, but older versions of
5610 # GCC produce warnings for legal Python code. Enable
5611 # -fno-strict-aliasing on versions of GCC that support but produce
5612 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5614$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615 ac_save_cc="$CC"
5616 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005617 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005618 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005619 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005620else
Matthias Kloseb9621712010-04-24 17:59:49 +00005621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005623
Matthias Kloseb159a552010-04-25 21:00:44 +00005624
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005625int
5626main ()
5627{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005628
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005629 ;
5630 return 0;
5631}
Matthias Kloseb159a552010-04-25 21:00:44 +00005632
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005634if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005635
5636 CC="$ac_save_cc -fstrict-aliasing"
5637 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005639/* end confdefs.h. */
5640
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005641 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005642int
5643main ()
5644{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005645double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005646 ;
5647 return 0;
5648}
Matthias Kloseb159a552010-04-25 21:00:44 +00005649
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005651if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005652
5653 ac_cv_no_strict_aliasing=no
5654
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655else
Matthias Kloseb159a552010-04-25 21:00:44 +00005656
5657 ac_cv_no_strict_aliasing=yes
5658
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005659fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005661
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005662else
Matthias Kloseb159a552010-04-25 21:00:44 +00005663
5664 ac_cv_no_strict_aliasing=no
5665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005668fi
5669
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005670 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5673$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005674 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 then
5676 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5677 fi
5678
5679 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5680 # support. Without this, treatment of subnormals doesn't follow
5681 # the standard.
5682 case $ac_sys_machine in
5683 alpha*)
5684 BASECFLAGS="$BASECFLAGS -mieee"
5685 ;;
5686 esac
5687
5688 case $ac_sys_system in
5689 SCO_SV*)
5690 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5691 ;;
5692 # is there any other compiler on Darwin besides gcc?
5693 Darwin*)
5694 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5695 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005696 if test "${CC}" = gcc
5697 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5699$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005700 case "${UNIVERSALSDK}" in
5701 */MacOSX10.4u.sdk)
5702 # Build using 10.4 SDK, force usage of gcc when the
5703 # compiler is gcc, otherwise the user will get very
5704 # confusing error messages when building on OSX 10.6
5705 CC=gcc-4.0
5706 CPP=cpp-4.0
5707 ;;
5708 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5710$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005711 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
5713
5714 if test "${enable_universalsdk}"; then
5715 UNIVERSAL_ARCH_FLAGS=""
5716 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5717 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5718 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005719 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5721 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005722 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005723 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724
5725 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5726 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005727 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005728 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005730 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5731 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005732 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005733 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005734
5735 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5736 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005737 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005738 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005741 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 +00005742
5743 fi
5744
5745
Ronald Oussoren666028b2010-04-18 19:07:43 +00005746 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5747 if test "${UNIVERSALSDK}" != "/"
5748 then
5749 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5750 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005751 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 fi
5753 fi
5754
5755 # Calculate the right deployment target for this build.
5756 #
5757 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5758 if test ${cur_target} '>' 10.2; then
5759 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005760 if test ${enable_universalsdk}; then
5761 if test "${UNIVERSAL_ARCHS}" = "all"; then
5762 # Ensure that the default platform for a
5763 # 4-way universal build is OSX 10.5,
5764 # that's the first OS release where
5765 # 4-way builds make sense.
5766 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005767
5768 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5769 cur_target='10.5'
5770
5771 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5772 cur_target='10.5'
5773
5774 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5775 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005776 fi
5777 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005778 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005779 # On Intel macs default to a deployment
5780 # target of 10.4, that's the first OSX
5781 # release with Intel support.
5782 cur_target="10.4"
5783 fi
5784 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785 fi
5786 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5787
5788 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5789 # environment with a value that is the same as what we'll use
5790 # in the Makefile to ensure that we'll get the same compiler
5791 # environment during configure and build time.
5792 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5793 export MACOSX_DEPLOYMENT_TARGET
5794 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5795
5796 ;;
5797 OSF*)
5798 BASECFLAGS="$BASECFLAGS -mieee"
5799 ;;
5800 esac
5801 ;;
5802
5803*)
5804 case $ac_sys_system in
5805 OpenUNIX*|UnixWare*)
5806 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5807 ;;
5808 OSF*)
5809 BASECFLAGS="$BASECFLAGS -ieee -std"
5810 ;;
5811 SCO_SV*)
5812 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5813 ;;
5814 esac
5815 ;;
5816esac
5817
5818if test "$Py_DEBUG" = 'true'; then
5819 :
5820else
5821 OPT="-DNDEBUG $OPT"
5822fi
5823
5824if test "$ac_arch_flags"
5825then
5826 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5827fi
5828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829# Check whether GCC supports PyArg_ParseTuple format
5830if test "$GCC" = "yes"
5831then
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5833$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834 save_CFLAGS=$CFLAGS
5835 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837/* end confdefs.h. */
5838
5839 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840int
5841main ()
5842{
5843
5844 ;
5845 return 0;
5846}
Matthias Kloseb159a552010-04-25 21:00:44 +00005847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005849if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
Matthias Kloseb159a552010-04-25 21:00:44 +00005851
Matthias Kloseb9621712010-04-24 17:59:49 +00005852$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853
Matthias Kloseb159a552010-04-25 21:00:44 +00005854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005855$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857else
Matthias Kloseb159a552010-04-25 21:00:44 +00005858
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005860$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861
5862fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5864 CFLAGS=$save_CFLAGS
5865fi
5866
5867# On some compilers, pthreads are available without further options
5868# (e.g. MacOS X). On some of these systems, the compiler will not
5869# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5870# So we have to see first whether pthreads are available without
5871# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5873$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005874if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005875 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876else
Matthias Kloseb9621712010-04-24 17:59:49 +00005877 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 ac_cv_pthread_is_default=no
5879else
Matthias Kloseb9621712010-04-24 17:59:49 +00005880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881/* end confdefs.h. */
5882
5883#include <pthread.h>
5884
5885void* routine(void* p){return NULL;}
5886
5887int main(){
5888 pthread_t p;
5889 if(pthread_create(&p,NULL,routine,NULL)!=0)
5890 return 1;
5891 (void)pthread_detach(p);
5892 return 0;
5893}
5894
5895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897
5898 ac_cv_pthread_is_default=yes
5899 ac_cv_kthread=no
5900 ac_cv_pthread=no
5901
5902else
Matthias Kloseb9621712010-04-24 17:59:49 +00005903 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907fi
5908
5909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
5911
Matthias Kloseb9621712010-04-24 17:59:49 +00005912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5913$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914
5915
5916if test $ac_cv_pthread_is_default = yes
5917then
5918 ac_cv_kpthread=no
5919else
5920# -Kpthread, if available, provides the right #defines
5921# and linker options to make pthread_create available
5922# Some compilers won't report that they do not support -Kpthread,
5923# so we need to run a program to see whether it really made the
5924# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5926$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005927if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005928 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929else
5930 ac_save_cc="$CC"
5931CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005932if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ac_cv_kpthread=no
5934else
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936/* end confdefs.h. */
5937
5938#include <pthread.h>
5939
5940void* routine(void* p){return NULL;}
5941
5942int main(){
5943 pthread_t p;
5944 if(pthread_create(&p,NULL,routine,NULL)!=0)
5945 return 1;
5946 (void)pthread_detach(p);
5947 return 0;
5948}
5949
5950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005951if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ac_cv_kpthread=yes
5953else
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5957 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958fi
5959
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960CC="$ac_save_cc"
5961fi
5962
Matthias Kloseb9621712010-04-24 17:59:49 +00005963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5964$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965fi
5966
5967if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5968then
5969# -Kthread, if available, provides the right #defines
5970# and linker options to make pthread_create available
5971# Some compilers won't report that they do not support -Kthread,
5972# so we need to run a program to see whether it really made the
5973# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5975$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005976if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978else
5979 ac_save_cc="$CC"
5980CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005981if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ac_cv_kthread=no
5983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985/* end confdefs.h. */
5986
5987#include <pthread.h>
5988
5989void* routine(void* p){return NULL;}
5990
5991int main(){
5992 pthread_t p;
5993 if(pthread_create(&p,NULL,routine,NULL)!=0)
5994 return 1;
5995 (void)pthread_detach(p);
5996 return 0;
5997}
5998
5999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006000if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ac_cv_kthread=yes
6002else
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6006 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007fi
6008
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009CC="$ac_save_cc"
6010fi
6011
Matthias Kloseb9621712010-04-24 17:59:49 +00006012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6013$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014fi
6015
6016if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6017then
6018# -pthread, if available, provides the right #defines
6019# and linker options to make pthread_create available
6020# Some compilers won't report that they do not support -pthread,
6021# so we need to run a program to see whether it really made the
6022# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6024$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006025if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027else
6028 ac_save_cc="$CC"
6029CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006030if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ac_cv_pthread=no
6032else
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034/* end confdefs.h. */
6035
6036#include <pthread.h>
6037
6038void* routine(void* p){return NULL;}
6039
6040int main(){
6041 pthread_t p;
6042 if(pthread_create(&p,NULL,routine,NULL)!=0)
6043 return 1;
6044 (void)pthread_detach(p);
6045 return 0;
6046}
6047
6048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006049if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 ac_cv_pthread=yes
6051else
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056fi
6057
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058CC="$ac_save_cc"
6059fi
6060
Matthias Kloseb9621712010-04-24 17:59:49 +00006061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6062$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063fi
6064
6065# If we have set a CC compiler flag for thread support then
6066# check if it works for CXX, too.
6067ac_cv_cxx_thread=no
6068if test ! -z "$CXX"
6069then
Matthias Kloseb9621712010-04-24 17:59:49 +00006070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6071$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072ac_save_cxx="$CXX"
6073
6074if test "$ac_cv_kpthread" = "yes"
6075then
6076 CXX="$CXX -Kpthread"
6077 ac_cv_cxx_thread=yes
6078elif test "$ac_cv_kthread" = "yes"
6079then
6080 CXX="$CXX -Kthread"
6081 ac_cv_cxx_thread=yes
6082elif test "$ac_cv_pthread" = "yes"
6083then
6084 CXX="$CXX -pthread"
6085 ac_cv_cxx_thread=yes
6086fi
6087
6088if test $ac_cv_cxx_thread = yes
6089then
6090 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6091 $CXX -c conftest.$ac_ext 2>&5
6092 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6093 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6094 then
6095 ac_cv_cxx_thread=yes
6096 else
6097 ac_cv_cxx_thread=no
6098 fi
6099 rm -fr conftest*
6100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6102$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103fi
6104CXX="$ac_save_cxx"
6105
6106
6107# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6109$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006110if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112else
Matthias Kloseb9621712010-04-24 17:59:49 +00006113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114/* end confdefs.h. */
6115#include <stdlib.h>
6116#include <stdarg.h>
6117#include <string.h>
6118#include <float.h>
6119
6120int
6121main ()
6122{
6123
6124 ;
6125 return 0;
6126}
6127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006128if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129 ac_cv_header_stdc=yes
6130else
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6134
6135if test $ac_cv_header_stdc = yes; then
6136 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138/* end confdefs.h. */
6139#include <string.h>
6140
6141_ACEOF
6142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 $EGREP "memchr" >/dev/null 2>&1; then :
6144
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145else
6146 ac_cv_header_stdc=no
6147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006148rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149
6150fi
6151
6152if test $ac_cv_header_stdc = yes; then
6153 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155/* end confdefs.h. */
6156#include <stdlib.h>
6157
6158_ACEOF
6159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 $EGREP "free" >/dev/null 2>&1; then :
6161
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162else
6163 ac_cv_header_stdc=no
6164fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006165rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166
6167fi
6168
6169if test $ac_cv_header_stdc = yes; then
6170 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172 :
6173else
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175/* end confdefs.h. */
6176#include <ctype.h>
6177#include <stdlib.h>
6178#if ((' ' & 0x0FF) == 0x020)
6179# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6180# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6181#else
6182# define ISLOWER(c) \
6183 (('a' <= (c) && (c) <= 'i') \
6184 || ('j' <= (c) && (c) <= 'r') \
6185 || ('s' <= (c) && (c) <= 'z'))
6186# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6187#endif
6188
6189#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6190int
6191main ()
6192{
6193 int i;
6194 for (i = 0; i < 256; i++)
6195 if (XOR (islower (i), ISLOWER (i))
6196 || toupper (i) != TOUPPER (i))
6197 return 2;
6198 return 0;
6199}
6200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006201if ac_fn_c_try_run "$LINENO"; then :
6202
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203else
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208fi
6209
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210fi
6211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6213$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214if test $ac_cv_header_stdc = yes; then
6215
Matthias Kloseb9621712010-04-24 17:59:49 +00006216$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217
6218fi
6219
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006220for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6221fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006222ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006223shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006224unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006225sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6226sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006227sys/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 -08006228sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006229sys/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 +00006230sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006231bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006232do :
6233 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6234ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006235if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006236 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006237#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006238_ACEOF
6239
6240fi
6241
Guido van Rossum627b2d71993-12-24 10:39:16 +00006242done
6243
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006244ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006245for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006246 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6248$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006249if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006250 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006251else
Matthias Kloseb9621712010-04-24 17:59:49 +00006252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006253/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006254#include <sys/types.h>
6255#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006256
Martin v. Löwis11437992002-04-12 09:54:03 +00006257int
6258main ()
6259{
6260if ((DIR *) 0)
6261return 0;
6262 ;
6263 return 0;
6264}
6265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006267 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006268else
Matthias Kloseb9621712010-04-24 17:59:49 +00006269 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006273eval ac_res=\$$as_ac_Header
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6275$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006276if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006277 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006278#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006279_ACEOF
6280
6281ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006283
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006284done
6285# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6286if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6288$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006289if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006290 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006291else
Martin v. Löwis11437992002-04-12 09:54:03 +00006292 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006296/* Override any GCC internal prototype to avoid an error.
6297 Use char because int might match the return type of a GCC
6298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006299#ifdef __cplusplus
6300extern "C"
6301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006302char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006303int
6304main ()
6305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006306return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006307 ;
6308 return 0;
6309}
6310_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006311for ac_lib in '' dir; do
6312 if test -z "$ac_lib"; then
6313 ac_res="none required"
6314 else
6315 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006316 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006317 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006318 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006319 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006321rm -f core conftest.err conftest.$ac_objext \
6322 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006323 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006324 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006326done
Gregory P. Smith69140482012-01-16 02:05:55 -08006327if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329else
6330 ac_cv_search_opendir=no
6331fi
6332rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006333LIBS=$ac_func_search_save_LIBS
6334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6336$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006337ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006338if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006339 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006340
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006341fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006342
Michael W. Hudson54241132001-12-07 15:38:26 +00006343else
Matthias Kloseb9621712010-04-24 17:59:49 +00006344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6345$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006346if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006348else
6349 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353/* Override any GCC internal prototype to avoid an error.
6354 Use char because int might match the return type of a GCC
6355 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006356#ifdef __cplusplus
6357extern "C"
6358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006359char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006360int
6361main ()
6362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006363return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006364 ;
6365 return 0;
6366}
6367_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006368for ac_lib in '' x; do
6369 if test -z "$ac_lib"; then
6370 ac_res="none required"
6371 else
6372 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006373 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006375 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006376 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006378rm -f core conftest.err conftest.$ac_objext \
6379 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006380 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006381 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006383done
Gregory P. Smith69140482012-01-16 02:05:55 -08006384if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386else
6387 ac_cv_search_opendir=no
6388fi
6389rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006390LIBS=$ac_func_search_save_LIBS
6391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6393$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006394ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006395if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006396 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006397
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006398fi
6399
6400fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006401
Matthias Kloseb9621712010-04-24 17:59:49 +00006402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6403$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006404if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006406else
Matthias Kloseb9621712010-04-24 17:59:49 +00006407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006408/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006409#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006410int
6411main ()
6412{
6413return makedev(0, 0);
6414 ;
6415 return 0;
6416}
6417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006418if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006419 ac_cv_header_sys_types_h_makedev=yes
6420else
Matthias Kloseb9621712010-04-24 17:59:49 +00006421 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006423rm -f core conftest.err conftest.$ac_objext \
6424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006425
6426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6428$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006429
6430if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006431ac_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 -08006432if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006433
Matthias Kloseb9621712010-04-24 17:59:49 +00006434$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006435
6436fi
6437
6438
6439
6440 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006441 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 -08006442if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006445
6446fi
6447
6448
6449 fi
6450fi
6451
Michael W. Hudson54241132001-12-07 15:38:26 +00006452
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006453# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006454for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006455do :
6456 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006457#ifdef HAVE_CURSES_H
6458#include <curses.h>
6459#endif
6460
Matthias Kloseb9621712010-04-24 17:59:49 +00006461"
Gregory P. Smith69140482012-01-16 02:05:55 -08006462if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006463 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006464#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006465_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006466
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006467fi
6468
6469done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006470
6471
Martin v. Löwis11017b12006-01-14 18:12:57 +00006472# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006473for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006474do :
6475 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 +00006476#ifdef HAVE_ASM_TYPES_H
6477#include <asm/types.h>
6478#endif
6479#ifdef HAVE_SYS_SOCKET_H
6480#include <sys/socket.h>
6481#endif
6482
Matthias Kloseb9621712010-04-24 17:59:49 +00006483"
Gregory P. Smith69140482012-01-16 02:05:55 -08006484if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006485 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006486#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487_ACEOF
6488
6489fi
6490
6491done
6492
6493
Guido van Rossum627b2d71993-12-24 10:39:16 +00006494# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006495was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6497$as_echo_n "checking for clock_t in time.h... " >&6; }
6498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006499/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006501
6502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006504 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006505 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006506else
Martin v. Löwis11437992002-04-12 09:54:03 +00006507
6508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006510
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006511
Guido van Rossum627b2d71993-12-24 10:39:16 +00006512fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006513rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6516$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006517
Neal Norwitz11690112002-07-30 01:08:28 +00006518# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6520$as_echo_n "checking for makedev... " >&6; }
6521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006522/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006523
Jesus Cea740f53a2010-04-28 11:35:30 +00006524#if defined(MAJOR_IN_MKDEV)
6525#include <sys/mkdev.h>
6526#elif defined(MAJOR_IN_SYSMACROS)
6527#include <sys/sysmacros.h>
6528#else
6529#include <sys/types.h>
6530#endif
6531
Neal Norwitz11690112002-07-30 01:08:28 +00006532int
6533main ()
6534{
Jesus Cea740f53a2010-04-28 11:35:30 +00006535
6536 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006537 ;
6538 return 0;
6539}
Matthias Kloseb159a552010-04-25 21:00:44 +00006540
Neal Norwitz11690112002-07-30 01:08:28 +00006541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006542if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006543 ac_cv_has_makedev=yes
6544else
Matthias Kloseb9621712010-04-24 17:59:49 +00006545 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006547rm -f core conftest.err conftest.$ac_objext \
6548 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006549if test "$ac_cv_has_makedev" = "no"; then
6550 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006552/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006553
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006554#define _OSF_SOURCE 1
6555#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006556
Neal Norwitz11690112002-07-30 01:08:28 +00006557int
6558main ()
6559{
6560 makedev(0, 0)
6561 ;
6562 return 0;
6563}
6564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006565if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006566 ac_cv_has_makedev=yes
6567else
Matthias Kloseb9621712010-04-24 17:59:49 +00006568 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006570rm -f core conftest.err conftest.$ac_objext \
6571 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006572 if test "$ac_cv_has_makedev" = "yes"; then
6573
Matthias Kloseb9621712010-04-24 17:59:49 +00006574$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006575
6576 fi
6577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6579$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006580if test "$ac_cv_has_makedev" = "yes"; then
6581
Matthias Kloseb9621712010-04-24 17:59:49 +00006582$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006583
6584fi
6585
Martin v. Löwis399a6892002-10-04 10:22:02 +00006586# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6587# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6588# defined, but the compiler does not support pragma redefine_extname,
6589# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6590# structures (such as rlimit64) without declaring them. As a
6591# work-around, disable LFS on such configurations
6592
6593use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6595$as_echo_n "checking Solaris LFS bug... " >&6; }
6596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006597/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006598
6599#define _LARGEFILE_SOURCE 1
6600#define _FILE_OFFSET_BITS 64
6601#include <sys/resource.h>
6602
Martin v. Löwis399a6892002-10-04 10:22:02 +00006603int
6604main ()
6605{
6606struct rlimit foo;
6607 ;
6608 return 0;
6609}
6610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006612 sol_lfs_bug=no
6613else
Matthias Kloseb9621712010-04-24 17:59:49 +00006614 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6618$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006619if test "$sol_lfs_bug" = "yes"; then
6620 use_lfs=no
6621fi
6622
6623if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006624# Two defines needed to enable largefile support on various platforms
6625# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006626case $ac_sys_system/$ac_sys_release in
6627AIX*)
6628
6629$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6630
6631 ;;
6632esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006633
Matthias Kloseb9621712010-04-24 17:59:49 +00006634$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006635
6636
Matthias Kloseb9621712010-04-24 17:59:49 +00006637$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006638
Martin v. Löwis399a6892002-10-04 10:22:02 +00006639fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006640
Guido van Rossum84e7b241996-08-19 21:59:00 +00006641# Add some code to confdefs.h so that the test for off_t works on SCO
6642cat >> confdefs.h <<\EOF
6643#if defined(SCO_DS)
6644#undef _OFF_T
6645#endif
6646EOF
6647
Guido van Rossumef2255b2000-03-10 22:30:29 +00006648# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006649ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006650if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006651
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006652else
Martin v. Löwis11437992002-04-12 09:54:03 +00006653
6654cat >>confdefs.h <<_ACEOF
6655#define mode_t int
6656_ACEOF
6657
6658fi
6659
Matthias Kloseb9621712010-04-24 17:59:49 +00006660ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006661if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006662
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006663else
Martin v. Löwis11437992002-04-12 09:54:03 +00006664
6665cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006666#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006667_ACEOF
6668
6669fi
6670
Matthias Kloseb9621712010-04-24 17:59:49 +00006671ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006672if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006673
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006674else
Martin v. Löwis11437992002-04-12 09:54:03 +00006675
6676cat >>confdefs.h <<_ACEOF
6677#define pid_t int
6678_ACEOF
6679
6680fi
6681
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006682
Martin v. Löwis11437992002-04-12 09:54:03 +00006683cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006684#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006685_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006686
Matthias Kloseb9621712010-04-24 17:59:49 +00006687ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006688if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006689
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006690else
Martin v. Löwis11437992002-04-12 09:54:03 +00006691
6692cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006693#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006694_ACEOF
6695
6696fi
6697
Matthias Kloseb9621712010-04-24 17:59:49 +00006698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6699$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006700if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006702else
Matthias Kloseb9621712010-04-24 17:59:49 +00006703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006704/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006705#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006706
6707_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006709 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710 ac_cv_type_uid_t=yes
6711else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006712 ac_cv_type_uid_t=no
6713fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006714rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006715
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6718$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006719if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006720
Matthias Kloseb9621712010-04-24 17:59:49 +00006721$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006722
6723
Matthias Kloseb9621712010-04-24 17:59:49 +00006724$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006725
6726fi
6727
Matthias Kloseb9621712010-04-24 17:59:49 +00006728ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6729case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006730 no|yes) ;; #(
6731 *)
6732
Matthias Kloseb9621712010-04-24 17:59:49 +00006733$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006734
6735
6736cat >>confdefs.h <<_ACEOF
6737#define uint32_t $ac_cv_c_uint32_t
6738_ACEOF
6739;;
6740 esac
6741
Matthias Kloseb9621712010-04-24 17:59:49 +00006742ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6743case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006744 no|yes) ;; #(
6745 *)
6746
Matthias Kloseb9621712010-04-24 17:59:49 +00006747$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006748
6749
6750cat >>confdefs.h <<_ACEOF
6751#define uint64_t $ac_cv_c_uint64_t
6752_ACEOF
6753;;
6754 esac
6755
Matthias Kloseb9621712010-04-24 17:59:49 +00006756ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6757case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006758 no|yes) ;; #(
6759 *)
6760
6761cat >>confdefs.h <<_ACEOF
6762#define int32_t $ac_cv_c_int32_t
6763_ACEOF
6764;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006765esac
6766
Matthias Kloseb9621712010-04-24 17:59:49 +00006767ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6768case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006769 no|yes) ;; #(
6770 *)
6771
6772cat >>confdefs.h <<_ACEOF
6773#define int64_t $ac_cv_c_int64_t
6774_ACEOF
6775;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006776esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006777
Matthias Kloseb9621712010-04-24 17:59:49 +00006778ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006779if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006780
Matthias Kloseb9621712010-04-24 17:59:49 +00006781$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006782
6783fi
6784
Jack Jansendd19cf82001-12-06 22:36:17 +00006785
Michael W. Hudson54241132001-12-07 15:38:26 +00006786# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006787# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006788# The cast to long int works around a bug in the HP C Compiler
6789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6791# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6793$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006794if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006796else
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 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 +00006798
Martin v. Löwis11437992002-04-12 09:54:03 +00006799else
Matthias Kloseb9621712010-04-24 17:59:49 +00006800 if test "$ac_cv_type_int" = yes; then
6801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006803as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006804See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006805 else
6806 ac_cv_sizeof_int=0
6807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6812$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006813
6814
6815
Martin v. Löwis11437992002-04-12 09:54:03 +00006816cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006817#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006818_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006819
6820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006821# The cast to long int works around a bug in the HP C Compiler
6822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6826$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006827if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006829else
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 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 +00006831
Martin v. Löwis11437992002-04-12 09:54:03 +00006832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 if test "$ac_cv_type_long" = yes; then
6834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006836as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006837See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006838 else
6839 ac_cv_sizeof_long=0
6840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6845$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006846
6847
6848
Martin v. Löwis11437992002-04-12 09:54:03 +00006849cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006850#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006851_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006852
6853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854# The cast to long int works around a bug in the HP C Compiler
6855# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6856# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6857# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6859$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006860if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006862else
Matthias Kloseb9621712010-04-24 17:59:49 +00006863 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 +00006864
Martin v. Löwis11437992002-04-12 09:54:03 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 if test "$ac_cv_type_void_p" = yes; then
6867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006869as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006870See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006871 else
6872 ac_cv_sizeof_void_p=0
6873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6878$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879
6880
6881
Martin v. Löwis11437992002-04-12 09:54:03 +00006882cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006883#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006884_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006885
6886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887# The cast to long int works around a bug in the HP C Compiler
6888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6890# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6892$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006893if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006895else
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 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 +00006897
Martin v. Löwis11437992002-04-12 09:54:03 +00006898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 if test "$ac_cv_type_short" = yes; then
6900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006902as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006903See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006904 else
6905 ac_cv_sizeof_short=0
6906 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006908
Martin v. Löwis11437992002-04-12 09:54:03 +00006909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6911$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912
6913
6914
Martin v. Löwis11437992002-04-12 09:54:03 +00006915cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006916#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006917_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006918
6919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920# The cast to long int works around a bug in the HP C Compiler
6921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6923# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6925$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006926if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006928else
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 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 +00006930
Martin v. Löwis11437992002-04-12 09:54:03 +00006931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 if test "$ac_cv_type_float" = yes; then
6933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006935as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08006936See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937 else
6938 ac_cv_sizeof_float=0
6939 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006941
Martin v. Löwis11437992002-04-12 09:54:03 +00006942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6944$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006945
6946
6947
Martin v. Löwis11437992002-04-12 09:54:03 +00006948cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006949#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006950_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006951
6952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006953# The cast to long int works around a bug in the HP C Compiler
6954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6956# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6958$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006959if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 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 +00006963
Martin v. Löwis11437992002-04-12 09:54:03 +00006964else
Matthias Kloseb9621712010-04-24 17:59:49 +00006965 if test "$ac_cv_type_double" = yes; then
6966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006968as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08006969See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970 else
6971 ac_cv_sizeof_double=0
6972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974
Martin v. Löwis11437992002-04-12 09:54:03 +00006975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6977$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978
6979
6980
Martin v. Löwis11437992002-04-12 09:54:03 +00006981cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006982#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006983_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006984
6985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006986# The cast to long int works around a bug in the HP C Compiler
6987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6989# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6991$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006992if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006993 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006994else
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 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 +00006996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997else
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 if test "$ac_cv_type_fpos_t" = yes; then
6999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007001as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007002See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007003 else
7004 ac_cv_sizeof_fpos_t=0
7005 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007007
Martin v. Löwis11437992002-04-12 09:54:03 +00007008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7010$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011
7012
7013
Martin v. Löwis11437992002-04-12 09:54:03 +00007014cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007015#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007016_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007017
Michael W. Hudson54241132001-12-07 15:38:26 +00007018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019# The cast to long int works around a bug in the HP C Compiler
7020# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7021# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7022# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7024$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007025if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007026 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007027else
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 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 +00007029
Martin v. Löwis18e16552006-02-15 17:27:45 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 if test "$ac_cv_type_size_t" = yes; then
7032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007034as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007035See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007036 else
7037 ac_cv_sizeof_size_t=0
7038 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007040
Martin v. Löwis18e16552006-02-15 17:27:45 +00007041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7043$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044
7045
7046
Martin v. Löwis18e16552006-02-15 17:27:45 +00007047cat >>confdefs.h <<_ACEOF
7048#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7049_ACEOF
7050
7051
Christian Heimes400adb02008-02-01 08:12:03 +00007052# The cast to long int works around a bug in the HP C Compiler
7053# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7054# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7055# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7057$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007058if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007059 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007060else
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 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 +00007062
Christian Heimes400adb02008-02-01 08:12:03 +00007063else
Matthias Kloseb9621712010-04-24 17:59:49 +00007064 if test "$ac_cv_type_pid_t" = yes; then
7065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007067as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007068See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007069 else
7070 ac_cv_sizeof_pid_t=0
7071 fi
7072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007073
Christian Heimes400adb02008-02-01 08:12:03 +00007074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7076$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007077
7078
7079
7080cat >>confdefs.h <<_ACEOF
7081#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7082_ACEOF
7083
7084
Michael W. Hudson54241132001-12-07 15:38:26 +00007085
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7087$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007088have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007090/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007091
Martin v. Löwis11437992002-04-12 09:54:03 +00007092int
7093main ()
7094{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007095long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007096 ;
7097 return 0;
7098}
7099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007101
7102
Matthias Kloseb9621712010-04-24 17:59:49 +00007103$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007104
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007105 have_long_long=yes
7106
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7110$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007111if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112# The cast to long int works around a bug in the HP C Compiler
7113# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7114# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7115# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7117$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007118if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007120else
Matthias Kloseb9621712010-04-24 17:59:49 +00007121 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 +00007122
Martin v. Löwis11437992002-04-12 09:54:03 +00007123else
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 if test "$ac_cv_type_long_long" = yes; then
7125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007127as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007128See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007129 else
7130 ac_cv_sizeof_long_long=0
7131 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007133
Martin v. Löwis11437992002-04-12 09:54:03 +00007134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7136$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007137
7138
7139
Martin v. Löwis11437992002-04-12 09:54:03 +00007140cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007141#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007142_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007143
Michael W. Hudson54241132001-12-07 15:38:26 +00007144
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007145fi
7146
Matthias Kloseb9621712010-04-24 17:59:49 +00007147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7148$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007149have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007151/* end confdefs.h. */
7152
7153int
7154main ()
7155{
7156long double x; x = (long double)0;
7157 ;
7158 return 0;
7159}
7160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007161if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007162
7163
Matthias Kloseb9621712010-04-24 17:59:49 +00007164$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007165
7166 have_long_double=yes
7167
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007168fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7171$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007172if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007173# The cast to long int works around a bug in the HP C Compiler
7174# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7175# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7176# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7178$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007179if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007180 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007181else
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 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 +00007183
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007184else
Matthias Kloseb9621712010-04-24 17:59:49 +00007185 if test "$ac_cv_type_long_double" = yes; then
7186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007188as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007189See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007190 else
7191 ac_cv_sizeof_long_double=0
7192 fi
7193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007194
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7197$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007198
7199
7200
7201cat >>confdefs.h <<_ACEOF
7202#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7203_ACEOF
7204
7205
7206fi
7207
7208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7210$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007211have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007213/* end confdefs.h. */
7214
7215int
7216main ()
7217{
7218_Bool x; x = (_Bool)0;
7219 ;
7220 return 0;
7221}
7222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007223if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007224
7225
Matthias Kloseb9621712010-04-24 17:59:49 +00007226$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007227
7228 have_c99_bool=yes
7229
Thomas Woutersb2137042007-02-01 18:02:27 +00007230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7233$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007234if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007235# The cast to long int works around a bug in the HP C Compiler
7236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7238# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7240$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007241if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007242 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007243else
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 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 +00007245
Thomas Woutersb2137042007-02-01 18:02:27 +00007246else
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 if test "$ac_cv_type__Bool" = yes; then
7248 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007250as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007251See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007252 else
7253 ac_cv_sizeof__Bool=0
7254 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256
Thomas Woutersb2137042007-02-01 18:02:27 +00007257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7259$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007260
7261
7262
Thomas Woutersb2137042007-02-01 18:02:27 +00007263cat >>confdefs.h <<_ACEOF
7264#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7265_ACEOF
7266
7267
7268fi
7269
Matthias Kloseb9621712010-04-24 17:59:49 +00007270ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007271 #include <stdint.h>
7272 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007273 #ifdef HAVE_INTTYPES_H
7274 #include <inttypes.h>
7275 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007276"
Gregory P. Smith69140482012-01-16 02:05:55 -08007277if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007278
7279cat >>confdefs.h <<_ACEOF
7280#define HAVE_UINTPTR_T 1
7281_ACEOF
7282
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007283# The cast to long int works around a bug in the HP C Compiler
7284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7286# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7288$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007289if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007290 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007291else
Matthias Kloseb9621712010-04-24 17:59:49 +00007292 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 +00007293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294else
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 if test "$ac_cv_type_uintptr_t" = yes; then
7296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007298as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007299See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007300 else
7301 ac_cv_sizeof_uintptr_t=0
7302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007304
Martin v. Löwis11437992002-04-12 09:54:03 +00007305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7307$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007308
7309
7310
Martin v. Löwis11437992002-04-12 09:54:03 +00007311cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007312#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007313_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007314
Michael W. Hudson54241132001-12-07 15:38:26 +00007315
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007316fi
7317
Thomas Wouters89f507f2006-12-13 04:49:30 +00007318
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007319# The cast to long int works around a bug in the HP C Compiler
7320# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7321# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7322# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7324$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007325if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007326 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007329#ifdef HAVE_SYS_TYPES_H
7330#include <sys/types.h>
7331#endif
7332
Matthias Kloseb9621712010-04-24 17:59:49 +00007333"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007334
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007335else
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 if test "$ac_cv_type_off_t" = yes; then
7337 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007339as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007340See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007341 else
7342 ac_cv_sizeof_off_t=0
7343 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007345
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7348$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007349
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007350
7351
Martin v. Löwis11437992002-04-12 09:54:03 +00007352cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007353#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007354_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007355
Michael W. Hudson54241132001-12-07 15:38:26 +00007356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007357
Matthias Kloseb9621712010-04-24 17:59:49 +00007358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7359$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007360if test "$have_long_long" = yes
7361then
7362if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007363 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007364
Matthias Kloseb9621712010-04-24 17:59:49 +00007365$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007366
Matthias Kloseb9621712010-04-24 17:59:49 +00007367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7368$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007369else
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7371$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007372fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007373else
Matthias Kloseb9621712010-04-24 17:59:49 +00007374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007376fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007377
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007378# The cast to long int works around a bug in the HP C Compiler
7379# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7380# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7381# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7383$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007384if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007385 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007386else
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007388#ifdef HAVE_SYS_TYPES_H
7389#include <sys/types.h>
7390#endif
7391#ifdef HAVE_TIME_H
7392#include <time.h>
7393#endif
7394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007396
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007397else
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 if test "$ac_cv_type_time_t" = yes; then
7399 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007401as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007402See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007403 else
7404 ac_cv_sizeof_time_t=0
7405 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007407
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7410$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007411
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007412
7413
Martin v. Löwis11437992002-04-12 09:54:03 +00007414cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007415#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007416_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007417
Michael W. Hudson54241132001-12-07 15:38:26 +00007418
7419
Trent Mick635f6fb2000-08-23 21:33:05 +00007420# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007421ac_save_cc="$CC"
7422if test "$ac_cv_kpthread" = "yes"
7423then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007424elif test "$ac_cv_kthread" = "yes"
7425then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007426elif test "$ac_cv_pthread" = "yes"
7427then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007428fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007429
Matthias Kloseb9621712010-04-24 17:59:49 +00007430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7431$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007432have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007434/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007435
7436 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007437int
7438main ()
7439{
Guido van Rossum12580492000-09-24 16:47:19 +00007440pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007441 ;
7442 return 0;
7443}
Matthias Kloseb159a552010-04-25 21:00:44 +00007444
Martin v. Löwis11437992002-04-12 09:54:03 +00007445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007446if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007447 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7451$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007452if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7456# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7458$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007459if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007461else
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007463#ifdef HAVE_PTHREAD_H
7464#include <pthread.h>
7465#endif
7466
Matthias Kloseb9621712010-04-24 17:59:49 +00007467"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007468
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007469else
Matthias Kloseb9621712010-04-24 17:59:49 +00007470 if test "$ac_cv_type_pthread_t" = yes; then
7471 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7472$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007473as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007474See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007475 else
7476 ac_cv_sizeof_pthread_t=0
7477 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007479
Trent Mick635f6fb2000-08-23 21:33:05 +00007480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7482$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007483
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007484
7485
Martin v. Löwis11437992002-04-12 09:54:03 +00007486cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007487#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007488_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007490
Trent Mick635f6fb2000-08-23 21:33:05 +00007491fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007492CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007493
Michael W. Hudson54241132001-12-07 15:38:26 +00007494
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007495case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007496 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007497 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7498 ;;
7499 Darwin/*)
7500 OTHER_LIBTOOL_OPT=""
7501 ;;
7502esac
7503
7504
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007505ARCH_RUN_32BIT=""
7506
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007507case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007508 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007509 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7510 if test "${enable_universalsdk}"; then
7511 :
7512 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007513 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007514 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007515 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007516 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007517 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007518 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007519 if test ${gcc_version} '<' 4.0
7520 then
7521 LIBTOOL_CRUFT="-lcc_dynamic"
7522 else
7523 LIBTOOL_CRUFT=""
7524 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007526 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007527else
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007529/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007530
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007531 #include <unistd.h>
7532 int main(int argc, char*argv[])
7533 {
7534 if (sizeof(long) == 4) {
7535 return 0;
7536 } else {
7537 return 1;
7538 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007539 }
7540
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007542if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007543 ac_osx_32bit=yes
7544else
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007549fi
7550
7551
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007552 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007553 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007554 i386)
7555 MACOSX_DEFAULT_ARCH="i386"
7556 ;;
7557 ppc)
7558 MACOSX_DEFAULT_ARCH="ppc"
7559 ;;
7560 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007561 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007562 ;;
7563 esac
7564 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007565 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007566 i386)
7567 MACOSX_DEFAULT_ARCH="x86_64"
7568 ;;
7569 ppc)
7570 MACOSX_DEFAULT_ARCH="ppc64"
7571 ;;
7572 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007573 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007574 ;;
7575 esac
7576
7577 #ARCH_RUN_32BIT="true"
7578 fi
7579
7580 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007581 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007582 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007583esac
7584
Matthias Kloseb9621712010-04-24 17:59:49 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7586$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007587if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007588then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007589 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007591 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007594
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7596$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007597 if test $enable_shared = "yes"
7598 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007599 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 +00007600 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007601else
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7603$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007604fi
7605
Matthias Kloseb9621712010-04-24 17:59:49 +00007606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7607$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007608case $ac_sys_system/$ac_sys_release in
7609 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007610
Matthias Kloseb9621712010-04-24 17:59:49 +00007611$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007612
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7614$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007615 ;;
7616 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7618$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007619 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007620esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007621
Guido van Rossum0a516c91994-09-12 10:58:40 +00007622# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007623
Michael W. Hudson54241132001-12-07 15:38:26 +00007624
7625
7626
7627
Benjamin Peterson99f03762010-04-11 22:15:28 +00007628
Thomas Wouters477c8d52006-05-27 19:21:47 +00007629
Georg Brandlb1441c72009-01-03 22:33:39 +00007630
Thomas Wouters477c8d52006-05-27 19:21:47 +00007631cat >>confdefs.h <<_ACEOF
7632#define SHLIB_EXT "$SO"
7633_ACEOF
7634
Guido van Rossum0a516c91994-09-12 10:58:40 +00007635# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007636# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007637# (Shared libraries in this instance are shared modules to be loaded into
7638# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7640$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007641if test -z "$LDSHARED"
7642then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007643 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007644 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007645 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007646 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007647 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007648 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007649 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007651 if test "$GCC" = "yes" ; then
7652 LDSHARED='$(CC) -shared'
7653 LDCXXSHARED='$(CXX) -shared'
7654 else
7655 LDSHARED='$(CC) -G'
7656 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007657 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007658 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007659 if test "$GCC" = "yes" ; then
7660 LDSHARED='$(CC) -shared'
7661 LDCXXSHARED='$(CXX) -shared'
7662 else
7663 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007664 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007665 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007666 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007667 LDSHARED='$(CC) -bundle'
7668 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007669 if test "$enable_framework" ; then
7670 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007671 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7672 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007673 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007674 else
7675 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007676 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007677 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007678 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007679 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007680 LDSHARED='$(CC) -bundle'
7681 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007682 if test "$enable_framework" ; then
7683 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007684 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7685 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007686 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007687 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007688 # No framework, use the Python app as bundle-loader
7689 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007690 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007691 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007692 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007693 Darwin/*)
7694 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7695 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007696
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007697 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007698 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007699 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007700 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007701 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007702 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7703 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007704 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007705 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007706 LDSHARED='$(CC) -bundle'
7707 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007708 if test "$enable_framework" ; then
7709 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007710 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7711 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007712 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007713 else
7714 # No framework, use the Python app as bundle-loader
7715 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7716 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007717 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007718 fi
7719 fi
7720 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007721 Linux*|GNU*|QNX*)
7722 LDSHARED='$(CC) -shared'
7723 LDCXXSHARED='$(CXX) -shared';;
7724 BSD/OS*/4*)
7725 LDSHARED="gcc -shared"
7726 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007727 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007728 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007729 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007730 LDSHARED='$(CC) -shared'
7731 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007732 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007733 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007734 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007735 OpenBSD*)
7736 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7737 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007738 LDSHARED='$(CC) -shared $(CCSHARED)'
7739 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007740 else
7741 case `uname -r` in
7742 [01].* | 2.[0-7] | 2.[0-7].*)
7743 LDSHARED="ld -Bshareable ${LDFLAGS}"
7744 ;;
7745 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007746 LDSHARED='$(CC) -shared $(CCSHARED)'
7747 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007748 ;;
7749 esac
7750 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007751 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007752 LDSHARED='$(CC) -shared'
7753 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007754 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007755 if test "$GCC" = "yes" ; then
7756 LDSHARED='$(CC) -shared'
7757 LDCXXSHARED='$(CXX) -shared'
7758 else
7759 LDSHARED='$(CC) -G'
7760 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007761 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007762 SCO_SV*)
7763 LDSHARED='$(CC) -Wl,-G,-Bexport'
7764 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7765 CYGWIN*)
7766 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7767 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007768 *) LDSHARED="ld";;
7769 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7772$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007773LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007774BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007775# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007776# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7778$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007779if test -z "$CCSHARED"
7780then
Guido van Rossum07397971997-04-29 21:49:50 +00007781 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007782 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007783 then CCSHARED="-fPIC";
7784 elif test `uname -p` = sparc;
7785 then CCSHARED="-xcode=pic32";
7786 else CCSHARED="-Kpic";
7787 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007788 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007789 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007790 else CCSHARED="+z";
7791 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007792 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007793 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007794 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007795 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007796 if test "$GCC" = "yes"
7797 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007798 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007799 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007800 SCO_SV*)
7801 if test "$GCC" = "yes"
7802 then CCSHARED="-fPIC"
7803 else CCSHARED="-Kpic -belf"
7804 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007805 IRIX*/6*) case $CC in
7806 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007807 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007808 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007809 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7812$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007813# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007814# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7816$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007817if test -z "$LINKFORSHARED"
7818then
Guido van Rossum07397971997-04-29 21:49:50 +00007819 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007820 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007821 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007822 LINKFORSHARED="-Wl,-E -Wl,+s";;
7823# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007824 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007825 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007826 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007828 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007829 if test "$enable_framework"
7830 then
Jack Jansenda49e192005-01-07 13:08:22 +00007831 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007832 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007833 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007834 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007835 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007836 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007837 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007838 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7839 then
7840 LINKFORSHARED="-Wl,--export-dynamic"
7841 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007842 SunOS/5*) case $CC in
7843 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007844 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007845 then
7846 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007847 fi;;
7848 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007849 CYGWIN*)
7850 if test $enable_shared = "no"
7851 then
7852 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7853 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007854 QNX*)
7855 # -Wl,-E causes the symbols to be added to the dynamic
7856 # symbol table so that they can be found when a module
7857 # is loaded. -N 2048K causes the stack size to be set
7858 # to 2048 kilobytes so that the stack doesn't overflow
7859 # when running test_compile.py.
7860 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007861 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7864$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007865
Michael W. Hudson54241132001-12-07 15:38:26 +00007866
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007867
Matthias Kloseb9621712010-04-24 17:59:49 +00007868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7869$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007870if test ! "$LIBRARY" = "$LDLIBRARY"
7871then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007872 case $ac_sys_system in
7873 CYGWIN*)
7874 # Cygwin needs CCSHARED when building extension DLLs
7875 # but not when building the interpreter DLL.
7876 CFLAGSFORSHARED='';;
7877 *)
7878 CFLAGSFORSHARED='$(CCSHARED)'
7879 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7882$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007883
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007884# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7885# library (with --enable-shared).
7886# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007887# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7888# if it is not required, since it creates a dependency of the shared library
7889# to LIBS. This, in turn, means that applications linking the shared libpython
7890# don't need to link LIBS explicitly. The default should be only changed
7891# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007892
Matthias Kloseb9621712010-04-24 17:59:49 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7894$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007895case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007896 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007897 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007898esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7900$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007901
7902
Guido van Rossum627b2d71993-12-24 10:39:16 +00007903# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7905$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007906if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007907 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007908else
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007910LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914/* Override any GCC internal prototype to avoid an error.
7915 Use char because int might match the return type of a GCC
7916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007917#ifdef __cplusplus
7918extern "C"
7919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007920char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007921int
7922main ()
7923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 ;
7926 return 0;
7927}
7928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007929if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007931else
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934rm -f core conftest.err conftest.$ac_objext \
7935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007936LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7939$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007940if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 cat >>confdefs.h <<_ACEOF
7942#define HAVE_LIBDL 1
7943_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007944
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007945 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007946
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007947fi
7948 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7950$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007951if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007953else
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007955LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959/* Override any GCC internal prototype to avoid an error.
7960 Use char because int might match the return type of a GCC
7961 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962#ifdef __cplusplus
7963extern "C"
7964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007965char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007966int
7967main ()
7968{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 ;
7971 return 0;
7972}
7973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007974if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007976else
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979rm -f core conftest.err conftest.$ac_objext \
7980 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007981LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7984$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007985if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 cat >>confdefs.h <<_ACEOF
7987#define HAVE_LIBDLD 1
7988_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007989
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007990 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007992fi
7993 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007994
Georg Brandlb1441c72009-01-03 22:33:39 +00007995# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007996if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7998$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007999if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008001else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008002 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006/* Override any GCC internal prototype to avoid an error.
8007 Use char because int might match the return type of a GCC
8008 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008009#ifdef __cplusplus
8010extern "C"
8011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008012char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008013int
8014main ()
8015{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 ;
8018 return 0;
8019}
8020_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021for ac_lib in '' pthread rt posix4; do
8022 if test -z "$ac_lib"; then
8023 ac_res="none required"
8024 else
8025 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008026 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031rm -f core conftest.err conftest.$ac_objext \
8032 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008033 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036done
Gregory P. Smith69140482012-01-16 02:05:55 -08008037if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039else
8040 ac_cv_search_sem_init=no
8041fi
8042rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008043LIBS=$ac_func_search_save_LIBS
8044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8046$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008048if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008050
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008051fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008052 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008053 # posix4 on Solaris 2.6
8054 # pthread (first!) on Linux
8055fi
8056
Martin v. Löwis19d17342003-06-14 21:03:05 +00008057# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8059$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008060if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008062else
8063 ac_check_lib_save_LIBS=$LIBS
8064LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008066/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068/* Override any GCC internal prototype to avoid an error.
8069 Use char because int might match the return type of a GCC
8070 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008071#ifdef __cplusplus
8072extern "C"
8073#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008074char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008075int
8076main ()
8077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008079 ;
8080 return 0;
8081}
8082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008084 ac_cv_lib_intl_textdomain=yes
8085else
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088rm -f core conftest.err conftest.$ac_objext \
8089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008090LIBS=$ac_check_lib_save_LIBS
8091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8093$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008094if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008095
Matthias Kloseb9621712010-04-24 17:59:49 +00008096$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008097
Brett Cannonc6d936e2009-06-07 20:09:53 +00008098 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008099fi
8100
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008101
8102# checks for system dependent C++ extensions support
8103case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8105$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008107/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008108
Georg Brandl59e87bd2011-02-15 19:48:59 +00008109 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110int
8111main ()
8112{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008113loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ;
8115 return 0;
8116}
Matthias Kloseb159a552010-04-25 21:00:44 +00008117
Martin v. Löwis11437992002-04-12 09:54:03 +00008118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008119if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008120
Matthias Kloseb159a552010-04-25 21:00:44 +00008121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Matthias Kloseb159a552010-04-25 21:00:44 +00008124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008125$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008126
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008127else
Matthias Kloseb159a552010-04-25 21:00:44 +00008128
8129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008130$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008131
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008133rm -f core conftest.err conftest.$ac_objext \
8134 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008135 *) ;;
8136esac
8137
Guido van Rossum70c7f481998-03-26 18:44:10 +00008138# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8140$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008141if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008143else
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008145LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149/* Override any GCC internal prototype to avoid an error.
8150 Use char because int might match the return type of a GCC
8151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008152#ifdef __cplusplus
8153extern "C"
8154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008155char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008156int
8157main ()
8158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ;
8161 return 0;
8162}
8163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008164if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008165 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008166else
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008169rm -f core conftest.err conftest.$ac_objext \
8170 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008171LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8174$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008175if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008176 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008177fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008178 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8180$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008181if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008182 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008183else
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008185LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189/* Override any GCC internal prototype to avoid an error.
8190 Use char because int might match the return type of a GCC
8191 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008192#ifdef __cplusplus
8193extern "C"
8194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008195char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
8198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 ;
8201 return 0;
8202}
8203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008204if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008206else
Matthias Kloseb9621712010-04-24 17:59:49 +00008207 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008209rm -f core conftest.err conftest.$ac_objext \
8210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008211LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8214$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008215if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008216 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008217fi
8218 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8221$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008224if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8227$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008228LIBS="$withval $LIBS"
8229
8230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8232$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233fi
8234
Guido van Rossum7f43da71994-08-01 12:15:30 +00008235
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008236if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008237 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8238set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8240$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008241if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008243else
8244 case $PKG_CONFIG in
8245 [\\/]* | ?:[\\/]*)
8246 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8247 ;;
8248 *)
8249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8250for as_dir in $PATH
8251do
8252 IFS=$as_save_IFS
8253 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008254 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008255 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8256 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008258 break 2
8259 fi
8260done
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008262IFS=$as_save_IFS
8263
8264 ;;
8265esac
8266fi
8267PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8268if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8270$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008271else
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8273$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008274fi
8275
8276
8277fi
8278if test -z "$ac_cv_path_PKG_CONFIG"; then
8279 ac_pt_PKG_CONFIG=$PKG_CONFIG
8280 # Extract the first word of "pkg-config", so it can be a program name with args.
8281set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8283$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008284if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008286else
8287 case $ac_pt_PKG_CONFIG in
8288 [\\/]* | ?:[\\/]*)
8289 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8290 ;;
8291 *)
8292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293for as_dir in $PATH
8294do
8295 IFS=$as_save_IFS
8296 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008298 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8299 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008301 break 2
8302 fi
8303done
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008305IFS=$as_save_IFS
8306
8307 ;;
8308esac
8309fi
8310ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8311if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8313$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8316$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008317fi
8318
8319 if test "x$ac_pt_PKG_CONFIG" = x; then
8320 PKG_CONFIG=""
8321 else
8322 case $cross_compiling:$ac_tool_warned in
8323yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008326ac_tool_warned=yes ;;
8327esac
8328 PKG_CONFIG=$ac_pt_PKG_CONFIG
8329 fi
8330else
8331 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8332fi
8333
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008334
8335# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8337$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008338
8339# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008340if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008341 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008342else
8343 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008344fi
8345
8346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8348$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008349
8350# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8352$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008353
8354# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008355if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008356 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008357else
8358 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008359fi
8360
8361
8362if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008363 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8364else
8365 LIBFFI_INCLUDEDIR=""
8366fi
8367
8368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8370$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008371
Benjamin Peterson076ed002010-10-31 17:11:02 +00008372# Check for support for loadable sqlite extensions
8373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8374$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8375# Check whether --enable-loadable-sqlite-extensions was given.
8376if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8377 enableval=$enable_loadable_sqlite_extensions;
8378else
8379 enable_loadable_sqlite_extensions="no"
8380fi
8381
8382
8383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8384$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8385
Matthias Klose55708cc2009-04-30 08:06:49 +00008386# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8388$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008389
8390# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008391if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008392 withval=$with_dbmliborder;
8393if test x$with_dbmliborder = xyes
8394then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008395as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008396else
8397 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8398 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8399 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008400 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008401 fi
8402 done
8403fi
8404fi
8405
Matthias Kloseb9621712010-04-24 17:59:49 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8407$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008408
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008409# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008410
8411
Matthias Kloseb9621712010-04-24 17:59:49 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8413$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008416if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 withval=$with_signal_module;
8418fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008419
8420
8421if test -z "$with_signal_module"
8422then with_signal_module="yes"
8423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8425$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008426
8427if test "${with_signal_module}" = "yes"; then
8428 USE_SIGNAL_MODULE=""
8429 SIGNAL_OBJS=""
8430else
8431 USE_SIGNAL_MODULE="#"
8432 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8433fi
8434
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008435# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008436
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008437USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8440$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008441
Guido van Rossumec2f0731997-01-22 20:54:01 +00008442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008444if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8447$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008448LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008449if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008450 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008451fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008452else
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8454$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455fi
8456
Martin v. Löwis11437992002-04-12 09:54:03 +00008457
8458# Templates for things AC_DEFINEd more than once.
8459# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008460
8461
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463
Matthias Kloseb9621712010-04-24 17:59:49 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8465$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008468if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469 withval=$with_threads;
8470fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008471
8472
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008473# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008476if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477 withval=$with_thread; with_threads=$with_thread
8478fi
8479
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008480
8481if test -z "$with_threads"
8482then with_threads="yes"
8483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8485$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008486
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008487
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008488if test "$with_threads" = "no"
8489then
8490 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008491elif test "$ac_cv_pthread_is_default" = yes
8492then
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008494
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008495 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008497
8498 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008500elif test "$ac_cv_kpthread" = "yes"
8501then
8502 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008503 if test "$ac_cv_cxx_thread" = "yes"; then
8504 CXX="$CXX -Kpthread"
8505 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008507
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008508 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008509 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008510elif test "$ac_cv_kthread" = "yes"
8511then
8512 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008513 if test "$ac_cv_cxx_thread" = "yes"; then
8514 CXX="$CXX -Kthread"
8515 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008517
8518 posix_threads=yes
8519 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008520elif test "$ac_cv_pthread" = "yes"
8521then
8522 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008523 if test "$ac_cv_cxx_thread" = "yes"; then
8524 CXX="$CXX -pthread"
8525 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008527
8528 posix_threads=yes
8529 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008530else
8531 if test ! -z "$with_threads" -a -d "$with_threads"
8532 then LDFLAGS="$LDFLAGS -L$with_threads"
8533 fi
8534 if test ! -z "$withval" -a -d "$withval"
8535 then LDFLAGS="$LDFLAGS -L$withval"
8536 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008537
8538 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008539 # define _POSIX_THREADS in unistd.h. Some apparently don't
8540 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8542$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008544/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008545
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008546#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008547#ifdef _POSIX_THREADS
8548yes
8549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008550
8551_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008554 unistd_defines_pthreads=yes
8555else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008556 unistd_defines_pthreads=no
8557fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008558rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008559
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8561$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008562
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008564
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 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 -08008566if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008568
Matthias Kloseb9621712010-04-24 17:59:49 +00008569 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008570
Martin v. Löwis11437992002-04-12 09:54:03 +00008571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008573
8574 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008575 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008576else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008577
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 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 -08008579if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008581
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008583
Martin v. Löwis11437992002-04-12 09:54:03 +00008584
Matthias Kloseb9621712010-04-24 17:59:49 +00008585$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008586
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008587 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008588else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008589
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008590 # Just looking for pthread_create in libpthread is not enough:
8591 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8592 # So we really have to include pthread.h, and then link.
8593 _libs=$LIBS
8594 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8596$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008598/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008599#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008600
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008601void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008602int
8603main ()
8604{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008605
8606pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 ;
8608 return 0;
8609}
8610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8614$as_echo "yes" >&6; }
8615 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008616
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008617 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008618 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008619else
Martin v. Löwis11437992002-04-12 09:54:03 +00008620
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008621 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008623if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008625
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008626 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008627 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008628else
Guido van Rossumad678af1998-10-02 14:42:15 +00008629
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8631$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008632if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008634else
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008636LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640/* Override any GCC internal prototype to avoid an error.
8641 Use char because int might match the return type of a GCC
8642 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008643#ifdef __cplusplus
8644extern "C"
8645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008646char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008647int
8648main ()
8649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 ;
8652 return 0;
8653}
8654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008655if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008657else
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008660rm -f core conftest.err conftest.$ac_objext \
8661 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008662LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8665$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008666if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008668
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008669 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008670 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008671 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008672else
Greg Steinadf63d62000-07-05 10:38:09 +00008673
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8675$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008676if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008678else
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008680LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684/* Override any GCC internal prototype to avoid an error.
8685 Use char because int might match the return type of a GCC
8686 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008687#ifdef __cplusplus
8688extern "C"
8689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008690char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008691int
8692main ()
8693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008695 ;
8696 return 0;
8697}
8698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008699if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008701else
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008704rm -f core conftest.err conftest.$ac_objext \
8705 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008706LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8709$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008710if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008712
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008713 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008714 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008715 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008716else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008717
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8719$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008720if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008722else
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008724LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728/* Override any GCC internal prototype to avoid an error.
8729 Use char because int might match the return type of a GCC
8730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008731#ifdef __cplusplus
8732extern "C"
8733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008734char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008735int
8736main ()
8737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 ;
8740 return 0;
8741}
8742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008745else
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008748rm -f core conftest.err conftest.$ac_objext \
8749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008750LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8753$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008754if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008756
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008757 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008758 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008759 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008760else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8763$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008764if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008766else
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008768LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008772/* Override any GCC internal prototype to avoid an error.
8773 Use char because int might match the return type of a GCC
8774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008775#ifdef __cplusplus
8776extern "C"
8777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008778char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008779int
8780main ()
8781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 ;
8784 return 0;
8785}
8786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008787if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008789else
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792rm -f core conftest.err conftest.$ac_objext \
8793 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008794LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8797$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008798if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008800
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008801 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008802 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008803 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008804else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008805
Martin v. Löwis130fb172001-07-19 11:00:41 +00008806 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008807fi
8808
Guido van Rossum627b2d71993-12-24 10:39:16 +00008809
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008810fi
8811
Guido van Rossum0be3e491997-05-22 20:33:33 +00008812fi
8813
Guido van Rossum49545951997-12-02 19:28:29 +00008814fi
8815
Guido van Rossumb93a8621998-05-07 13:27:32 +00008816fi
8817
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008819rm -f core conftest.err conftest.$ac_objext \
8820 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821fi
8822
Martin v. Löwis11437992002-04-12 09:54:03 +00008823
8824fi
8825
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008826
Michael W. Hudson54241132001-12-07 15:38:26 +00008827
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8829$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008830if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008832else
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008834LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838/* Override any GCC internal prototype to avoid an error.
8839 Use char because int might match the return type of a GCC
8840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841#ifdef __cplusplus
8842extern "C"
8843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008844char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008845int
8846main ()
8847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ;
8850 return 0;
8851}
8852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008854 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008855else
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858rm -f core conftest.err conftest.$ac_objext \
8859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008860LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8863$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008864if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008866
Martin v. Löwis130fb172001-07-19 11:00:41 +00008867 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008868 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008869 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008870fi
8871
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008872
Neal Norwitza978ab02002-11-02 16:58:05 +00008873 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8875$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008876if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008878else
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008880LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884/* Override any GCC internal prototype to avoid an error.
8885 Use char because int might match the return type of a GCC
8886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008887#ifdef __cplusplus
8888extern "C"
8889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008890char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008891int
8892main ()
8893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ;
8896 return 0;
8897}
8898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008899if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008901else
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008904rm -f core conftest.err conftest.$ac_objext \
8905 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008906LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8909$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008910if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008912
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008913 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008914 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008915 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008916fi
8917
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008918 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008919
Martin v. Löwis130fb172001-07-19 11:00:41 +00008920 if test "$USE_THREAD_MODULE" != "#"
8921 then
8922 # If the above checks didn't disable threads, (at least) OSF1
8923 # needs this '-threads' argument during linking.
8924 case $ac_sys_system in
8925 OSF1) LDLAST=-threads;;
8926 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008927 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008928fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008929
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008930if test "$posix_threads" = "yes"; then
8931 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008932
Matthias Kloseb9621712010-04-24 17:59:49 +00008933$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008934
8935 fi
8936
8937 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8938 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008939 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008940$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008941
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008942 ;;
8943 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008944$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008945
8946 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008947 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008948$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008949
8950 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008951 esac
8952
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8954$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008955 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008957else
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008959 ac_cv_pthread_system_supported=no
8960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008962/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008963#include <pthread.h>
8964 void *foo(void *parm) {
8965 return NULL;
8966 }
8967 main() {
8968 pthread_attr_t attr;
8969 pthread_t id;
8970 if (pthread_attr_init(&attr)) exit(-1);
8971 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8972 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8973 exit(0);
8974 }
8975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008976if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008977 ac_cv_pthread_system_supported=yes
8978else
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008983fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985
Guido van Rossum627b2d71993-12-24 10:39:16 +00008986fi
8987
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8989$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008990 if test "$ac_cv_pthread_system_supported" = "yes"; then
8991
Matthias Kloseb9621712010-04-24 17:59:49 +00008992$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008993
8994 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 for ac_func in pthread_sigmask
8996do :
8997 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08008998if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008999 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009000#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009001_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009002 case $ac_sys_system in
9003 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004
Matthias Kloseb9621712010-04-24 17:59:49 +00009005$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009006
9007 ;;
9008 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009009fi
9010done
9011
9012fi
9013
9014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9018$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009020if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9024$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025 ipv6=no
9026 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9028$as_echo "yes" >&6; }
9029 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009030
9031 ipv6=yes
9032 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034else
Martin v. Löwis11437992002-04-12 09:54:03 +00009035
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009037
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040 ipv6=no
9041
9042else
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009044/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045 /* AF_INET6 available check */
9046#include <sys/types.h>
9047#include <sys/socket.h>
9048main()
9049{
9050 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9051 exit(1);
9052 else
9053 exit(0);
9054}
9055
Martin v. Löwis11437992002-04-12 09:54:03 +00009056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009057if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9060$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063else
Matthias Kloseb159a552010-04-25 21:00:44 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9066$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009068
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072fi
9073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009074
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009075if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9077$as_echo_n "checking if RFC2553 API is available... " >&6; }
9078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009079/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009080
9081 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009082#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009083int
9084main ()
9085{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009086struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009087 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 ;
9089 return 0;
9090}
Matthias Kloseb159a552010-04-25 21:00:44 +00009091
Martin v. Löwis11437992002-04-12 09:54:03 +00009092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009093if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009094
9095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009096$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009097 ipv6=yes
9098
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009099else
Matthias Kloseb159a552010-04-25 21:00:44 +00009100
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009102$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009103 ipv6=no
9104
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009107fi
9108
9109if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009111
9112fi
9113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114fi
9115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116
9117ipv6type=unknown
9118ipv6lib=none
9119ipv6trylibc=no
9120
9121if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9123$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009124 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9125 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009126 case $i in
9127 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131#include <netinet/in.h>
9132#ifdef IPV6_INRIA_VERSION
9133yes
9134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009138 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009140rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141
9142 ;;
9143 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009145/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009146
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009147#include <netinet/in.h>
9148#ifdef __KAME__
9149yes
9150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009151_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009153 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154 ipv6type=$i;
9155 ipv6lib=inet6
9156 ipv6libdir=/usr/local/v6/lib
9157 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009158fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009159rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160
9161 ;;
9162 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009164/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009165
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009166#include <features.h>
9167#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9168yes
9169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009170_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009171if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009173 ipv6type=$i;
9174 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009175fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009176rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009177
9178 ;;
9179 linux-inet6)
9180 if test -d /usr/inet6; then
9181 ipv6type=$i
9182 ipv6lib=inet6
9183 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009184 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009185 fi
9186 ;;
9187 solaris)
9188 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009189 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190 ipv6type=$i
9191 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009192 fi
9193 fi
9194 ;;
9195 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009198
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009199#include <sys/param.h>
9200#ifdef _TOSHIBA_INET6
9201yes
9202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009203_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009205 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009206 ipv6type=$i;
9207 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009208 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009210rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211
9212 ;;
9213 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009215/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009216
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217#include </usr/local/v6/include/sys/v6config.h>
9218#ifdef __V6D__
9219yes
9220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009221_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009223 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009224 ipv6type=$i;
9225 ipv6lib=v6;
9226 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009227 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009229rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009230
9231 ;;
9232 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009234/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009235
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236#include <sys/param.h>
9237#ifdef _ZETA_MINAMI_INET6
9238yes
9239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009240_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009242 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009243 ipv6type=$i;
9244 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009245 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009246fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009247rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009248
9249 ;;
9250 esac
9251 if test "$ipv6type" != "unknown"; then
9252 break
9253 fi
9254 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9256$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009257fi
9258
9259if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9260 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9261 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9262 echo "using lib$ipv6lib"
9263 else
9264 if test $ipv6trylibc = "yes"; then
9265 echo "using libc"
9266 else
9267 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9268 echo "You need to fetch lib$ipv6lib.a from appropriate"
9269 echo 'ipv6 kit and compile beforehand.'
9270 exit 1
9271 fi
9272 fi
9273fi
9274
Matthias Kloseb9621712010-04-24 17:59:49 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9276$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009278/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009279
9280 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009281int
9282main ()
9283{
9284FSIORefNum fRef = 0
9285 ;
9286 return 0;
9287}
Matthias Kloseb159a552010-04-25 21:00:44 +00009288
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009290if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009291
Matthias Kloseb159a552010-04-25 21:00:44 +00009292
Matthias Kloseb9621712010-04-24 17:59:49 +00009293$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009294
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9296$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009297
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009298else
Matthias Kloseb159a552010-04-25 21:00:44 +00009299
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009302
9303fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9305
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009306# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9308$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009310# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009311if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312 withval=$with_doc_strings;
9313fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009314
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009315
9316if test -z "$with_doc_strings"
9317then with_doc_strings="yes"
9318fi
9319if test "$with_doc_strings" != "no"
9320then
9321
Matthias Kloseb9621712010-04-24 17:59:49 +00009322$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009323
9324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9326$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009327
Antoine Pitrou042b1282010-08-13 21:15:58 +00009328# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9330$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009332# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009333if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009334 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009335if test "$withval" != no
9336then
9337
Matthias Kloseb9621712010-04-24 17:59:49 +00009338$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009339
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9341$as_echo "yes" >&6; }
9342else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9343$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009344fi
9345else
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9347$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009348fi
9349
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009350
9351# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9353$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009354
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009356if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009357 withval=$with_pymalloc;
9358fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009359
Neil Schemenauera35c6882001-02-27 04:45:05 +00009360
Neil Schemenauer16c22972002-03-22 15:34:49 +00009361if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009362then
9363 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009364 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009365fi
9366if test "$with_pymalloc" != "no"
9367then
Martin v. Löwis11437992002-04-12 09:54:03 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009370
9371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9373$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009374
Benjamin Peterson05159c42009-12-03 03:01:27 +00009375# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9377$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009378
9379# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009380if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009381 withval=$with_valgrind;
9382else
9383 with_valgrind=no
9384fi
9385
Matthias Kloseb9621712010-04-24 17:59:49 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9387$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009388if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009389 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 -08009390if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009393
9394else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009395 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009396
9397fi
9398
9399
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009400 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009401fi
9402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009403# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009404
Guido van Rossum98935bf2001-09-05 19:13:16 +00009405DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009406
Guido van Rossume97ee181999-12-20 21:27:22 +00009407# the dlopen() function means we might want to use dynload_shlib.o. some
9408# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009409for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009410do :
9411 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009412if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009414#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009415_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009416
Guido van Rossume97ee181999-12-20 21:27:22 +00009417fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009418done
Guido van Rossume97ee181999-12-20 21:27:22 +00009419
Michael W. Hudson54241132001-12-07 15:38:26 +00009420
Guido van Rossume97ee181999-12-20 21:27:22 +00009421# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9422# loading of modules.
9423
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9425$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009426if test -z "$DYNLOADFILE"
9427then
9428 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009429 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9430 if test "$ac_cv_func_dlopen" = yes
9431 then DYNLOADFILE="dynload_shlib.o"
9432 else DYNLOADFILE="dynload_aix.o"
9433 fi
9434 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009435 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009436 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9437 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009438 *)
9439 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9440 # out any dynamic loading
9441 if test "$ac_cv_func_dlopen" = yes
9442 then DYNLOADFILE="dynload_shlib.o"
9443 else DYNLOADFILE="dynload_stub.o"
9444 fi
9445 ;;
9446 esac
9447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9449$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009450if test "$DYNLOADFILE" != "dynload_stub.o"
9451then
Martin v. Löwis11437992002-04-12 09:54:03 +00009452
Matthias Kloseb9621712010-04-24 17:59:49 +00009453$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009454
9455fi
9456
Neil Schemenauer4e425612001-06-19 15:44:15 +00009457# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9458
Michael W. Hudson54241132001-12-07 15:38:26 +00009459
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9461$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009462if test -z "$MACHDEP_OBJS"
9463then
Jack Jansene578a632001-08-15 01:27:14 +00009464 MACHDEP_OBJS=$extra_machdep_objs
9465else
9466 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9469$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009470
Guido van Rossum627b2d71993-12-24 10:39:16 +00009471# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009472for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009473 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009474 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009475 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009476 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009477 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009478 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009479 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9480 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009481 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009482 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009483 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009484 truncate uname unsetenv utimes waitpid wait3 wait4 \
9485 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009486do :
9487 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9488ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009489if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009491#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009492_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009493
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009494fi
9495done
9496
Michael W. Hudson54241132001-12-07 15:38:26 +00009497
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009498ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9499 #include <dirent.h>
9500"
9501if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9502
9503$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9504
9505fi
9506
9507
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009508# For some functions, having a definition is not sufficient, since
9509# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9511$as_echo_n "checking for chroot... " >&6; }
9512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009514#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009515int
9516main ()
9517{
9518void *x=chroot
9519 ;
9520 return 0;
9521}
9522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009524
Matthias Kloseb9621712010-04-24 17:59:49 +00009525$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009526
Matthias Kloseb159a552010-04-25 21:00:44 +00009527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009528$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009529else
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9531$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009532
9533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9536$as_echo_n "checking for link... " >&6; }
9537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009538/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009539#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009540int
9541main ()
9542{
9543void *x=link
9544 ;
9545 return 0;
9546}
9547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009548if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009549
Matthias Kloseb9621712010-04-24 17:59:49 +00009550$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009551
Matthias Kloseb159a552010-04-25 21:00:44 +00009552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009553$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009554else
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009557
9558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9561$as_echo_n "checking for symlink... " >&6; }
9562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009564#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009565int
9566main ()
9567{
9568void *x=symlink
9569 ;
9570 return 0;
9571}
9572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009573if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009574
Matthias Kloseb9621712010-04-24 17:59:49 +00009575$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009576
Matthias Kloseb159a552010-04-25 21:00:44 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009578$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009579else
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9581$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009582
9583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9586$as_echo_n "checking for fchdir... " >&6; }
9587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009588/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009589#include <unistd.h>
9590int
9591main ()
9592{
9593void *x=fchdir
9594 ;
9595 return 0;
9596}
9597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009598if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009599
Matthias Kloseb9621712010-04-24 17:59:49 +00009600$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009601
Matthias Kloseb159a552010-04-25 21:00:44 +00009602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009603$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009604else
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9606$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009607
9608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9611$as_echo_n "checking for fsync... " >&6; }
9612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009614#include <unistd.h>
9615int
9616main ()
9617{
9618void *x=fsync
9619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009626
Matthias Kloseb159a552010-04-25 21:00:44 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009632
9633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9636$as_echo_n "checking for fdatasync... " >&6; }
9637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009638/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009639#include <unistd.h>
9640int
9641main ()
9642{
9643void *x=fdatasync
9644 ;
9645 return 0;
9646}
9647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009649
Matthias Kloseb9621712010-04-24 17:59:49 +00009650$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009651
Matthias Kloseb159a552010-04-25 21:00:44 +00009652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009653$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009654else
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009657
9658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9661$as_echo_n "checking for epoll... " >&6; }
9662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009663/* end confdefs.h. */
9664#include <sys/epoll.h>
9665int
9666main ()
9667{
9668void *x=epoll_create
9669 ;
9670 return 0;
9671}
9672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009676
Matthias Kloseb159a552010-04-25 21:00:44 +00009677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009679else
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9681$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009682
9683fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9686$as_echo_n "checking for kqueue... " >&6; }
9687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009688/* end confdefs.h. */
9689
9690#include <sys/types.h>
9691#include <sys/event.h>
9692
9693int
9694main ()
9695{
9696int x=kqueue()
9697 ;
9698 return 0;
9699}
9700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009701if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009702
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009704
Matthias Kloseb159a552010-04-25 21:00:44 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009706$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009707else
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009710
9711fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009713# On some systems (eg. FreeBSD 5), we would find a definition of the
9714# functions ctermid_r, setgroups in the library, but no prototype
9715# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9716# address to avoid compiler warnings and potential miscompilations
9717# because of the missing prototypes.
9718
Matthias Kloseb9621712010-04-24 17:59:49 +00009719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9720$as_echo_n "checking for ctermid_r... " >&6; }
9721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009723
Martin v. Löwisd5843682002-11-21 20:41:28 +00009724#include <stdio.h>
9725
Martin v. Löwisd5843682002-11-21 20:41:28 +00009726int
9727main ()
9728{
9729void* p = ctermid_r
9730 ;
9731 return 0;
9732}
9733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009735
Matthias Kloseb9621712010-04-24 17:59:49 +00009736$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009737
Matthias Kloseb159a552010-04-25 21:00:44 +00009738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009739$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009740else
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9742$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009743
9744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9746
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9748$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009749if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009750 $as_echo_n "(cached) " >&6
9751else
9752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009753/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009754#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009755int
9756main ()
9757{
9758void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009759
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009764if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009765 ac_cv_flock_decl=yes
9766else
9767 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009768
9769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009771
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009772fi
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9774$as_echo "$ac_cv_flock_decl" >&6; }
9775if test "x${ac_cv_flock_decl}" = xyes; then
9776 for ac_func in flock
9777do :
9778 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009779if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009780 cat >>confdefs.h <<_ACEOF
9781#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009782_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009783
Antoine Pitroua3000072010-09-07 14:52:42 +00009784else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009786$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009787if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009788 $as_echo_n "(cached) " >&6
9789else
9790 ac_check_lib_save_LIBS=$LIBS
9791LIBS="-lbsd $LIBS"
9792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9793/* end confdefs.h. */
9794
9795/* Override any GCC internal prototype to avoid an error.
9796 Use char because int might match the return type of a GCC
9797 builtin and then its argument prototype would still apply. */
9798#ifdef __cplusplus
9799extern "C"
9800#endif
9801char flock ();
9802int
9803main ()
9804{
9805return flock ();
9806 ;
9807 return 0;
9808}
9809_ACEOF
9810if ac_fn_c_try_link "$LINENO"; then :
9811 ac_cv_lib_bsd_flock=yes
9812else
9813 ac_cv_lib_bsd_flock=no
9814fi
9815rm -f core conftest.err conftest.$ac_objext \
9816 conftest$ac_exeext conftest.$ac_ext
9817LIBS=$ac_check_lib_save_LIBS
9818fi
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9820$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009821if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009822 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009823
9824
9825$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9826
9827
9828fi
9829
9830
9831fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009832done
9833
Antoine Pitroua3000072010-09-07 14:52:42 +00009834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835
Matthias Kloseb9621712010-04-24 17:59:49 +00009836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9837$as_echo_n "checking for getpagesize... " >&6; }
9838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009840
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009841#include <unistd.h>
9842
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009843int
9844main ()
9845{
9846void* p = getpagesize
9847 ;
9848 return 0;
9849}
9850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009851if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009852
Matthias Kloseb9621712010-04-24 17:59:49 +00009853$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009854
Matthias Kloseb159a552010-04-25 21:00:44 +00009855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009856$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009857else
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9859$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009860
9861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009863
Charles-François Natali6613c182011-11-27 12:41:06 +01009864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9865$as_echo_n "checking for broken unsetenv... " >&6; }
9866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9867/* end confdefs.h. */
9868
9869#include <stdlib.h>
9870
9871int
9872main ()
9873{
9874int res = unsetenv("DUMMY")
9875 ;
9876 return 0;
9877}
9878_ACEOF
9879if ac_fn_c_try_compile "$LINENO"; then :
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882else
9883
9884$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9885
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9887$as_echo "yes" >&6; }
9888
9889fi
9890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9891
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009892for ac_prog in true
9893do
9894 # Extract the first word of "$ac_prog", so it can be a program name with args.
9895set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9897$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009898if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009900else
9901 if test -n "$TRUE"; then
9902 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9903else
9904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9905for as_dir in $PATH
9906do
9907 IFS=$as_save_IFS
9908 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910 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 +00009911 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 $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 +00009913 break 2
9914 fi
9915done
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009918
9919fi
9920fi
9921TRUE=$ac_cv_prog_TRUE
9922if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9924$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009925else
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009928fi
9929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009931 test -n "$TRUE" && break
9932done
9933test -n "$TRUE" || TRUE="/bin/true"
9934
9935
Matthias Kloseb9621712010-04-24 17:59:49 +00009936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9937$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009938if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009940else
9941 ac_check_lib_save_LIBS=$LIBS
9942LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009944/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009946/* Override any GCC internal prototype to avoid an error.
9947 Use char because int might match the return type of a GCC
9948 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009949#ifdef __cplusplus
9950extern "C"
9951#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009952char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009953int
9954main ()
9955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009956return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009957 ;
9958 return 0;
9959}
9960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009961if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009962 ac_cv_lib_c_inet_aton=yes
9963else
Matthias Kloseb9621712010-04-24 17:59:49 +00009964 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009966rm -f core conftest.err conftest.$ac_objext \
9967 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009968LIBS=$ac_check_lib_save_LIBS
9969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9971$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009972if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009973 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009974else
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9976$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009977if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009979else
9980 ac_check_lib_save_LIBS=$LIBS
9981LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009983/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985/* Override any GCC internal prototype to avoid an error.
9986 Use char because int might match the return type of a GCC
9987 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009988#ifdef __cplusplus
9989extern "C"
9990#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009991char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009992int
9993main ()
9994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009995return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009996 ;
9997 return 0;
9998}
9999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010001 ac_cv_lib_resolv_inet_aton=yes
10002else
Matthias Kloseb9621712010-04-24 17:59:49 +000010003 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010005rm -f core conftest.err conftest.$ac_objext \
10006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010007LIBS=$ac_check_lib_save_LIBS
10008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10010$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010011if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010012 cat >>confdefs.h <<_ACEOF
10013#define HAVE_LIBRESOLV 1
10014_ACEOF
10015
10016 LIBS="-lresolv $LIBS"
10017
10018fi
10019
10020
10021fi
10022
10023
Christian Heimesd0764e22007-12-04 15:00:33 +000010024# On Tru64, chflags seems to be present, but calling it will
10025# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10027$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010028if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010029 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010030else
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010032 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010033else
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010035/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010036
Christian Heimesd0764e22007-12-04 15:00:33 +000010037#include <sys/stat.h>
10038#include <unistd.h>
10039int main(int argc, char*argv[])
10040{
10041 if(chflags(argv[0], 0) != 0)
10042 return 1;
10043 return 0;
10044}
Ned Deily3eb67d52011-06-28 00:00:28 -070010045
Christian Heimesd0764e22007-12-04 15:00:33 +000010046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010047if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010048 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10053 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010054fi
10055
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010056
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10059$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010060if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010062if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010063 ac_cv_have_chflags="yes"
10064else
10065 ac_cv_have_chflags="no"
10066fi
10067
10068fi
10069if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010070
Matthias Kloseb9621712010-04-24 17:59:49 +000010071$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010072
10073fi
10074
Matthias Kloseb9621712010-04-24 17:59:49 +000010075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10076$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010077if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010079else
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010081 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010082else
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010084/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010085
Christian Heimesd0764e22007-12-04 15:00:33 +000010086#include <sys/stat.h>
10087#include <unistd.h>
10088int main(int argc, char*argv[])
10089{
10090 if(lchflags(argv[0], 0) != 0)
10091 return 1;
10092 return 0;
10093}
Ned Deily3eb67d52011-06-28 00:00:28 -070010094
Christian Heimesd0764e22007-12-04 15:00:33 +000010095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010096if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010097 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010098else
Matthias Kloseb9621712010-04-24 17:59:49 +000010099 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10102 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010103fi
10104
10105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10108$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010109if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010110 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010111if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010112 ac_cv_have_lchflags="yes"
10113else
10114 ac_cv_have_lchflags="no"
10115fi
10116
10117fi
10118if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010119
Matthias Kloseb9621712010-04-24 17:59:49 +000010120$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010121
10122fi
10123
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010124case $ac_sys_system/$ac_sys_release in
10125Darwin/*)
10126 _CUR_CFLAGS="${CFLAGS}"
10127 _CUR_LDFLAGS="${LDFLAGS}"
10128 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10129 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10130 ;;
10131esac
10132
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10134$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010135if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010137else
10138 ac_check_lib_save_LIBS=$LIBS
10139LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010141/* end confdefs.h. */
10142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143/* Override any GCC internal prototype to avoid an error.
10144 Use char because int might match the return type of a GCC
10145 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010146#ifdef __cplusplus
10147extern "C"
10148#endif
10149char inflateCopy ();
10150int
10151main ()
10152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010154 ;
10155 return 0;
10156}
10157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010158if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010159 ac_cv_lib_z_inflateCopy=yes
10160else
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010163rm -f core conftest.err conftest.$ac_objext \
10164 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010165LIBS=$ac_check_lib_save_LIBS
10166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10168$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010169if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010170
Matthias Kloseb9621712010-04-24 17:59:49 +000010171$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010172
10173fi
10174
10175
10176case $ac_sys_system/$ac_sys_release in
10177Darwin/*)
10178 CFLAGS="${_CUR_CFLAGS}"
10179 LDFLAGS="${_CUR_LDFLAGS}"
10180 ;;
10181esac
10182
Matthias Kloseb9621712010-04-24 17:59:49 +000010183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10184$as_echo_n "checking for hstrerror... " >&6; }
10185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010186/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010187
Martin v. Löwise9416172003-05-03 10:12:45 +000010188#include <netdb.h>
10189
Martin v. Löwise9416172003-05-03 10:12:45 +000010190int
10191main ()
10192{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010193void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010194 ;
10195 return 0;
10196}
10197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010198if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010199
Matthias Kloseb9621712010-04-24 17:59:49 +000010200$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010201
Matthias Kloseb159a552010-04-25 21:00:44 +000010202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010203$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010204else
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010207
10208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010209rm -f core conftest.err conftest.$ac_objext \
10210 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211
Matthias Kloseb9621712010-04-24 17:59:49 +000010212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10213$as_echo_n "checking for inet_aton... " >&6; }
10214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010216
Martin v. Löwis86d66262006-02-17 08:40:11 +000010217#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010218#include <sys/socket.h>
10219#include <netinet/in.h>
10220#include <arpa/inet.h>
10221
Martin v. Löwise9416172003-05-03 10:12:45 +000010222int
10223main ()
10224{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010225void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010226 ;
10227 return 0;
10228}
10229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010231
Matthias Kloseb9621712010-04-24 17:59:49 +000010232$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010233
Matthias Kloseb159a552010-04-25 21:00:44 +000010234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010235$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010236else
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010239
10240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241rm -f core conftest.err conftest.$ac_objext \
10242 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010243
Matthias Kloseb9621712010-04-24 17:59:49 +000010244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10245$as_echo_n "checking for inet_pton... " >&6; }
10246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010247/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010248
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010249#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010250#include <sys/socket.h>
10251#include <netinet/in.h>
10252#include <arpa/inet.h>
10253
Martin v. Löwise9416172003-05-03 10:12:45 +000010254int
10255main ()
10256{
10257void* p = inet_pton
10258 ;
10259 return 0;
10260}
10261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010263
Matthias Kloseb9621712010-04-24 17:59:49 +000010264$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010265
Matthias Kloseb159a552010-04-25 21:00:44 +000010266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010267$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010268else
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010271
10272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010274
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010275# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10277$as_echo_n "checking for setgroups... " >&6; }
10278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010279/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010280
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010281#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010282#ifdef HAVE_GRP_H
10283#include <grp.h>
10284#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010285
Martin v. Löwisd5843682002-11-21 20:41:28 +000010286int
10287main ()
10288{
10289void* p = setgroups
10290 ;
10291 return 0;
10292}
10293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010294if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010295
Matthias Kloseb9621712010-04-24 17:59:49 +000010296$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010297
Matthias Kloseb159a552010-04-25 21:00:44 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010299$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010300else
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010303
10304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010306
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010307# check for openpty and forkpty
10308
10309for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010310do :
10311 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010312if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010314#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010316
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010317else
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10319$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010320if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010322else
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010324LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328/* Override any GCC internal prototype to avoid an error.
10329 Use char because int might match the return type of a GCC
10330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010331#ifdef __cplusplus
10332extern "C"
10333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010334char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010335int
10336main ()
10337{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 ;
10340 return 0;
10341}
10342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010345else
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010348rm -f core conftest.err conftest.$ac_objext \
10349 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010350LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10353$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010354if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010356 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010357else
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10359$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010360if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010362else
10363 ac_check_lib_save_LIBS=$LIBS
10364LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010366/* end confdefs.h. */
10367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368/* Override any GCC internal prototype to avoid an error.
10369 Use char because int might match the return type of a GCC
10370 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010371#ifdef __cplusplus
10372extern "C"
10373#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010374char openpty ();
10375int
10376main ()
10377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010384 ac_cv_lib_bsd_openpty=yes
10385else
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010388rm -f core conftest.err conftest.$ac_objext \
10389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010390LIBS=$ac_check_lib_save_LIBS
10391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10393$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010394if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010396 LIBS="$LIBS -lbsd"
10397fi
10398
10399
10400fi
10401
Fred Drake8cef4cf2000-06-28 16:40:38 +000010402
10403fi
10404done
10405
10406for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010407do :
10408 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010409if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010411#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010412_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010413
Fred Drake8cef4cf2000-06-28 16:40:38 +000010414else
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10416$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010417if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010419else
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010421LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425/* Override any GCC internal prototype to avoid an error.
10426 Use char because int might match the return type of a GCC
10427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010428#ifdef __cplusplus
10429extern "C"
10430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010431char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010432int
10433main ()
10434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 ;
10437 return 0;
10438}
10439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010442else
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010445rm -f core conftest.err conftest.$ac_objext \
10446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010447LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10450$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010451if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010452 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010453 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010454else
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10456$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010457if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010459else
10460 ac_check_lib_save_LIBS=$LIBS
10461LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010463/* end confdefs.h. */
10464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465/* Override any GCC internal prototype to avoid an error.
10466 Use char because int might match the return type of a GCC
10467 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010468#ifdef __cplusplus
10469extern "C"
10470#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010471char forkpty ();
10472int
10473main ()
10474{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010476 ;
10477 return 0;
10478}
10479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010481 ac_cv_lib_bsd_forkpty=yes
10482else
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010485rm -f core conftest.err conftest.$ac_objext \
10486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010487LIBS=$ac_check_lib_save_LIBS
10488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10490$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010491if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010493 LIBS="$LIBS -lbsd"
10494fi
10495
10496
10497fi
10498
Fred Drake8cef4cf2000-06-28 16:40:38 +000010499
10500fi
10501done
10502
Jack Jansendd19cf82001-12-06 22:36:17 +000010503
Christian Heimesb186d002008-03-18 15:15:01 +000010504# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010505for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010506do :
10507 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010508if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010509 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010510#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010511_ACEOF
10512
10513fi
10514done
10515
10516
Michael W. Hudson54241132001-12-07 15:38:26 +000010517# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010518for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010519do :
10520 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10521ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010522if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010524#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010525_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010526
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010527fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010528done
10529
Michael W. Hudson54241132001-12-07 15:38:26 +000010530
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010531ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010532if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010533 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010534
Martin v. Löwis1142de32002-03-29 16:28:31 +000010535else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010537 *" dup2.$ac_objext "* ) ;;
10538 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010540esac
10541
Martin v. Löwis1142de32002-03-29 16:28:31 +000010542fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010543
10544ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010545if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010546 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10547
10548else
10549 case " $LIBOBJS " in
10550 *" getcwd.$ac_objext "* ) ;;
10551 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10552 ;;
10553esac
10554
10555fi
10556
10557ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010558if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010559 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10560
10561else
10562 case " $LIBOBJS " in
10563 *" strdup.$ac_objext "* ) ;;
10564 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10565 ;;
10566esac
10567
10568fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010569
10570
10571for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010572do :
10573 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010574if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010576#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010580#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010581int
10582main ()
10583{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010584getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 ;
10586 return 0;
10587}
10588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010592
Guido van Rossum627b2d71993-12-24 10:39:16 +000010593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010595
Guido van Rossum627b2d71993-12-24 10:39:16 +000010596fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010597done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598
Jack Jansen150753c2003-03-29 22:07:47 +000010599for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010600do :
10601 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010602if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010603 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010607/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010608#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010609int
10610main ()
10611{
10612setpgrp(0,0);
10613 ;
10614 return 0;
10615}
10616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010618
Matthias Kloseb9621712010-04-24 17:59:49 +000010619$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010620
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010623
10624fi
10625done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010626
Thomas Wouters3a584202000-08-05 23:28:51 +000010627for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010628do :
10629 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010630if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010632#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010636#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010637int
10638main ()
10639{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010640gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ;
10642 return 0;
10643}
10644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645if ac_fn_c_try_compile "$LINENO"; then :
10646
Guido van Rossum627b2d71993-12-24 10:39:16 +000010647else
Skip Montanaro6dead952003-09-25 14:50:04 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010650
Martin v. Löwis11437992002-04-12 09:54:03 +000010651
Guido van Rossum627b2d71993-12-24 10:39:16 +000010652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010654
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010655fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010656done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010657
Michael W. Hudson54241132001-12-07 15:38:26 +000010658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10660$as_echo_n "checking for major... " >&6; }
10661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010663
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010664#if defined(MAJOR_IN_MKDEV)
10665#include <sys/mkdev.h>
10666#elif defined(MAJOR_IN_SYSMACROS)
10667#include <sys/sysmacros.h>
10668#else
10669#include <sys/types.h>
10670#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010671
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010672int
10673main ()
10674{
10675
10676 makedev(major(0),minor(0));
10677
10678 ;
10679 return 0;
10680}
10681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010683
10684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010686
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10688$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010689
10690else
Skip Montanaro6dead952003-09-25 14:50:04 +000010691
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10693$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010694
10695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010696rm -f core conftest.err conftest.$ac_objext \
10697 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010698
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010699# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010700# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10702$as_echo_n "checking for getaddrinfo... " >&6; }
10703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010704/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010705
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010706#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010707#include <sys/socket.h>
10708#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010709#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010710
Martin v. Löwis11437992002-04-12 09:54:03 +000010711int
10712main ()
10713{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010714getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 ;
10716 return 0;
10717}
10718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010719if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010720 have_getaddrinfo=yes
10721else
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010724rm -f core conftest.err conftest.$ac_objext \
10725 conftest$ac_exeext conftest.$ac_ext
10726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10727$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010728if test $have_getaddrinfo = yes
10729then
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10731$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010732 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010734else
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010736 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010737else
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010739/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010740
10741#include <sys/types.h>
10742#include <netdb.h>
10743#include <string.h>
10744#include <sys/socket.h>
10745#include <netinet/in.h>
10746
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010747int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010748{
10749 int passive, gaierr, inet4 = 0, inet6 = 0;
10750 struct addrinfo hints, *ai, *aitop;
10751 char straddr[INET6_ADDRSTRLEN], strport[16];
10752
10753 for (passive = 0; passive <= 1; passive++) {
10754 memset(&hints, 0, sizeof(hints));
10755 hints.ai_family = AF_UNSPEC;
10756 hints.ai_flags = passive ? AI_PASSIVE : 0;
10757 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010758 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010759 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10760 (void)gai_strerror(gaierr);
10761 goto bad;
10762 }
10763 for (ai = aitop; ai; ai = ai->ai_next) {
10764 if (ai->ai_addr == NULL ||
10765 ai->ai_addrlen == 0 ||
10766 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10767 straddr, sizeof(straddr), strport, sizeof(strport),
10768 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10769 goto bad;
10770 }
10771 switch (ai->ai_family) {
10772 case AF_INET:
10773 if (strcmp(strport, "54321") != 0) {
10774 goto bad;
10775 }
10776 if (passive) {
10777 if (strcmp(straddr, "0.0.0.0") != 0) {
10778 goto bad;
10779 }
10780 } else {
10781 if (strcmp(straddr, "127.0.0.1") != 0) {
10782 goto bad;
10783 }
10784 }
10785 inet4++;
10786 break;
10787 case AF_INET6:
10788 if (strcmp(strport, "54321") != 0) {
10789 goto bad;
10790 }
10791 if (passive) {
10792 if (strcmp(straddr, "::") != 0) {
10793 goto bad;
10794 }
10795 } else {
10796 if (strcmp(straddr, "::1") != 0) {
10797 goto bad;
10798 }
10799 }
10800 inet6++;
10801 break;
10802 case AF_UNSPEC:
10803 goto bad;
10804 break;
10805 default:
10806 /* another family support? */
10807 break;
10808 }
10809 }
10810 }
10811
10812 if (!(inet4 == 0 || inet4 == 2))
10813 goto bad;
10814 if (!(inet6 == 0 || inet6 == 2))
10815 goto bad;
10816
10817 if (aitop)
10818 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010819 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010820
10821 bad:
10822 if (aitop)
10823 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010824 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010825}
10826
Martin v. Löwis11437992002-04-12 09:54:03 +000010827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010829 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10834 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010837fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010838
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10842$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10843
Mark Dickinson2df5d282009-12-31 21:22:50 +000010844if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010845then
10846 if test $ipv6 = yes
10847 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010848 echo 'Fatal: You must get working getaddrinfo() function.'
10849 echo ' or you can specify "--disable-ipv6"'.
10850 exit 1
10851 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010852else
Martin v. Löwis11437992002-04-12 09:54:03 +000010853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010855
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010856fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010857
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010858for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010859do :
10860 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010861if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010863#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010864_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010865
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010866fi
10867done
10868
Michael W. Hudson54241132001-12-07 15:38:26 +000010869
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010870# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10872$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010873if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010875else
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010877/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878#include <sys/types.h>
10879#include <sys/time.h>
10880#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010881
Martin v. Löwis11437992002-04-12 09:54:03 +000010882int
10883main ()
10884{
10885if ((struct tm *) 0)
10886return 0;
10887 ;
10888 return 0;
10889}
10890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010891if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010892 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010893else
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10899$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010900if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010903
10904fi
10905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10907$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010908if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010910else
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010912/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010913#include <sys/types.h>
10914#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010915
Martin v. Löwis11437992002-04-12 09:54:03 +000010916int
10917main ()
10918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010919struct tm tm;
10920 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 ;
10923 return 0;
10924}
10925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010926if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010927 ac_cv_struct_tm=time.h
10928else
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10934$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010935if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938
10939fi
10940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941ac_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 +000010942#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944"
Gregory P. Smith69140482012-01-16 02:05:55 -080010945if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010946
10947cat >>confdefs.h <<_ACEOF
10948#define HAVE_STRUCT_TM_TM_ZONE 1
10949_ACEOF
10950
10951
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010952fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010953
Martin v. Löwis11437992002-04-12 09:54:03 +000010954if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957
10958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10960"
Gregory P. Smith69140482012-01-16 02:05:55 -080010961if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963else
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965fi
10966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010968#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969_ACEOF
10970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10972$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010973if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975else
Matthias Kloseb9621712010-04-24 17:59:49 +000010976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010977/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010978#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010979#if !HAVE_DECL_TZNAME
10980extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
Martin v. Löwis11437992002-04-12 09:54:03 +000010983int
10984main ()
10985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 ;
10988 return 0;
10989}
10990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010991if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992 ac_cv_var_tzname=yes
10993else
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010996rm -f core conftest.err conftest.$ac_objext \
10997 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11000$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011001 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011004
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011005 fi
11006fi
11007
Matthias Kloseb9621712010-04-24 17:59:49 +000011008ac_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 -080011009if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011010
11011cat >>confdefs.h <<_ACEOF
11012#define HAVE_STRUCT_STAT_ST_RDEV 1
11013_ACEOF
11014
11015
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011016fi
11017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018ac_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 -080011019if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011020
Martin v. Löwis11437992002-04-12 09:54:03 +000011021cat >>confdefs.h <<_ACEOF
11022#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11023_ACEOF
11024
11025
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011026fi
11027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028ac_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 -080011029if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011030
11031cat >>confdefs.h <<_ACEOF
11032#define HAVE_STRUCT_STAT_ST_FLAGS 1
11033_ACEOF
11034
11035
11036fi
11037
Matthias Kloseb9621712010-04-24 17:59:49 +000011038ac_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 -080011039if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011040
11041cat >>confdefs.h <<_ACEOF
11042#define HAVE_STRUCT_STAT_ST_GEN 1
11043_ACEOF
11044
11045
11046fi
11047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048ac_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 -080011049if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011050
11051cat >>confdefs.h <<_ACEOF
11052#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11053_ACEOF
11054
11055
11056fi
11057
Matthias Kloseb9621712010-04-24 17:59:49 +000011058ac_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 -080011059if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011060
Martin v. Löwis11437992002-04-12 09:54:03 +000011061cat >>confdefs.h <<_ACEOF
11062#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11063_ACEOF
11064
11065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011067
11068else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011070 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11072 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011073esac
11074
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011075fi
11076
Michael W. Hudson54241132001-12-07 15:38:26 +000011077
Martin v. Löwis11437992002-04-12 09:54:03 +000011078
Matthias Kloseb9621712010-04-24 17:59:49 +000011079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11080$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011081if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083else
Matthias Kloseb159a552010-04-25 21:00:44 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011086/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011087#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011088int
11089main ()
11090{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 ;
11093 return 0;
11094}
11095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011096if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011097 ac_cv_header_time_altzone=yes
11098else
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103fi
11104
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11106$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011107if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011110
11111fi
11112
Guido van Rossumda88dad1995-01-26 00:46:29 +000011113was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11115$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011117/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011118
11119#include <sys/types.h>
11120#include <sys/select.h>
11121#include <sys/time.h>
11122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123int
11124main ()
11125{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126;
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
11133
Matthias Kloseb9621712010-04-24 17:59:49 +000011134$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011135
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011136 was_it_defined=yes
11137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11141$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011142
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11144$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011145if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011147else
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011150#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011154struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011159if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011160 ac_cv_struct_addrinfo=yes
11161else
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11165fi
11166
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11168$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011169if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011172
11173fi
11174
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11176$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011177if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011179else
Matthias Kloseb9621712010-04-24 17:59:49 +000011180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011181/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011182
11183# include <sys/types.h>
11184# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011185int
11186main ()
11187{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011188struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011189 ;
11190 return 0;
11191}
11192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011193if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011194 ac_cv_struct_sockaddr_storage=yes
11195else
Matthias Kloseb9621712010-04-24 17:59:49 +000011196 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11199fi
11200
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11202$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011203if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011206
11207fi
11208
Guido van Rossum627b2d71993-12-24 10:39:16 +000011209# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11212$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011213if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011215else
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011218$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011219int
11220main ()
11221{
11222static int test_array [1 - 2 * !(((char) -1) < 0)];
11223test_array [0] = 0
11224
11225 ;
11226 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011227}
Martin v. Löwis11437992002-04-12 09:54:03 +000011228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011229if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011230 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011231else
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11237$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011238if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011240
11241fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011242
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11244$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011245if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011247else
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011250
Martin v. Löwis11437992002-04-12 09:54:03 +000011251int
11252main ()
11253{
11254/* FIXME: Include the comments suggested by Paul. */
11255#ifndef __cplusplus
11256 /* Ultrix mips cc rejects this. */
11257 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260 char const *const *pcpcc;
11261 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 /* NEC SVR4.0.2 mips cc rejects this. */
11263 struct point {int x, y;};
11264 static struct point const zero = {0,0};
11265 /* AIX XL C 1.02.0.0 rejects this.
11266 It does not let you subtract one const X* pointer from another in
11267 an arm of an if-expression whose if-part is not a constant
11268 expression */
11269 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011271 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011272 ++pcpcc;
11273 ppc = (char**) pcpcc;
11274 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 { /* SCO 3.2v4 cc rejects this. */
11276 char *t;
11277 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011278
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 }
11282 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11283 int x[] = {25, 17};
11284 const int *foo = &x[0];
11285 ++foo;
11286 }
11287 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11288 typedef const int *iptr;
11289 iptr p = 0;
11290 ++p;
11291 }
11292 { /* AIX XL C 1.02.0.0 rejects this saying
11293 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11294 struct s { int j; const int *ap[3]; };
11295 struct s *b; b->j = 5;
11296 }
11297 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11298 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011299 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011302#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011303
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 ;
11305 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011306}
Martin v. Löwis11437992002-04-12 09:54:03 +000011307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011309 ac_cv_c_const=yes
11310else
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11316$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011317if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011320
11321fi
11322
Michael W. Hudson54241132001-12-07 15:38:26 +000011323
Guido van Rossumda88dad1995-01-26 00:46:29 +000011324works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11326$as_echo_n "checking for working volatile... " >&6; }
11327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011328/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011329
Martin v. Löwis11437992002-04-12 09:54:03 +000011330int
11331main ()
11332{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011333volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 ;
11335 return 0;
11336}
11337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011338if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011339 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011340else
Skip Montanaro6dead952003-09-25 14:50:04 +000011341
Matthias Kloseb9621712010-04-24 17:59:49 +000011342$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011343
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011344
Guido van Rossum627b2d71993-12-24 10:39:16 +000011345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11348$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011349
Guido van Rossumda88dad1995-01-26 00:46:29 +000011350works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11352$as_echo_n "checking for working signed char... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011355
Martin v. Löwis11437992002-04-12 09:54:03 +000011356int
11357main ()
11358{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011359signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011365 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011366else
Skip Montanaro6dead952003-09-25 14:50:04 +000011367
Matthias Kloseb9621712010-04-24 17:59:49 +000011368$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011369
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011370
Guido van Rossum7f43da71994-08-01 12:15:30 +000011371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11374$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011375
Guido van Rossumda88dad1995-01-26 00:46:29 +000011376have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11378$as_echo_n "checking for prototypes... " >&6; }
11379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011380/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011381int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011382int
11383main ()
11384{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011385return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ;
11387 return 0;
11388}
11389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011391
Matthias Kloseb9621712010-04-24 17:59:49 +000011392$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011393
Matthias Kloseb159a552010-04-25 21:00:44 +000011394 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11398$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011399
Guido van Rossumda88dad1995-01-26 00:46:29 +000011400works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11402$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011405
11406#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011407int foo(int x, ...) {
11408 va_list va;
11409 va_start(va, x);
11410 va_arg(va, int);
11411 va_arg(va, char *);
11412 va_arg(va, double);
11413 return 0;
11414}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011415
Martin v. Löwis11437992002-04-12 09:54:03 +000011416int
11417main ()
11418{
Guido van Rossum90eea071996-08-30 20:58:57 +000011419return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 ;
11421 return 0;
11422}
11423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
11426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011429 works=yes
11430
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11434$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435
Martin v. Löwisd6320502004-08-12 13:45:08 +000011436# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11438$as_echo_n "checking for socketpair... " >&6; }
11439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011440/* end confdefs.h. */
11441
11442#include <sys/types.h>
11443#include <sys/socket.h>
11444
11445int
11446main ()
11447{
11448void *x=socketpair
11449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011456
Matthias Kloseb159a552010-04-25 21:00:44 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011459else
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011462
11463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011465
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011466# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11468$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011470/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011471#include <sys/types.h>
11472#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011473int
11474main ()
11475{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011476struct sockaddr x;
11477x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 ;
11479 return 0;
11480}
11481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011482if ac_fn_c_try_compile "$LINENO"; then :
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11484$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011485
Matthias Kloseb9621712010-04-24 17:59:49 +000011486$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011487
11488else
Matthias Kloseb9621712010-04-24 17:59:49 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11490$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011491
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011494
Guido van Rossumda88dad1995-01-26 00:46:29 +000011495va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11497$as_echo_n "checking whether va_list is an array... " >&6; }
11498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011499/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500
11501#ifdef HAVE_STDARG_PROTOTYPES
11502#include <stdarg.h>
11503#else
11504#include <varargs.h>
11505#endif
11506
Martin v. Löwis11437992002-04-12 09:54:03 +000011507int
11508main ()
11509{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011510va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 ;
11512 return 0;
11513}
11514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011515if ac_fn_c_try_compile "$LINENO"; then :
11516
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011517else
Skip Montanaro6dead952003-09-25 14:50:04 +000011518
Martin v. Löwis11437992002-04-12 09:54:03 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011521
Guido van Rossumda88dad1995-01-26 00:46:29 +000011522 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011523
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11527$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011528
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011529# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
11531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011533if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011536
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11538$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011539 OLD_CFLAGS=$CFLAGS
11540 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011543
11544# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011545
Martin v. Löwis11437992002-04-12 09:54:03 +000011546int
11547main ()
11548{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011549
11550 char *name;
11551 struct hostent *he, *res;
11552 char buffer[2048];
11553 int buflen = 2048;
11554 int h_errnop;
11555
11556 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
11558 ;
11559 return 0;
11560}
11561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011565
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11570$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011572else
Skip Montanaro6dead952003-09-25 14:50:04 +000011573
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11577$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011579/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011581# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011582
Martin v. Löwis11437992002-04-12 09:54:03 +000011583int
11584main ()
11585{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011586
11587 char *name;
11588 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011589 char buffer[2048];
11590 int buflen = 2048;
11591 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011592
Matthias Kloseb159a552010-04-25 21:00:44 +000011593 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011594
11595 ;
11596 return 0;
11597}
11598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011602
Martin v. Löwis11437992002-04-12 09:54:03 +000011603
Matthias Kloseb159a552010-04-25 21:00:44 +000011604$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11607$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011609else
Skip Montanaro6dead952003-09-25 14:50:04 +000011610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11614$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11616/* end confdefs.h. */
11617
11618# include <netdb.h>
11619
11620int
11621main ()
11622{
11623
11624 char *name;
11625 struct hostent *he;
11626 struct hostent_data data;
11627
11628 (void) gethostbyname_r(name, he, &data);
11629
11630 ;
11631 return 0;
11632}
11633_ACEOF
11634if ac_fn_c_try_compile "$LINENO"; then :
11635
11636 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11637
11638
11639$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11640
11641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11642$as_echo "yes" >&6; }
11643
11644else
11645
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011651
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011657 CFLAGS=$OLD_CFLAGS
11658
11659else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 for ac_func in gethostbyname
11662do :
11663 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011664if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011666#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011667_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011668
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011669fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011670done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011671
Michael W. Hudson54241132001-12-07 15:38:26 +000011672
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011673fi
11674
Michael W. Hudson54241132001-12-07 15:38:26 +000011675
11676
11677
11678
11679
11680
Guido van Rossum627b2d71993-12-24 10:39:16 +000011681# checks for system services
11682# (none yet)
11683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011684# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011685ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011686if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011687
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011688else
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11690$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011691if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011693else
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011695LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011699/* Override any GCC internal prototype to avoid an error.
11700 Use char because int might match the return type of a GCC
11701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011702#ifdef __cplusplus
11703extern "C"
11704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011705char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011706int
11707main ()
11708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011709return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 ;
11711 return 0;
11712}
11713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011715 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011716else
Matthias Kloseb9621712010-04-24 17:59:49 +000011717 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011719rm -f core conftest.err conftest.$ac_objext \
11720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011721LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11724$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011725if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011726 cat >>confdefs.h <<_ACEOF
11727#define HAVE_LIBIEEE 1
11728_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011729
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011730 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011731
Guido van Rossum627b2d71993-12-24 10:39:16 +000011732fi
11733
Michael W. Hudson54241132001-12-07 15:38:26 +000011734
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011735fi
11736
Michael W. Hudson54241132001-12-07 15:38:26 +000011737
Guido van Rossum7f253911997-05-09 02:42:48 +000011738# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11740$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011743if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011745if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011746then
11747
Matthias Kloseb9621712010-04-24 17:59:49 +000011748$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011749
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11751$as_echo "yes" >&6; }
11752else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11753$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011754fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011755else
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11757$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011758fi
11759
Guido van Rossum7f253911997-05-09 02:42:48 +000011760
Guido van Rossum7f43da71994-08-01 12:15:30 +000011761# check for --with-libm=...
11762
Guido van Rossum563e7081996-09-10 18:20:48 +000011763case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011764Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011765*) LIBM=-lm
11766esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11768$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011772 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011773if test "$withval" = no
11774then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11776$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011777elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011778then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11780$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011781else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011782fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11785$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011786fi
11787
Guido van Rossum7f43da71994-08-01 12:15:30 +000011788
11789# check for --with-libc=...
11790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11792$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011795if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011796 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011797if test "$withval" = no
11798then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11800$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011801elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011802then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11804$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011805else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011806fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11809$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011810fi
11811
Guido van Rossum7f43da71994-08-01 12:15:30 +000011812
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011813# **************************************************
11814# * Check for various properties of floating point *
11815# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11818$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011819if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011821else
11822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011824 ac_cv_little_endian_double=no
11825else
Matthias Kloseb9621712010-04-24 17:59:49 +000011826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011827/* end confdefs.h. */
11828
11829#include <string.h>
11830int main() {
11831 double x = 9006104071832581.0;
11832 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11833 return 0;
11834 else
11835 return 1;
11836}
11837
11838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011839if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011840 ac_cv_little_endian_double=yes
11841else
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846fi
11847
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011848fi
11849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11851$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011852if test "$ac_cv_little_endian_double" = yes
11853then
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011856
11857fi
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11860$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011861if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011863else
11864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011866 ac_cv_big_endian_double=no
11867else
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011869/* end confdefs.h. */
11870
11871#include <string.h>
11872int main() {
11873 double x = 9006104071832581.0;
11874 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11875 return 0;
11876 else
11877 return 1;
11878}
11879
11880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011881if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011882 ac_cv_big_endian_double=yes
11883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11887 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011888fi
11889
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011890fi
11891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11893$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011894if test "$ac_cv_big_endian_double" = yes
11895then
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011898
11899fi
11900
11901# Some ARM platforms use a mixed-endian representation for doubles.
11902# While Python doesn't currently have full support for these platforms
11903# (see e.g., issue 1762561), we can at least make sure that float <-> string
11904# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11906$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011907if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011909else
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011912 ac_cv_mixed_endian_double=no
11913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011915/* end confdefs.h. */
11916
11917#include <string.h>
11918int main() {
11919 double x = 9006104071832581.0;
11920 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11921 return 0;
11922 else
11923 return 1;
11924}
11925
11926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011927if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011928 ac_cv_mixed_endian_double=yes
11929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011934fi
11935
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011936fi
11937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11939$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011940if test "$ac_cv_mixed_endian_double" = yes
11941then
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011944
11945fi
11946
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011947# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011948# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011949# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011950# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011951# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011952# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011953
11954# This inline assembler syntax may also work for suncc and icc,
11955# so we try it on all platforms.
11956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11958$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011960/* end confdefs.h. */
11961
11962int
11963main ()
11964{
11965
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011966 unsigned short cw;
11967 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11968 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011969
11970 ;
11971 return 0;
11972}
11973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011974if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011975 have_gcc_asm_for_x87=yes
11976else
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011978fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11981$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011982if test "$have_gcc_asm_for_x87" = yes
11983then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011986
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011988
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011989# Detect whether system arithmetic is subject to x87-style double
11990# rounding issues. The result of this test has little meaning on non
11991# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11992# mode is round-to-nearest and double rounding issues are present, and
11993# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11995$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011996# $BASECFLAGS may affect the result
11997ac_save_cc="$CC"
11998CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011999if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012000 ac_cv_x87_double_rounding=no
12001else
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012003/* end confdefs.h. */
12004
12005#include <stdlib.h>
12006#include <math.h>
12007int main() {
12008 volatile double x, y, z;
12009 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12010 x = 0.99999999999999989; /* 1-2**-53 */
12011 y = 1./x;
12012 if (y != 1.)
12013 exit(0);
12014 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12015 x = 1e16;
12016 y = 2.99999;
12017 z = x + y;
12018 if (z != 1e16+4.)
12019 exit(0);
12020 /* both tests show evidence of double rounding */
12021 exit(1);
12022}
12023
12024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012025if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012026 ac_cv_x87_double_rounding=no
12027else
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12031 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012032fi
12033
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012034CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12036$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012037if test "$ac_cv_x87_double_rounding" = yes
12038then
12039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012041
12042fi
12043
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012044# ************************************
12045# * Check for mathematical functions *
12046# ************************************
12047
12048LIBS_SAVE=$LIBS
12049LIBS="$LIBS $LIBM"
12050
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012051for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12052do :
12053 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12054ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012055if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012056 cat >>confdefs.h <<_ACEOF
12057#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12058_ACEOF
12059
12060fi
12061done
12062
12063for ac_func in hypot lgamma log1p round tgamma
12064do :
12065 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12066ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012067if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012068 cat >>confdefs.h <<_ACEOF
12069#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12070_ACEOF
12071
12072fi
12073done
12074
12075ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12076"
Gregory P. Smith69140482012-01-16 02:05:55 -080012077if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012078 ac_have_decl=1
12079else
12080 ac_have_decl=0
12081fi
12082
12083cat >>confdefs.h <<_ACEOF
12084#define HAVE_DECL_ISINF $ac_have_decl
12085_ACEOF
12086ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12087"
Gregory P. Smith69140482012-01-16 02:05:55 -080012088if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012089 ac_have_decl=1
12090else
12091 ac_have_decl=0
12092fi
12093
12094cat >>confdefs.h <<_ACEOF
12095#define HAVE_DECL_ISNAN $ac_have_decl
12096_ACEOF
12097ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12098"
Gregory P. Smith69140482012-01-16 02:05:55 -080012099if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012100 ac_have_decl=1
12101else
12102 ac_have_decl=0
12103fi
12104
12105cat >>confdefs.h <<_ACEOF
12106#define HAVE_DECL_ISFINITE $ac_have_decl
12107_ACEOF
12108
12109
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012110# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12111# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12113$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012114if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012116else
12117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012119 ac_cv_tanh_preserves_zero_sign=no
12120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012122/* end confdefs.h. */
12123
12124#include <math.h>
12125#include <stdlib.h>
12126int main() {
12127 /* return 0 if either negative zeros don't exist
12128 on this platform or if negative zeros exist
12129 and tanh(-0.) == -0. */
12130 if (atan2(0., -1.) == atan2(-0., -1.) ||
12131 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12132 else exit(1);
12133}
12134
12135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012136if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012137 ac_cv_tanh_preserves_zero_sign=yes
12138else
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012143fi
12144
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012145fi
12146
Matthias Kloseb9621712010-04-24 17:59:49 +000012147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12148$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012149if test "$ac_cv_tanh_preserves_zero_sign" = yes
12150then
12151
Matthias Kloseb9621712010-04-24 17:59:49 +000012152$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012153
12154fi
12155
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012156if test "$ac_cv_func_log1p" = yes
12157then
12158 # On some versions of AIX, log1p(-0.) returns 0. instead of
12159 # -0. See issue #9920.
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12161$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012162 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012163 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012164else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012165
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012166 if test "$cross_compiling" = yes; then :
12167 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012168else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12170/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012171
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012172 #include <math.h>
12173 #include <stdlib.h>
12174 int main() {
12175 /* Fail if the signs of log1p(-0.) and -0. can be
12176 distinguished. */
12177 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12178 return 0;
12179 else
12180 return 1;
12181 }
12182
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012183_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012184if ac_fn_c_try_run "$LINENO"; then :
12185 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012186else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012187 ac_cv_log1p_drops_zero_sign=yes
12188fi
12189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012191fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012192
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012193fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012194
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12196$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12197fi
12198if test "$ac_cv_log1p_drops_zero_sign" = yes
12199then
12200
12201$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12202
12203fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012204
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012205LIBS=$LIBS_SAVE
12206
Mark Dickinsona614f042009-11-28 12:48:43 +000012207# For multiprocessing module, check that sem_open
12208# actually works. For FreeBSD versions <= 7.2,
12209# the kernel module that provides POSIX semaphores
12210# isn't loaded by default, so an attempt to call
12211# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12213$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012214if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012216else
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012218 ac_cv_posix_semaphores_enabled=yes
12219else
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012221/* end confdefs.h. */
12222
12223#include <unistd.h>
12224#include <fcntl.h>
12225#include <stdio.h>
12226#include <semaphore.h>
12227#include <sys/stat.h>
12228
12229int main(void) {
12230 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12231 if (a == SEM_FAILED) {
12232 perror("sem_open");
12233 return 1;
12234 }
12235 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012236 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012237 return 0;
12238}
12239
12240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012241if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012242 ac_cv_posix_semaphores_enabled=yes
12243else
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012248fi
12249
12250
Mark Dickinsona614f042009-11-28 12:48:43 +000012251fi
12252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12254$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012255if test $ac_cv_posix_semaphores_enabled = no
12256then
12257
Matthias Kloseb9621712010-04-24 17:59:49 +000012258$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012259
12260fi
12261
Mark Dickinson10683072009-04-18 21:18:19 +000012262# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12264$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012265if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012267else
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012269 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012270else
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012272/* end confdefs.h. */
12273
12274#include <unistd.h>
12275#include <fcntl.h>
12276#include <stdio.h>
12277#include <semaphore.h>
12278#include <sys/stat.h>
12279
12280int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012281 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012282 int count;
12283 int res;
12284 if(a==SEM_FAILED){
12285 perror("sem_open");
12286 return 1;
12287
12288 }
12289 res = sem_getvalue(a, &count);
12290 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012291 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012292 return res==-1 ? 1 : 0;
12293}
12294
Mark Dickinson10683072009-04-18 21:18:19 +000012295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012296if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012297 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012298else
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12302 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012303fi
12304
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012305
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012306fi
12307
Matthias Kloseb9621712010-04-24 17:59:49 +000012308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12309$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012310if test $ac_cv_broken_sem_getvalue = yes
12311then
12312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012314
12315fi
12316
Mark Dickinsonbd792642009-03-18 20:06:12 +000012317# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12319$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012320# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012321if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012322 enableval=$enable_big_digits; case $enable_big_digits in
12323yes)
12324 enable_big_digits=30 ;;
12325no)
12326 enable_big_digits=15 ;;
1232715|30)
12328 ;;
12329*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012330 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 +000012331esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12333$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012334
12335cat >>confdefs.h <<_ACEOF
12336#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12337_ACEOF
12338
12339
12340else
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12342$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012343fi
12344
12345
Guido van Rossumef2255b2000-03-10 22:30:29 +000012346# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012347ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012348if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
12350
Matthias Kloseb9621712010-04-24 17:59:49 +000012351$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012353 wchar_h="yes"
12354
Guido van Rossumef2255b2000-03-10 22:30:29 +000012355else
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012357
12358fi
12359
Michael W. Hudson54241132001-12-07 15:38:26 +000012360
Martin v. Löwis11437992002-04-12 09:54:03 +000012361
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012362# determine wchar_t size
12363if test "$wchar_h" = yes
12364then
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12367# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12368# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12370$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012371if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012372 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012373else
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12375"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377else
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 if test "$ac_cv_type_wchar_t" = yes; then
12379 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12380$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012381as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012382See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383 else
12384 ac_cv_sizeof_wchar_t=0
12385 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012387
Martin v. Löwis11437992002-04-12 09:54:03 +000012388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12390$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391
12392
12393
Martin v. Löwis11437992002-04-12 09:54:03 +000012394cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012395#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012396_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012397
Michael W. Hudson54241132001-12-07 15:38:26 +000012398
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012399fi
12400
Matthias Kloseb9621712010-04-24 17:59:49 +000012401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12402$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012403have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012405/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012406
12407#include <tcl.h>
12408#if TCL_UTF_MAX != 6
12409# error "NOT UCS4_TCL"
12410#endif
12411int
12412main ()
12413{
12414
12415 ;
12416 return 0;
12417}
12418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012420
12421
Matthias Kloseb9621712010-04-24 17:59:49 +000012422$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012423
12424 have_ucs4_tcl=yes
12425
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12429$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012430
Skip Montanaro6dead952003-09-25 14:50:04 +000012431# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012432if test "$wchar_h" = yes
12433then
12434 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12436$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012437 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012439else
12440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012442 ac_cv_wchar_t_signed=yes
12443else
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012445/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012446
12447 #include <wchar.h>
12448 int main()
12449 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012450 /* Success: exit code 0 */
12451 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012452 }
12453
12454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012455if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012456 ac_cv_wchar_t_signed=yes
12457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12461 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012462fi
12463
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012464fi
12465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12467$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468fi
12469
Matthias Kloseb9621712010-04-24 17:59:49 +000012470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12471$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012472
12473# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012474if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012475 withval=$with_wide_unicode;
12476if test "$withval" != no
12477then unicode_size="4"
12478else unicode_size="2"
12479fi
12480
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012481else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482
Georg Brandl52d168a2008-01-07 18:10:24 +000012483case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012484 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012485 *) unicode_size="2" ;;
12486esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012487
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012488fi
12489
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012490
12491
Georg Brandl52d168a2008-01-07 18:10:24 +000012492case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012493 4)
12494 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12495
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012496 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012497 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012499 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012500esac
12501
Michael W. Hudson54241132001-12-07 15:38:26 +000012502
Martin v. Löwis11437992002-04-12 09:54:03 +000012503
Georg Brandl52d168a2008-01-07 18:10:24 +000012504# wchar_t is only usable if it maps to an unsigned type
12505if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012506 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012507then
12508 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012513
Georg Brandl52d168a2008-01-07 18:10:24 +000012514elif test "$ac_cv_sizeof_short" = "$unicode_size"
12515then
12516 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012518
Georg Brandl52d168a2008-01-07 18:10:24 +000012519elif test "$ac_cv_sizeof_long" = "$unicode_size"
12520then
12521 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012523
Georg Brandl52d168a2008-01-07 18:10:24 +000012524else
12525 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12528$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012529
12530# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12532$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012533if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 ac_cv_c_bigendian=unknown
12537 # See if we're dealing with a universal compiler.
12538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12539/* end confdefs.h. */
12540#ifndef __APPLE_CC__
12541 not a universal capable compiler
12542 #endif
12543 typedef int dummy;
12544
Skip Montanaro6dead952003-09-25 14:50:04 +000012545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012546if ac_fn_c_try_compile "$LINENO"; then :
12547
12548 # Check for potential -arch flags. It is not universal unless
12549 # there are at least two -arch flags with different values.
12550 ac_arch=
12551 ac_prev=
12552 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12553 if test -n "$ac_prev"; then
12554 case $ac_word in
12555 i?86 | x86_64 | ppc | ppc64)
12556 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12557 ac_arch=$ac_word
12558 else
12559 ac_cv_c_bigendian=universal
12560 break
12561 fi
12562 ;;
12563 esac
12564 ac_prev=
12565 elif test "x$ac_word" = "x-arch"; then
12566 ac_prev=arch
12567 fi
12568 done
12569fi
12570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12571 if test $ac_cv_c_bigendian = unknown; then
12572 # See if sys/param.h defines the BYTE_ORDER macro.
12573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012574/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012575#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012577
Martin v. Löwis11437992002-04-12 09:54:03 +000012578int
12579main ()
12580{
Matthias Kloseb9621712010-04-24 17:59:49 +000012581#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12582 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12583 && LITTLE_ENDIAN)
12584 bogus endian macros
12585 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012586
12587 ;
12588 return 0;
12589}
12590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012591if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012592 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012594/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012595#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012597
Martin v. Löwis11437992002-04-12 09:54:03 +000012598int
12599main ()
12600{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012601#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 not big endian
12603 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012604
12605 ;
12606 return 0;
12607}
12608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012609if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012610 ac_cv_c_bigendian=yes
12611else
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012615fi
12616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12617 fi
12618 if test $ac_cv_c_bigendian = unknown; then
12619 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012622#include <limits.h>
12623
Martin v. Löwis11437992002-04-12 09:54:03 +000012624int
12625main ()
12626{
Matthias Kloseb9621712010-04-24 17:59:49 +000012627#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12628 bogus endian macros
12629 #endif
12630
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
12633}
12634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012635if ac_fn_c_try_compile "$LINENO"; then :
12636 # It does; now see whether it defined to _BIG_ENDIAN or not.
12637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12638/* end confdefs.h. */
12639#include <limits.h>
12640
12641int
12642main ()
12643{
12644#ifndef _BIG_ENDIAN
12645 not big endian
12646 #endif
12647
12648 ;
12649 return 0;
12650}
12651_ACEOF
12652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012654else
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12658fi
12659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12660 fi
12661 if test $ac_cv_c_bigendian = unknown; then
12662 # Compile a test program.
12663 if test "$cross_compiling" = yes; then :
12664 # Try to guess by grepping values from an object file.
12665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666/* end confdefs.h. */
12667short int ascii_mm[] =
12668 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12669 short int ascii_ii[] =
12670 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12671 int use_ascii (int i) {
12672 return ascii_mm[i] + ascii_ii[i];
12673 }
12674 short int ebcdic_ii[] =
12675 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12676 short int ebcdic_mm[] =
12677 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12678 int use_ebcdic (int i) {
12679 return ebcdic_mm[i] + ebcdic_ii[i];
12680 }
12681 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682
Matthias Kloseb9621712010-04-24 17:59:49 +000012683int
12684main ()
12685{
12686return use_ascii (foo) == use_ebcdic (foo);
12687 ;
12688 return 0;
12689}
12690_ACEOF
12691if ac_fn_c_try_compile "$LINENO"; then :
12692 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12693 ac_cv_c_bigendian=yes
12694 fi
12695 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12696 if test "$ac_cv_c_bigendian" = unknown; then
12697 ac_cv_c_bigendian=no
12698 else
12699 # finding both strings is unlikely to happen, but who knows?
12700 ac_cv_c_bigendian=unknown
12701 fi
12702 fi
12703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012705else
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012707/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012709int
12710main ()
12711{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 /* Are we little or big endian? From Harbison&Steele. */
12714 union
12715 {
12716 long int l;
12717 char c[sizeof (long int)];
12718 } u;
12719 u.l = 1;
12720 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721
12722 ;
12723 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012724}
Martin v. Löwis11437992002-04-12 09:54:03 +000012725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012727 ac_cv_c_bigendian=no
12728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12738$as_echo "$ac_cv_c_bigendian" >&6; }
12739 case $ac_cv_c_bigendian in #(
12740 yes)
12741 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12742;; #(
12743 no)
12744 ;; #(
12745 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 ;; #(
12750 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012751 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012752 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012754
Michael W. Hudson54241132001-12-07 15:38:26 +000012755
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012756# ABI version string for Python extension modules. This appears between the
12757# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12758# from the following attributes which affect the ABI of this Python build (in
12759# this order):
12760#
12761# * The Python implementation (always 'cpython-' for us)
12762# * The major and minor version numbers
12763# * --with-pydebug (adds a 'd')
12764# * --with-pymalloc (adds a 'm')
12765# * --with-wide-unicode (adds a 'u')
12766#
12767# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012768# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12769# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012770
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12772$as_echo_n "checking ABIFLAGS... " >&6; }
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12774$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12776$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012777SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12779$as_echo "$SOABI" >&6; }
12780
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12782$as_echo_n "checking LDVERSION... " >&6; }
12783LDVERSION='$(VERSION)$(ABIFLAGS)'
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12785$as_echo "$LDVERSION" >&6; }
12786
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012787# SO is the extension of shared libraries `(including the dot!)
12788# -- usually .so, .sl on HP-UX, .dll on Cygwin
12789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12790$as_echo_n "checking SO... " >&6; }
12791if test -z "$SO"
12792then
12793 case $ac_sys_system in
12794 hp*|HP*)
12795 case `uname -m` in
12796 ia64) SO=.so;;
12797 *) SO=.sl;;
12798 esac
12799 ;;
12800 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012801 Linux*|GNU*)
12802 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012803 *) SO=.so;;
12804 esac
12805else
12806 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012807 echo
12808 echo '====================================================================='
12809 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012810 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012811 echo '+ Do you really mean to change the extension for shared libraries? +'
12812 echo '+ Continuing in 10 seconds to let you to ponder. +'
12813 echo '+ +'
12814 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012815 sleep 10
12816fi
12817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12818$as_echo "$SO" >&6; }
12819
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012820# Check whether right shifting a negative integer extends the sign bit
12821# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12823$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012824if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012826else
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012829 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012830else
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012832/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012833
12834int main()
12835{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012836 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012837}
12838
Martin v. Löwis11437992002-04-12 09:54:03 +000012839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012840if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012841 ac_cv_rshift_extends_sign=yes
12842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012847fi
12848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849fi
12850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12852$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012853if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012854then
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012857
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012858fi
12859
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012860# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12862$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012863if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012865else
Martin v. Löwis11437992002-04-12 09:54:03 +000012866
Matthias Kloseb9621712010-04-24 17:59:49 +000012867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012868/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012869#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870int
12871main ()
12872{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012873
12874 FILE *f = fopen("/dev/null", "r");
12875 flockfile(f);
12876 getc_unlocked(f);
12877 funlockfile(f);
12878
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ;
12880 return 0;
12881}
12882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012883if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012884 ac_cv_have_getc_unlocked=yes
12885else
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 ac_cv_have_getc_unlocked=no
12887fi
12888rm -f core conftest.err conftest.$ac_objext \
12889 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12893$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012894if test "$ac_cv_have_getc_unlocked" = yes
12895then
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012898
12899fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012900
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012901# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012902# save the value of LIBS so we don't actually link Python with readline
12903LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012904
Gregory P. Smith18820942008-09-07 06:24:49 +000012905# On some systems we need to link readline to a termcap compatible
12906# library. NOTE: Keep the precedence of listed libraries synchronised
12907# with setup.py.
12908py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12910$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012911for py_libtermcap in "" ncursesw ncurses curses termcap; do
12912 if test -z "$py_libtermcap"; then
12913 READLINE_LIBS="-lreadline"
12914 else
12915 READLINE_LIBS="-lreadline -l$py_libtermcap"
12916 fi
12917 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012919/* end confdefs.h. */
12920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921/* Override any GCC internal prototype to avoid an error.
12922 Use char because int might match the return type of a GCC
12923 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012924#ifdef __cplusplus
12925extern "C"
12926#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012927char readline ();
12928int
12929main ()
12930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012932 ;
12933 return 0;
12934}
12935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012936if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012937 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012939rm -f core conftest.err conftest.$ac_objext \
12940 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012941 if test $py_cv_lib_readline = yes; then
12942 break
12943 fi
12944done
12945# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12946#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012947if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12949$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012950else
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12952$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012953
Matthias Kloseb9621712010-04-24 17:59:49 +000012954$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012955
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012956fi
12957
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012958# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12960$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012961if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012963else
12964 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012965LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012967/* end confdefs.h. */
12968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969/* Override any GCC internal prototype to avoid an error.
12970 Use char because int might match the return type of a GCC
12971 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012972#ifdef __cplusplus
12973extern "C"
12974#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012975char rl_callback_handler_install ();
12976int
12977main ()
12978{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012980 ;
12981 return 0;
12982}
12983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012984if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012985 ac_cv_lib_readline_rl_callback_handler_install=yes
12986else
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012989rm -f core conftest.err conftest.$ac_objext \
12990 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012991LIBS=$ac_check_lib_save_LIBS
12992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12994$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012995if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012998
12999fi
13000
13001
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013002# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013005#include <readline/readline.h>
13006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013007if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013008 have_readline=yes
13009else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013010 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013011
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013012fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013013rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013014if test $have_readline = yes
13015then
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013017/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013018#include <readline/readline.h>
13019
13020_ACEOF
13021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013025
13026fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013027rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013030/* end confdefs.h. */
13031#include <readline/readline.h>
13032
13033_ACEOF
13034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013038
13039fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013040rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013041
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013042fi
13043
Martin v. Löwis0daad592001-09-30 21:09:59 +000013044# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13046$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013047if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013049else
Martin v. Löwis11437992002-04-12 09:54:03 +000013050 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013051LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055/* Override any GCC internal prototype to avoid an error.
13056 Use char because int might match the return type of a GCC
13057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013058#ifdef __cplusplus
13059extern "C"
13060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013061char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013062int
13063main ()
13064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013066 ;
13067 return 0;
13068}
13069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013070if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013072else
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013075rm -f core conftest.err conftest.$ac_objext \
13076 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013077LIBS=$ac_check_lib_save_LIBS
13078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13080$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013081if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013082
Matthias Kloseb9621712010-04-24 17:59:49 +000013083$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013084
Martin v. Löwis0daad592001-09-30 21:09:59 +000013085fi
13086
Michael W. Hudson54241132001-12-07 15:38:26 +000013087
Thomas Wouters89d996e2007-09-08 17:39:28 +000013088# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13090$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013091if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013093else
13094 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013095LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013097/* end confdefs.h. */
13098
13099/* Override any GCC internal prototype to avoid an error.
13100 Use char because int might match the return type of a GCC
13101 builtin and then its argument prototype would still apply. */
13102#ifdef __cplusplus
13103extern "C"
13104#endif
13105char rl_completion_display_matches_hook ();
13106int
13107main ()
13108{
13109return rl_completion_display_matches_hook ();
13110 ;
13111 return 0;
13112}
13113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013114if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013115 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13116else
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013119rm -f core conftest.err conftest.$ac_objext \
13120 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013121LIBS=$ac_check_lib_save_LIBS
13122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13124$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013125if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013128
13129fi
13130
13131
Martin v. Löwis0daad592001-09-30 21:09:59 +000013132# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13134$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013135if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013137else
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013139LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143/* Override any GCC internal prototype to avoid an error.
13144 Use char because int might match the return type of a GCC
13145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013146#ifdef __cplusplus
13147extern "C"
13148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013149char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013150int
13151main ()
13152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 ;
13155 return 0;
13156}
13157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013158if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013160else
Matthias Kloseb9621712010-04-24 17:59:49 +000013161 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013163rm -f core conftest.err conftest.$ac_objext \
13164 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013165LIBS=$ac_check_lib_save_LIBS
13166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13168$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013169if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013172
Guido van Rossum353ae582001-07-10 16:45:32 +000013173fi
13174
Jack Jansendd19cf82001-12-06 22:36:17 +000013175
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013176# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013178/* end confdefs.h. */
13179#include <readline/readline.h>
13180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013182 have_readline=yes
13183else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013184 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013185
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013186fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013187rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013188if test $have_readline = yes
13189then
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013191/* end confdefs.h. */
13192#include <readline/readline.h>
13193
13194_ACEOF
13195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013196 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013199
13200fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013201rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013202
13203fi
13204
Martin v. Löwis82bca632006-02-10 20:49:30 +000013205# End of readline checks: restore LIBS
13206LIBS=$LIBS_no_readline
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13209$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013210if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013212else
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013215 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013218/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013219
13220int main()
13221{
13222 int val1 = nice(1);
13223 if (val1 != -1 && val1 == nice(2))
13224 exit(0);
13225 exit(1);
13226}
13227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013229if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013230 ac_cv_broken_nice=yes
13231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13235 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013236fi
13237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013238fi
13239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13241$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013242if test "$ac_cv_broken_nice" = yes
13243then
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013246
13247fi
13248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13250$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013251if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013255 ac_cv_broken_poll=no
13256else
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013258/* end confdefs.h. */
13259
13260#include <poll.h>
13261
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013262int main()
13263{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013264 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013266
13267 close (42);
13268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013269 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013270 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013272 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013273 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013274 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013275 return 1;
13276}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013277
13278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013279if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013280 ac_cv_broken_poll=yes
13281else
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13285 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013287
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013288fi
13289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13291$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013292if test "$ac_cv_broken_poll" = yes
13293then
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013296
13297fi
13298
Brett Cannon43802422005-02-10 20:48:03 +000013299# 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 +000013300# (which is not required by ISO C or UNIX spec) and/or if we support
13301# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013302ac_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 +000013303#include <$ac_cv_struct_tm>
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305"
Gregory P. Smith69140482012-01-16 02:05:55 -080013306if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013307
13308cat >>confdefs.h <<_ACEOF
13309#define HAVE_STRUCT_TM_TM_ZONE 1
13310_ACEOF
13311
13312
13313fi
13314
13315if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013318
13319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13321"
Gregory P. Smith69140482012-01-16 02:05:55 -080013322if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326fi
13327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013329#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330_ACEOF
13331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13333$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013334if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013338/* end confdefs.h. */
13339#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340#if !HAVE_DECL_TZNAME
13341extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013342#endif
13343
13344int
13345main ()
13346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013348 ;
13349 return 0;
13350}
13351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013352if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013353 ac_cv_var_tzname=yes
13354else
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013357rm -f core conftest.err conftest.$ac_objext \
13358 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13361$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013362 if test $ac_cv_var_tzname = yes; then
13363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013365
13366 fi
13367fi
13368
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013369
Martin v. Löwis1d459062005-03-14 21:23:33 +000013370# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13372$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013373if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013375else
13376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013378 ac_cv_working_tzset=no
13379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013381/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013382
13383#include <stdlib.h>
13384#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013385#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013386
13387#if HAVE_TZNAME
13388extern char *tzname[];
13389#endif
13390
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013391int main()
13392{
Brett Cannon18367812003-09-19 00:59:16 +000013393 /* Note that we need to ensure that not only does tzset(3)
13394 do 'something' with localtime, but it works as documented
13395 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013396 This includes making sure that tzname is set properly if
13397 tm->tm_zone does not exist since it is the alternative way
13398 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013399
13400 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013401 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013402 */
13403
Martin v. Löwis1d459062005-03-14 21:23:33 +000013404 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013405 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13406
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013407 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013408 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013409 if (localtime(&groundhogday)->tm_hour != 0)
13410 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013411#if HAVE_TZNAME
13412 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13413 if (strcmp(tzname[0], "UTC") ||
13414 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13415 exit(1);
13416#endif
Brett Cannon18367812003-09-19 00:59:16 +000013417
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013418 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013419 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013420 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013421 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013422#if HAVE_TZNAME
13423 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13424 exit(1);
13425#endif
Brett Cannon18367812003-09-19 00:59:16 +000013426
13427 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13428 tzset();
13429 if (localtime(&groundhogday)->tm_hour != 11)
13430 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013431#if HAVE_TZNAME
13432 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13433 exit(1);
13434#endif
13435
13436#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013437 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13438 exit(1);
13439 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13440 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013441#endif
Brett Cannon18367812003-09-19 00:59:16 +000013442
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013443 exit(0);
13444}
13445
13446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013447if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013448 ac_cv_working_tzset=yes
13449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013454fi
13455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013456fi
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13459$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013460if test "$ac_cv_working_tzset" = yes
13461then
13462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013464
13465fi
13466
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013467# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13469$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013470if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013474/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013475#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013476int
13477main ()
13478{
13479
13480struct stat st;
13481st.st_mtim.tv_nsec = 1;
13482
13483 ;
13484 return 0;
13485}
13486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013488 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013489else
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13493fi
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13496$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013497if test "$ac_cv_stat_tv_nsec" = yes
13498then
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013501
13502fi
13503
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013504# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13506$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013507if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013511/* end confdefs.h. */
13512#include <sys/stat.h>
13513int
13514main ()
13515{
13516
13517struct stat st;
13518st.st_mtimespec.tv_nsec = 1;
13519
13520 ;
13521 return 0;
13522}
13523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013525 ac_cv_stat_tv_nsec2=yes
13526else
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13530fi
13531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13533$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013534if test "$ac_cv_stat_tv_nsec2" = yes
13535then
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013538
13539fi
13540
Jack Jansen666b1e72001-10-31 12:11:48 +000013541# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13543$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013544if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013548/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013549#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013550int
13551main ()
13552{
Jack Jansen666b1e72001-10-31 12:11:48 +000013553
13554 int rtn;
13555 rtn = mvwdelch(0,0,0);
13556
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 ;
13558 return 0;
13559}
13560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013561if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013562 ac_cv_mvwdelch_is_expression=yes
13563else
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13567fi
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13570$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013571
13572if test "$ac_cv_mvwdelch_is_expression" = yes
13573then
Martin v. Löwis11437992002-04-12 09:54:03 +000013574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013576
13577fi
13578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13580$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013581if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013585/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013586#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013587int
13588main ()
13589{
Jack Jansen666b1e72001-10-31 12:11:48 +000013590
13591 WINDOW *w;
13592 w->_flags = 0;
13593
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 ;
13595 return 0;
13596}
13597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013598if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013599 ac_cv_window_has_flags=yes
13600else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13604fi
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13607$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013608
Jack Jansen666b1e72001-10-31 12:11:48 +000013609
13610if test "$ac_cv_window_has_flags" = yes
13611then
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013614
13615fi
13616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13618$as_echo_n "checking for is_term_resized... " >&6; }
13619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013620/* end confdefs.h. */
13621#include <curses.h>
13622int
13623main ()
13624{
13625void *x=is_term_resized
13626 ;
13627 return 0;
13628}
13629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013633
Matthias Kloseb159a552010-04-25 21:00:44 +000013634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013636else
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13638$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013639
13640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13644$as_echo_n "checking for resize_term... " >&6; }
13645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013646/* end confdefs.h. */
13647#include <curses.h>
13648int
13649main ()
13650{
13651void *x=resize_term
13652 ;
13653 return 0;
13654}
13655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013656if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013659
Matthias Kloseb159a552010-04-25 21:00:44 +000013660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013661$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013662else
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13664$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013665
13666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13670$as_echo_n "checking for resizeterm... " >&6; }
13671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013672/* end confdefs.h. */
13673#include <curses.h>
13674int
13675main ()
13676{
13677void *x=resizeterm
13678 ;
13679 return 0;
13680}
13681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013682if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013685
Matthias Kloseb159a552010-04-25 21:00:44 +000013686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013687$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013688else
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13690$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013691
13692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13694
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13696$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013697
13698if test -r /dev/ptmx
13699then
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13701$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013704
Thomas Wouters89f507f2006-12-13 04:49:30 +000013705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13707$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013708fi
13709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13711$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013712
13713if test -r /dev/ptc
13714then
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13716$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013719
Thomas Wouters89f507f2006-12-13 04:49:30 +000013720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13722$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013723fi
13724
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013725if test "$have_long_long" = yes
13726then
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13728$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013729 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013731else
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013733 ac_cv_have_long_long_format=no
13734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013736/* end confdefs.h. */
13737
13738 #include <stdio.h>
13739 #include <stddef.h>
13740 #include <string.h>
13741
13742 #ifdef HAVE_SYS_TYPES_H
13743 #include <sys/types.h>
13744 #endif
13745
13746 int main()
13747 {
13748 char buffer[256];
13749
13750 if (sprintf(buffer, "%lld", (long long)123) < 0)
13751 return 1;
13752 if (strcmp(buffer, "123"))
13753 return 1;
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, "%llu", (unsigned long long)123) < 0)
13761 return 1;
13762 if (strcmp(buffer, "123"))
13763 return 1;
13764
13765 return 0;
13766 }
13767
13768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013769if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013770 ac_cv_have_long_long_format=yes
13771else
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13775 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013776fi
13777
13778
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013779fi
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13782$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013783fi
13784
Mark Dickinson89d7d412009-12-31 20:50:59 +000013785if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013786then
13787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013789
13790fi
13791
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013792if test $ac_sys_system = Darwin
13793then
13794 LIBS="$LIBS -framework CoreFoundation"
13795fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013796
Matthias Kloseb9621712010-04-24 17:59:49 +000013797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13798$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013799if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013801else
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013803 ac_cv_have_size_t_format="cross -- assuming yes"
13804
Thomas Wouters477c8d52006-05-27 19:21:47 +000013805else
Matthias Kloseb9621712010-04-24 17:59:49 +000013806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013807/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013808
Thomas Wouters477c8d52006-05-27 19:21:47 +000013809#include <stdio.h>
13810#include <stddef.h>
13811#include <string.h>
13812
Christian Heimes2c181612007-12-17 20:04:13 +000013813#ifdef HAVE_SYS_TYPES_H
13814#include <sys/types.h>
13815#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013816
13817#ifdef HAVE_SSIZE_T
13818typedef ssize_t Py_ssize_t;
13819#elif SIZEOF_VOID_P == SIZEOF_LONG
13820typedef long Py_ssize_t;
13821#else
13822typedef int Py_ssize_t;
13823#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013824
Christian Heimes2c181612007-12-17 20:04:13 +000013825int main()
13826{
13827 char buffer[256];
13828
Thomas Wouters477c8d52006-05-27 19:21:47 +000013829 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13830 return 1;
13831
Thomas Wouters89f507f2006-12-13 04:49:30 +000013832 if (strcmp(buffer, "123"))
13833 return 1;
13834
13835 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13836 return 1;
13837
13838 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013839 return 1;
13840
13841 return 0;
13842}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013843
Thomas Wouters477c8d52006-05-27 19:21:47 +000013844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013846 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013847else
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013852fi
13853
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13856$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013857if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013860
13861fi
13862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013864#ifdef HAVE_SYS_TYPES_H
13865#include <sys/types.h>
13866#endif
13867#ifdef HAVE_SYS_SOCKET_H
13868#include <sys/socket.h>
13869#endif
13870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871"
Gregory P. Smith69140482012-01-16 02:05:55 -080013872if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013875
Matthias Kloseb9621712010-04-24 17:59:49 +000013876$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013877
13878fi
13879
Michael W. Hudson54241132001-12-07 15:38:26 +000013880
Matthias Kloseb9621712010-04-24 17:59:49 +000013881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13882$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013883if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013885else
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013887 ac_cv_broken_mbstowcs=no
13888else
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013890/* end confdefs.h. */
13891
13892#include<stdlib.h>
13893int main() {
13894 size_t len = -1;
13895 const char *str = "text";
13896 len = mbstowcs(NULL, str, 0);
13897 return (len != 4);
13898}
13899
13900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013902 ac_cv_broken_mbstowcs=no
13903else
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013908fi
13909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013910fi
13911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13913$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013914if test "$ac_cv_broken_mbstowcs" = yes
13915then
13916
Matthias Kloseb9621712010-04-24 17:59:49 +000013917$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013918
13919fi
13920
Antoine Pitrou042b1282010-08-13 21:15:58 +000013921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13922$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013923if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013924 $as_echo_n "(cached) " >&6
13925else
13926 if test "$cross_compiling" = yes; then :
13927 ac_cv_computed_gotos=no
13928else
13929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13930/* end confdefs.h. */
13931
13932int main(int argc, char **argv)
13933{
13934 static void *targets[1] = { &&LABEL1 };
13935 goto LABEL2;
13936LABEL1:
13937 return 0;
13938LABEL2:
13939 goto *targets[0];
13940 return 1;
13941}
13942
13943_ACEOF
13944if ac_fn_c_try_run "$LINENO"; then :
13945 ac_cv_computed_gotos=yes
13946else
13947 ac_cv_computed_gotos=no
13948fi
13949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13950 conftest.$ac_objext conftest.beam conftest.$ac_ext
13951fi
13952
13953fi
13954
13955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13956$as_echo "$ac_cv_computed_gotos" >&6; }
13957if test "$ac_cv_computed_gotos" = yes
13958then
13959
13960$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13961
13962fi
13963
Antoine Pitroub52ec782009-01-25 16:34:23 +000013964# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13966$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013967
13968# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013969if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013970 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013971if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013972then
13973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13977$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013978fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013979if test "$withval" = no
13980then
13981
13982$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13985$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013986fi
13987
Antoine Pitrou042b1282010-08-13 21:15:58 +000013988else
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13990$as_echo "no value specified" >&6; }
13991fi
13992
Antoine Pitroub52ec782009-01-25 16:34:23 +000013993
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013994case $ac_sys_system in
13995AIX*)
13996
13997$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13998 ;;
13999esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014000
Michael W. Hudson54241132001-12-07 15:38:26 +000014001
Jesus Cea6a792292010-05-03 21:18:48 +000014002case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080014003 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 +000014004esac
14005
Gregory P. Smith138fa432010-12-13 08:00:52 +000014006ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080014007if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000014008
14009$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
14010
14011fi
Jesus Cea6a792292010-05-03 21:18:48 +000014012
14013
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014014
14015
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014016for h in `(cd $srcdir;echo Python/thread_*.h)`
14017do
14018 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14019done
14020
Michael W. Hudson54241132001-12-07 15:38:26 +000014021
Neal Norwitzd24499d2005-12-18 21:36:39 +000014022SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14024$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014025for dir in $SRCDIRS; do
14026 if test ! -d $dir; then
14027 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014028 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014029done
Matthias Kloseb9621712010-04-24 17:59:49 +000014030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14031$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014032
Guido van Rossum627b2d71993-12-24 10:39:16 +000014033# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014034ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014035
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014036ac_config_files="$ac_config_files Modules/ld_so_aix"
14037
Martin v. Löwis11437992002-04-12 09:54:03 +000014038cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014039# This file is a shell script that caches the results of configure
14040# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014041# scripts and configure runs, see configure's option --config-cache.
14042# It is not useful on other systems. If it contains results you don't
14043# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014044#
Martin v. Löwis11437992002-04-12 09:54:03 +000014045# config.status only pays attention to the cache file if you give it
14046# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014047#
Skip Montanaro6dead952003-09-25 14:50:04 +000014048# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014049# loading this file, other *unset* `ac_cv_foo' will be assigned the
14050# following values.
14051
14052_ACEOF
14053
Guido van Rossumf78abae1997-01-21 22:02:36 +000014054# The following way of writing the cache mishandles newlines in values,
14055# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014057# Ultrix sh set writes to stderr and can't be redirected directly,
14058# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059(
14060 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14061 eval ac_val=\$$ac_var
14062 case $ac_val in #(
14063 *${as_nl}*)
14064 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14066$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014067 esac
14068 case $ac_var in #(
14069 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14071 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072 esac ;;
14073 esac
14074 done
14075
Martin v. Löwis11437992002-04-12 09:54:03 +000014076 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14078 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 # `set' does not quote correctly, so add quotes: double-quote
14080 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014081 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014082 "s/'/'\\\\''/g;
14083 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014085 *)
14086 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014088 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089 esac |
14090 sort
14091) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014096 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14097 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14099 :end' >>confcache
14100if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14101 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014102 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14104$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014105 if test ! -f "$cache_file" || test -h "$cache_file"; then
14106 cat confcache >"$cache_file"
14107 else
14108 case $cache_file in #(
14109 */* | ?:*)
14110 mv -f confcache "$cache_file"$$ &&
14111 mv -f "$cache_file"$$ "$cache_file" ;; #(
14112 *)
14113 mv -f confcache "$cache_file" ;;
14114 esac
14115 fi
14116 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014117 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14119$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014120 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014121fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014122rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014123
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014124test "x$prefix" = xNONE && prefix=$ac_default_prefix
14125# Let make expand exec_prefix.
14126test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014127
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014128DEFS=-DHAVE_CONFIG_H
14129
Skip Montanaro6dead952003-09-25 14:50:04 +000014130ac_libobjs=
14131ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014132U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014133for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14134 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14138 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14140 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014141done
14142LIBOBJS=$ac_libobjs
14143
14144LTLIBOBJS=$ac_ltlibobjs
14145
14146
Martin v. Löwis11437992002-04-12 09:54:03 +000014147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148
Gregory P. Smith69140482012-01-16 02:05:55 -080014149: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014150ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014151ac_clean_files_save=$ac_clean_files
14152ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14154$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14155as_write_fail=0
14156cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014157#! $SHELL
14158# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014159# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014160# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014161# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014162
Martin v. Löwis11437992002-04-12 09:54:03 +000014163debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014164ac_cs_recheck=false
14165ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014166
Matthias Kloseb9621712010-04-24 17:59:49 +000014167SHELL=\${CONFIG_SHELL-$SHELL}
14168export SHELL
14169_ASEOF
14170cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14171## -------------------- ##
14172## M4sh Initialization. ##
14173## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175# Be more Bourne compatible
14176DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014177if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 emulate sh
14179 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014181 # is contrary to our usage. Disable this feature.
14182 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014183 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014184else
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 case `(set -o) 2>/dev/null` in #(
14186 *posix*) :
14187 set -o posix ;; #(
14188 *) :
14189 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014191fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014192
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194as_nl='
14195'
14196export as_nl
14197# Printing a long string crashes Solaris 7 /usr/bin/printf.
14198as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14199as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14200as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14201# Prefer a ksh shell builtin over an external printf program on Solaris,
14202# but without wasting forks for bash or zsh.
14203if test -z "$BASH_VERSION$ZSH_VERSION" \
14204 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14205 as_echo='print -r --'
14206 as_echo_n='print -rn --'
14207elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14208 as_echo='printf %s\n'
14209 as_echo_n='printf %s'
14210else
14211 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14212 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14213 as_echo_n='/usr/ucb/echo -n'
14214 else
14215 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14216 as_echo_n_body='eval
14217 arg=$1;
14218 case $arg in #(
14219 *"$as_nl"*)
14220 expr "X$arg" : "X\\(.*\\)$as_nl";
14221 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14222 esac;
14223 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14224 '
14225 export as_echo_n_body
14226 as_echo_n='sh -c $as_echo_n_body as_echo'
14227 fi
14228 export as_echo_body
14229 as_echo='sh -c $as_echo_body as_echo'
14230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014231
14232# The user is always right.
14233if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 PATH_SEPARATOR=:
14235 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14236 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14237 PATH_SEPARATOR=';'
14238 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241
14242# IFS
14243# We need space, tab and new line, in precisely that order. Quoting is
14244# there to prevent editors from complaining about space-tab.
14245# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14246# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247IFS=" "" $as_nl"
14248
14249# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014250as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014251case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252 *[\\/]* ) as_myself=$0 ;;
14253 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014254for as_dir in $PATH
14255do
14256 IFS=$as_save_IFS
14257 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14259 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262 ;;
14263esac
14264# We did not find ourselves, most probably we were run as `sh COMMAND'
14265# in which case we are not to be found in the path.
14266if test "x$as_myself" = x; then
14267 as_myself=$0
14268fi
14269if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14271 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272fi
14273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274# Unset variables that we do not need and which cause bugs (e.g. in
14275# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14276# suppresses any "Segmentation fault" message there. '((' could
14277# trigger a bug in pdksh 5.2.14.
14278for as_var in BASH_ENV ENV MAIL MAILPATH
14279do eval test x\${$as_var+set} = xset \
14280 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014281done
14282PS1='$ '
14283PS2='> '
14284PS4='+ '
14285
14286# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014287LC_ALL=C
14288export LC_ALL
14289LANGUAGE=C
14290export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292# CDPATH.
14293(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14294
14295
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014296# as_fn_error STATUS ERROR [LINENO LOG_FD]
14297# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014298# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14299# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014300# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014301as_fn_error ()
14302{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014303 as_status=$1; test $as_status -eq 0 && as_status=1
14304 if test "$4"; then
14305 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14306 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014308 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 as_fn_exit $as_status
14310} # as_fn_error
14311
14312
14313# as_fn_set_status STATUS
14314# -----------------------
14315# Set $? to STATUS, without forking.
14316as_fn_set_status ()
14317{
14318 return $1
14319} # as_fn_set_status
14320
14321# as_fn_exit STATUS
14322# -----------------
14323# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14324as_fn_exit ()
14325{
14326 set +e
14327 as_fn_set_status $1
14328 exit $1
14329} # as_fn_exit
14330
14331# as_fn_unset VAR
14332# ---------------
14333# Portably unset VAR.
14334as_fn_unset ()
14335{
14336 { eval $1=; unset $1;}
14337}
14338as_unset=as_fn_unset
14339# as_fn_append VAR VALUE
14340# ----------------------
14341# Append the text in VALUE to the end of the definition contained in VAR. Take
14342# advantage of any shell optimizations that allow amortized linear growth over
14343# repeated appends, instead of the typical quadratic growth present in naive
14344# implementations.
14345if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14346 eval 'as_fn_append ()
14347 {
14348 eval $1+=\$2
14349 }'
14350else
14351 as_fn_append ()
14352 {
14353 eval $1=\$$1\$2
14354 }
14355fi # as_fn_append
14356
14357# as_fn_arith ARG...
14358# ------------------
14359# Perform arithmetic evaluation on the ARGs, and store the result in the
14360# global $as_val. Take advantage of shells that can avoid forks. The arguments
14361# must be portable across $(()) and expr.
14362if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14363 eval 'as_fn_arith ()
14364 {
14365 as_val=$(( $* ))
14366 }'
14367else
14368 as_fn_arith ()
14369 {
14370 as_val=`expr "$@" || test $? -eq 1`
14371 }
14372fi # as_fn_arith
14373
14374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375if expr a : '\(a\)' >/dev/null 2>&1 &&
14376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14377 as_expr=expr
14378else
14379 as_expr=false
14380fi
14381
14382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14383 as_basename=basename
14384else
14385 as_basename=false
14386fi
14387
Matthias Kloseb9621712010-04-24 17:59:49 +000014388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14389 as_dirname=dirname
14390else
14391 as_dirname=false
14392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394as_me=`$as_basename -- "$0" ||
14395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14396 X"$0" : 'X\(//\)$' \| \
14397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014398$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399 sed '/^.*\/\([^/][^/]*\)\/*$/{
14400 s//\1/
14401 q
14402 }
14403 /^X\/\(\/\/\)$/{
14404 s//\1/
14405 q
14406 }
14407 /^X\/\(\/\).*/{
14408 s//\1/
14409 q
14410 }
14411 s/.*/./; q'`
14412
Matthias Kloseb9621712010-04-24 17:59:49 +000014413# Avoid depending upon Character Ranges.
14414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14417as_cr_digits='0123456789'
14418as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419
14420ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014421case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 xy) ECHO_C='\c';;
14426 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14427 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428 esac;;
14429*)
14430 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014432
Martin v. Löwis11437992002-04-12 09:54:03 +000014433rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434if test -d conf$$.dir; then
14435 rm -f conf$$.dir/conf$$.file
14436else
14437 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014440if (echo >conf$$.file) 2>/dev/null; then
14441 if ln -s conf$$.file conf$$ 2>/dev/null; then
14442 as_ln_s='ln -s'
14443 # ... but there are two gotchas:
14444 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14445 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14446 # In both cases, we have to default to `cp -p'.
14447 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14448 as_ln_s='cp -p'
14449 elif ln conf$$.file conf$$ 2>/dev/null; then
14450 as_ln_s=ln
14451 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014454else
14455 as_ln_s='cp -p'
14456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14458rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460
14461# as_fn_mkdir_p
14462# -------------
14463# Create "$as_dir" as a directory, including parents if necessary.
14464as_fn_mkdir_p ()
14465{
14466
14467 case $as_dir in #(
14468 -*) as_dir=./$as_dir;;
14469 esac
14470 test -d "$as_dir" || eval $as_mkdir_p || {
14471 as_dirs=
14472 while :; do
14473 case $as_dir in #(
14474 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14475 *) as_qdir=$as_dir;;
14476 esac
14477 as_dirs="'$as_qdir' $as_dirs"
14478 as_dir=`$as_dirname -- "$as_dir" ||
14479$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14480 X"$as_dir" : 'X\(//\)[^/]' \| \
14481 X"$as_dir" : 'X\(//\)$' \| \
14482 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14483$as_echo X"$as_dir" |
14484 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14485 s//\1/
14486 q
14487 }
14488 /^X\(\/\/\)[^/].*/{
14489 s//\1/
14490 q
14491 }
14492 /^X\(\/\/\)$/{
14493 s//\1/
14494 q
14495 }
14496 /^X\(\/\).*/{
14497 s//\1/
14498 q
14499 }
14500 s/.*/./; q'`
14501 test -d "$as_dir" && break
14502 done
14503 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014504 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014505
14506
14507} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014508if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014510else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014511 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014512 as_mkdir_p=false
14513fi
14514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515if test -x / >/dev/null 2>&1; then
14516 as_test_x='test -x'
14517else
14518 if ls -dL / >/dev/null 2>&1; then
14519 as_ls_L_option=L
14520 else
14521 as_ls_L_option=
14522 fi
14523 as_test_x='
14524 eval sh -c '\''
14525 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 case $1 in #(
14529 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532 ???[sx]*):;;*)false;;esac;fi
14533 '\'' sh
14534 '
14535fi
14536as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
14538# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014539as_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 +000014540
14541# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014542as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014543
14544
Martin v. Löwis11437992002-04-12 09:54:03 +000014545exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014546## ----------------------------------- ##
14547## Main body of $CONFIG_STATUS script. ##
14548## ----------------------------------- ##
14549_ASEOF
14550test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014551
Matthias Kloseb9621712010-04-24 17:59:49 +000014552cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14553# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014554# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555# values after options handling.
14556ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014557This file was extended by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -080014558generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014559
14560 CONFIG_FILES = $CONFIG_FILES
14561 CONFIG_HEADERS = $CONFIG_HEADERS
14562 CONFIG_LINKS = $CONFIG_LINKS
14563 CONFIG_COMMANDS = $CONFIG_COMMANDS
14564 $ $0 $@
14565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566on `(hostname || uname -n) 2>/dev/null | sed 1q`
14567"
14568
Martin v. Löwis11437992002-04-12 09:54:03 +000014569_ACEOF
14570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571case $ac_config_files in *"
14572"*) set x $ac_config_files; shift; ac_config_files=$*;;
14573esac
14574
14575case $ac_config_headers in *"
14576"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14577esac
14578
14579
14580cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014581# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014582config_files="$ac_config_files"
14583config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014588ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014589\`$as_me' instantiates files and other configuration actions
14590from templates according to the current configuration. Unless the files
14591and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
Matthias Kloseb9621712010-04-24 17:59:49 +000014593Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014594
14595 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 --config print configuration, then exit
14598 -q, --quiet, --silent
14599 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014600 -d, --debug don't remove temporary files
14601 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 --file=FILE[:TEMPLATE]
14603 instantiate the configuration file FILE
14604 --header=FILE[:TEMPLATE]
14605 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
14607Configuration files:
14608$config_files
14609
14610Configuration headers:
14611$config_headers
14612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014616cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14617ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014618ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014619python config.status 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -080014620configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014623Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014624This config.status script is free software; the Free Software Foundation
14625gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626
14627ac_pwd='$ac_pwd'
14628srcdir='$srcdir'
14629INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014630MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014631test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014632_ACEOF
14633
Matthias Kloseb9621712010-04-24 17:59:49 +000014634cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14635# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014636ac_need_defaults=:
14637while test $# != 0
14638do
14639 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014640 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14642 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014643 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014644 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014645 --*=)
14646 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14647 ac_optarg=
14648 ac_shift=:
14649 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014651 ac_option=$1
14652 ac_optarg=$2
14653 ac_shift=shift
14654 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 esac
14656
Skip Montanaro6dead952003-09-25 14:50:04 +000014657 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014658 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014659 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14660 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 $as_echo "$ac_cs_version"; exit ;;
14663 --config | --confi | --conf | --con | --co | --c )
14664 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 debug=: ;;
14667 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014668 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 case $ac_optarg in
14670 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014671 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 esac
14673 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 ac_need_defaults=false;;
14675 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014676 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 case $ac_optarg in
14678 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14679 esac
14680 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682 --he | --h)
14683 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014684 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014685Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014688 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14689 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14690 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014691
14692 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014693 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014694Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014698
14699 esac
14700 shift
14701done
14702
Skip Montanaro6dead952003-09-25 14:50:04 +000014703ac_configure_extra_args=
14704
14705if $ac_cs_silent; then
14706 exec 6>/dev/null
14707 ac_configure_extra_args="$ac_configure_extra_args --silent"
14708fi
14709
14710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014712if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14714 shift
14715 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14716 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014719fi
14720
Martin v. Löwis11437992002-04-12 09:54:03 +000014721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723exec 5>>config.log
14724{
14725 echo
14726 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14727## Running $as_me. ##
14728_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014733cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737
14738# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014739for ac_config_target in $ac_config_targets
14740do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014741 case $ac_config_target in
14742 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14743 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14744 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014745 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14746 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014747 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14748 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014749 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014750 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751
Gregory P. Smith69140482012-01-16 02:05:55 -080014752 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014753 esac
14754done
14755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014756
Martin v. Löwis11437992002-04-12 09:54:03 +000014757# If the user did not use the arguments to specify the items to instantiate,
14758# then the envvar interface is used. Set only those that are not.
14759# We use the long form for the default assignment because of an extremely
14760# bizarre bug on SunOS 4.1.3.
14761if $ac_need_defaults; then
14762 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14763 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14764fi
14765
Skip Montanaro6dead952003-09-25 14:50:04 +000014766# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014768# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769# Hook for its removal unless debugging.
14770# Note that there is a small window in which the directory will not be cleaned:
14771# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014772$debug ||
14773{
Gregory P. Smith69140482012-01-16 02:05:55 -080014774 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014776 : "${ac_tmp:=$tmp}"
14777 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014780}
Martin v. Löwis11437992002-04-12 09:54:03 +000014781# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014782
Martin v. Löwis11437992002-04-12 09:54:03 +000014783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014785 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014786} ||
14787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788 tmp=./conf$$-$RANDOM
14789 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014790} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014791ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793# Set up the scripts for CONFIG_FILES section.
14794# No need to generate them if there are no CONFIG_FILES.
14795# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798
14799ac_cr=`echo X | tr X '\015'`
14800# On cygwin, bash can eat \r inside `` if the user requested igncr.
14801# But we know of no other shell where ac_cr would be empty at this
14802# point, so we can use a bashism as a fallback.
14803if test "x$ac_cr" = x; then
14804 eval ac_cr=\$\'\\r\'
14805fi
14806ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14807if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014808 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014809else
14810 ac_cs_awk_cr=$ac_cr
14811fi
14812
Gregory P. Smith69140482012-01-16 02:05:55 -080014813echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014814_ACEOF
14815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817{
14818 echo "cat >conf$$subs.awk <<_ACEOF" &&
14819 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14820 echo "_ACEOF"
14821} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014822 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14823ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824ac_delim='%!_!# '
14825for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014827 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14830 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831 break
14832 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014833 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834 else
14835 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837done
Matthias Kloseb9621712010-04-24 17:59:49 +000014838rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014841cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014843sed -n '
14844h
14845s/^/S["/; s/!.*/"]=/
14846p
14847g
14848s/^[^!]*!//
14849:repl
14850t repl
14851s/'"$ac_delim"'$//
14852t delim
14853:nl
14854h
14855s/\(.\{148\}\)..*/\1/
14856t more1
14857s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14858p
14859n
14860b repl
14861:more1
14862s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14863p
14864g
14865s/.\{148\}//
14866t nl
14867:delim
14868h
14869s/\(.\{148\}\)..*/\1/
14870t more2
14871s/["\\]/\\&/g; s/^/"/; s/$/"/
14872p
14873b
14874:more2
14875s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14876p
14877g
14878s/.\{148\}//
14879t delim
14880' <conf$$subs.awk | sed '
14881/^[^""]/{
14882 N
14883 s/\n//
14884}
14885' >>$CONFIG_STATUS || ac_write_fail=1
14886rm -f conf$$subs.awk
14887cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14888_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014889cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 for (key in S) S_is_set[key] = 1
14891 FS = ""
14892
14893}
14894{
14895 line = $ 0
14896 nfields = split(line, field, "@")
14897 substed = 0
14898 len = length(field[1])
14899 for (i = 2; i < nfields; i++) {
14900 key = field[i]
14901 keylen = length(key)
14902 if (S_is_set[key]) {
14903 value = S[key]
14904 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14905 len += length(value) + length(field[++i])
14906 substed = 1
14907 } else
14908 len += 1 + keylen
14909 }
14910
14911 print line
14912}
14913
14914_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014916cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14917if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14918 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14919else
14920 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014921fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014922 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014923_ACEOF
14924
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014925# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14926# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927# trailing colons and then remove the whole line if VPATH becomes empty
14928# (actually we leave an empty line to preserve line numbers).
14929if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014930 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14931h
14932s///
14933s/^/:/
14934s/[ ]*$/:/
14935s/:\$(srcdir):/:/g
14936s/:\${srcdir}:/:/g
14937s/:@srcdir@:/:/g
14938s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014940x
14941s/\(=[ ]*\).*/\1/
14942G
14943s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944s/^[^=]*=[ ]*$//
14945}'
14946fi
14947
Matthias Kloseb9621712010-04-24 17:59:49 +000014948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014949fi # test -n "$CONFIG_FILES"
14950
Matthias Kloseb9621712010-04-24 17:59:49 +000014951# Set up the scripts for CONFIG_HEADERS section.
14952# No need to generate them if there are no CONFIG_HEADERS.
14953# This happens for instance with `./config.status Makefile'.
14954if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014955cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014956BEGIN {
14957_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958
Matthias Kloseb9621712010-04-24 17:59:49 +000014959# Transform confdefs.h into an awk script `defines.awk', embedded as
14960# here-document in config.status, that substitutes the proper values into
14961# config.h.in to produce config.h.
14962
14963# Create a delimiter string that does not exist in confdefs.h, to ease
14964# handling of long lines.
14965ac_delim='%!_!# '
14966for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080014967 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14968 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014969 break
14970 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014971 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 else
14973 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14974 fi
14975done
14976
14977# For the awk script, D is an array of macro values keyed by name,
14978# likewise P contains macro parameters if any. Preserve backslash
14979# newline sequences.
14980
14981ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14982sed -n '
14983s/.\{148\}/&'"$ac_delim"'/g
14984t rset
14985:rset
14986s/^[ ]*#[ ]*define[ ][ ]*/ /
14987t def
14988d
14989:def
14990s/\\$//
14991t bsnl
14992s/["\\]/\\&/g
14993s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14994D["\1"]=" \3"/p
14995s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14996d
14997:bsnl
14998s/["\\]/\\&/g
14999s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15000D["\1"]=" \3\\\\\\n"\\/p
15001t cont
15002s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15003t cont
15004d
15005:cont
15006n
15007s/.\{148\}/&'"$ac_delim"'/g
15008t clear
15009:clear
15010s/\\$//
15011t bsnlc
15012s/["\\]/\\&/g; s/^/"/; s/$/"/p
15013d
15014:bsnlc
15015s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15016b cont
15017' <confdefs.h | sed '
15018s/'"$ac_delim"'/"\\\
15019"/g' >>$CONFIG_STATUS || ac_write_fail=1
15020
15021cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15022 for (key in D) D_is_set[key] = 1
15023 FS = ""
15024}
15025/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15026 line = \$ 0
15027 split(line, arg, " ")
15028 if (arg[1] == "#") {
15029 defundef = arg[2]
15030 mac1 = arg[3]
15031 } else {
15032 defundef = substr(arg[1], 2)
15033 mac1 = arg[2]
15034 }
15035 split(mac1, mac2, "(") #)
15036 macro = mac2[1]
15037 prefix = substr(line, 1, index(line, defundef) - 1)
15038 if (D_is_set[macro]) {
15039 # Preserve the white space surrounding the "#".
15040 print prefix "define", macro P[macro] D[macro]
15041 next
15042 } else {
15043 # Replace #undef with comments. This is necessary, for example,
15044 # in the case of _POSIX_SOURCE, which is predefined and required
15045 # on some systems where configure will not decide to define it.
15046 if (defundef == "undef") {
15047 print "/*", prefix defundef, macro, "*/"
15048 next
15049 }
15050 }
15051}
15052{ print }
15053_ACAWK
15054_ACEOF
15055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015056 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015057fi # test -n "$CONFIG_HEADERS"
15058
15059
15060eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15061shift
15062for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063do
15064 case $ac_tag in
15065 :[FHLC]) ac_mode=$ac_tag; continue;;
15066 esac
15067 case $ac_mode$ac_tag in
15068 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015069 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070 :[FH]-) ac_tag=-:-;;
15071 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15072 esac
15073 ac_save_IFS=$IFS
15074 IFS=:
15075 set x $ac_tag
15076 IFS=$ac_save_IFS
15077 shift
15078 ac_file=$1
15079 shift
15080
15081 case $ac_mode in
15082 :L) ac_source=$1;;
15083 :[FH])
15084 ac_file_inputs=
15085 for ac_f
15086 do
15087 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015088 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089 *) # Look for the file first in the build tree, then in the source tree
15090 # (if the path is not absolute). The absolute path cannot be DOS-style,
15091 # because $ac_f cannot contain `:'.
15092 test -f "$ac_f" ||
15093 case $ac_f in
15094 [\\/$]*) false;;
15095 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15096 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015097 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15100 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101 done
15102
15103 # Let's still pretend it is `configure' which instantiates (i.e., don't
15104 # use $as_me), people would be surprised to read:
15105 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 configure_input='Generated from '`
15107 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15108 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109 if test x"$ac_file" != x-; then
15110 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15112$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 # Neutralize special characters interpreted by sed in replacement strings.
15115 case $configure_input in #(
15116 *\&* | *\|* | *\\* )
15117 ac_sed_conf_input=`$as_echo "$configure_input" |
15118 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15119 *) ac_sed_conf_input=$configure_input;;
15120 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121
15122 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015123 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15124 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125 esac
15126 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 esac
15128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015130$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015131 X"$ac_file" : 'X\(//\)[^/]' \| \
15132 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015134$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15136 s//\1/
15137 q
15138 }
15139 /^X\(\/\/\)[^/].*/{
15140 s//\1/
15141 q
15142 }
15143 /^X\(\/\/\)$/{
15144 s//\1/
15145 q
15146 }
15147 /^X\(\/\).*/{
15148 s//\1/
15149 q
15150 }
15151 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 ac_builddir=.
15154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155case "$ac_dir" in
15156.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15157*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015158 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161 case $ac_top_builddir_sub in
15162 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15163 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15164 esac ;;
15165esac
15166ac_abs_top_builddir=$ac_pwd
15167ac_abs_builddir=$ac_pwd$ac_dir_suffix
15168# for backward compatibility:
15169ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015170
15171case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 ac_top_srcdir=$ac_top_builddir_sub
15175 ac_abs_top_srcdir=$ac_pwd ;;
15176 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178 ac_top_srcdir=$srcdir
15179 ac_abs_top_srcdir=$srcdir ;;
15180 *) # Relative name.
15181 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15182 ac_top_srcdir=$ac_top_build_prefix$srcdir
15183 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015184esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015186
Martin v. Löwis11437992002-04-12 09:54:03 +000015187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 case $ac_mode in
15189 :F)
15190 #
15191 # CONFIG_FILE
15192 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015193
15194 case $INSTALL in
15195 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015198 ac_MKDIR_P=$MKDIR_P
15199 case $MKDIR_P in
15200 [\\/$]* | ?:[\\/]* ) ;;
15201 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15202 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015203_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206# If the template does not know about datarootdir, expand it.
15207# FIXME: This hack should be removed a few years after 2.60.
15208ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015209ac_sed_dataroot='
15210/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211 p
15212 q
15213}
15214/@datadir@/p
15215/@docdir@/p
15216/@infodir@/p
15217/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015218/@mandir@/p'
15219case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220*datarootdir*) ac_datarootdir_seen=yes;;
15221*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15223$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015226 ac_datarootdir_hack='
15227 s&@datadir@&$datadir&g
15228 s&@docdir@&$docdir&g
15229 s&@infodir@&$infodir&g
15230 s&@localedir@&$localedir&g
15231 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233esac
15234_ACEOF
15235
15236# Neutralize VPATH when `$srcdir' = `.'.
15237# Shell code in configure.ac might set extrasub.
15238# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15240ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015241$extrasub
15242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015243cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015244:t
15245/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015246s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015248s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249s&@srcdir@&$ac_srcdir&;t t
15250s&@abs_srcdir@&$ac_abs_srcdir&;t t
15251s&@top_srcdir@&$ac_top_srcdir&;t t
15252s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15253s&@builddir@&$ac_builddir&;t t
15254s&@abs_builddir@&$ac_abs_builddir&;t t
15255s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15256s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015257s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015259"
Gregory P. Smith69140482012-01-16 02:05:55 -080015260eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15261 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015264 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15265 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15266 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 { $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 +000015268which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015269$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015270which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015271
Gregory P. Smith69140482012-01-16 02:05:55 -080015272 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015274 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15275 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015277 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278 ;;
15279 :H)
15280 #
15281 # CONFIG_HEADER
15282 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 {
15285 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015286 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15287 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015288 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015289 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15291$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015292 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015294 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015295 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 fi
15297 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015299 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015300 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304
15305 esac
15306
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015307
15308 case $ac_file$ac_mode in
15309 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15310
15311 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312done # for ac_tag
15313
Guido van Rossum627b2d71993-12-24 10:39:16 +000015314
Matthias Kloseb9621712010-04-24 17:59:49 +000015315as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015316_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015317ac_clean_files=$ac_clean_files_save
15318
Matthias Kloseb9621712010-04-24 17:59:49 +000015319test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015320 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015321
Martin v. Löwis11437992002-04-12 09:54:03 +000015322
15323# configure is writing to config.log, and then calls config.status.
15324# config.status does its own redirection, appending to config.log.
15325# Unfortunately, on DOS this fails, as config.log is still kept open
15326# by configure, so config.status won't be able to write to it; its
15327# output is simply discarded. So we exec the FD to /dev/null,
15328# effectively closing config.log, so it can be properly (re)opened and
15329# appended to by config.status. When coming back to configure, we
15330# need to make the FD available again.
15331if test "$no_create" != yes; then
15332 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015333 ac_config_status_args=
15334 test "$silent" = yes &&
15335 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015337 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 exec 5>>config.log
15339 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15340 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015341 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015342fi
15343if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15344 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15345$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015346fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015347
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015348
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015349echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015350if test ! -f Modules/Setup
15351then
15352 cp $srcdir/Modules/Setup.dist Modules/Setup
15353fi
15354
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015355echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015356if test ! -f Modules/Setup.local
15357then
15358 echo "# Edit this file for local setup changes" >Modules/Setup.local
15359fi
15360
15361echo "creating Makefile"
15362$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15363 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015364 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015365mv config.c Modules