blob: 8ba3dec51fd20f9485c75e38c12c462b2334c4c7 [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
655BUILDDIR
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SVNVERSION
657ARFLAGS
658AR
659RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000660USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000661GNULD
662LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000663LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000664RUNSHARED
665INSTSONAME
666LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000667PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BLDLIBRARY
669DLLLIBRARY
670LDLIBRARY
671LIBRARY
672BUILDEXEEXT
673EGREP
674GREP
675CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200676NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000677MAINCC
678CXX
679OBJEXT
680EXEEXT
681ac_ct_CC
682CPPFLAGS
683LDFLAGS
684CFLAGS
685CC
686EXPORT_MACOSX_DEPLOYMENT_TARGET
687CONFIGURE_MACOSX_DEPLOYMENT_TARGET
688SGI_ABI
689MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000690FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000691FRAMEWORKUNIXTOOLSPREFIX
692FRAMEWORKALTINSTALLLAST
693FRAMEWORKALTINSTALLFIRST
694FRAMEWORKINSTALLLAST
695FRAMEWORKINSTALLFIRST
696PYTHONFRAMEWORKINSTALLDIR
697PYTHONFRAMEWORKPREFIX
698PYTHONFRAMEWORKDIR
699PYTHONFRAMEWORKIDENTIFIER
700PYTHONFRAMEWORK
701LIPO_32BIT_FLAGS
702ARCH_RUN_32BIT
703UNIVERSALSDK
704CONFIG_ARGS
705SOVERSION
706VERSION
707target_alias
708host_alias
709build_alias
710LIBS
711ECHO_T
712ECHO_N
713ECHO_C
714DEFS
715mandir
716localedir
717libdir
718psdir
719pdfdir
720dvidir
721htmldir
722infodir
723docdir
724oldincludedir
725includedir
726localstatedir
727sharedstatedir
728sysconfdir
729datadir
730datarootdir
731libexecdir
732sbindir
733bindir
734program_transform_name
735prefix
736exec_prefix
737PACKAGE_URL
738PACKAGE_BUGREPORT
739PACKAGE_STRING
740PACKAGE_VERSION
741PACKAGE_TARNAME
742PACKAGE_NAME
743PATH_SEPARATOR
744SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000745ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000746ac_user_opts='
747enable_option_checking
748enable_universalsdk
749with_universal_archs
750with_framework_name
751enable_framework
752with_gcc
753with_cxx_main
754with_suffix
755enable_shared
756enable_profiling
757with_pydebug
758with_libs
759with_system_expat
760with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000761enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000762with_dbmliborder
763with_signal_module
764with_dec_threads
765with_threads
766with_thread
767enable_ipv6
768with_doc_strings
769with_tsc
770with_pymalloc
771with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000772with_fpectl
773with_libm
774with_libc
775enable_big_digits
776with_wide_unicode
777with_computed_gotos
778'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000779 ac_precious_vars='build_alias
780host_alias
781target_alias
782CC
783CFLAGS
784LDFLAGS
785LIBS
786CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000787CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788
Guido van Rossum627b2d71993-12-24 10:39:16 +0000789
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791ac_init_help=
792ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000793ac_unrecognized_opts=
794ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795# The variables have the same names as the options, with
796# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000797cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800no_recursion=
801prefix=NONE
802program_prefix=NONE
803program_suffix=NONE
804program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809x_includes=NONE
810x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000811
812# Installation directory options.
813# These are left unexpanded so users can "make install exec_prefix=/foo"
814# and all the variables that are supposed to be based on exec_prefix
815# by default will actually change.
816# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818bindir='${exec_prefix}/bin'
819sbindir='${exec_prefix}/sbin'
820libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821datarootdir='${prefix}/share'
822datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823sysconfdir='${prefix}/etc'
824sharedstatedir='${prefix}/com'
825localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000826includedir='${prefix}/include'
827oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
829infodir='${datarootdir}/info'
830htmldir='${docdir}'
831dvidir='${docdir}'
832pdfdir='${docdir}'
833psdir='${docdir}'
834libdir='${exec_prefix}/lib'
835localedir='${datarootdir}/locale'
836mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842 # If the previous option needs an argument, assign it.
843 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845 ac_prev=
846 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000847 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000850 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
851 *=) ac_optarg= ;;
852 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855 # Accept the important Cygnus configure options, so we can diagnose typos.
856
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857 case $ac_dashdash$ac_option in
858 --)
859 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861 -bindir | --bindir | --bindi | --bind | --bin | --bi)
862 ac_prev=bindir ;;
863 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865
866 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 -cache-file | --cache-file | --cache-fil | --cache-fi \
872 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
873 ac_prev=cache_file ;;
874 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
875 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 cache_file=$ac_optarg ;;
877
878 --config-cache | -C)
879 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
887 | --dataroo | --dataro | --datar)
888 ac_prev=datarootdir ;;
889 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
890 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
891 datarootdir=$ac_optarg ;;
892
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000894 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000896 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000897 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000898 ac_useropt_orig=$ac_useropt
899 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
900 case $ac_user_opts in
901 *"
902"enable_$ac_useropt"
903"*) ;;
904 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
905 ac_unrecognized_sep=', ';;
906 esac
907 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908
909 -docdir | --docdir | --docdi | --doc | --do)
910 ac_prev=docdir ;;
911 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
912 docdir=$ac_optarg ;;
913
914 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
915 ac_prev=dvidir ;;
916 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
917 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
919 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000920 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000922 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000923 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000924 ac_useropt_orig=$ac_useropt
925 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
926 case $ac_user_opts in
927 *"
928"enable_$ac_useropt"
929"*) ;;
930 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
931 ac_unrecognized_sep=', ';;
932 esac
933 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
936 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
937 | --exec | --exe | --ex)
938 ac_prev=exec_prefix ;;
939 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
940 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
941 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
944 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 # Obsolete; use --with-gas.
946 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 -help | --help | --hel | --he | -h)
949 ac_init_help=long ;;
950 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
951 ac_init_help=recursive ;;
952 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
953 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
955 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
961 ac_prev=htmldir ;;
962 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
963 | --ht=*)
964 htmldir=$ac_optarg ;;
965
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966 -includedir | --includedir | --includedi | --included | --include \
967 | --includ | --inclu | --incl | --inc)
968 ac_prev=includedir ;;
969 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
970 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
973 -infodir | --infodir | --infodi | --infod | --info | --inf)
974 ac_prev=infodir ;;
975 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -libdir | --libdir | --libdi | --libd)
979 ac_prev=libdir ;;
980 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
984 | --libexe | --libex | --libe)
985 ac_prev=libexecdir ;;
986 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
987 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 -localedir | --localedir | --localedi | --localed | --locale)
991 ac_prev=localedir ;;
992 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
993 localedir=$ac_optarg ;;
994
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000996 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997 ac_prev=localstatedir ;;
998 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000999 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001
1002 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1003 ac_prev=mandir ;;
1004 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 # Obsolete; use --without-fp.
1009 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 no_create=yes ;;
1014
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1016 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1017 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1020 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1021 | --oldin | --oldi | --old | --ol | --o)
1022 ac_prev=oldincludedir ;;
1023 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1024 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1025 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1029 ac_prev=prefix ;;
1030 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1034 | --program-pre | --program-pr | --program-p)
1035 ac_prev=program_prefix ;;
1036 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1037 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
1040 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1041 | --program-suf | --program-su | --program-s)
1042 ac_prev=program_suffix ;;
1043 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1044 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -program-transform-name | --program-transform-name \
1048 | --program-transform-nam | --program-transform-na \
1049 | --program-transform-n | --program-transform- \
1050 | --program-transform | --program-transfor \
1051 | --program-transfo | --program-transf \
1052 | --program-trans | --program-tran \
1053 | --progr-tra | --program-tr | --program-t)
1054 ac_prev=program_transform_name ;;
1055 -program-transform-name=* | --program-transform-name=* \
1056 | --program-transform-nam=* | --program-transform-na=* \
1057 | --program-transform-n=* | --program-transform-=* \
1058 | --program-transform=* | --program-transfor=* \
1059 | --program-transfo=* | --program-transf=* \
1060 | --program-trans=* | --program-tran=* \
1061 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1065 ac_prev=pdfdir ;;
1066 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1067 pdfdir=$ac_optarg ;;
1068
1069 -psdir | --psdir | --psdi | --psd | --ps)
1070 ac_prev=psdir ;;
1071 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1072 psdir=$ac_optarg ;;
1073
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1075 | -silent | --silent | --silen | --sile | --sil)
1076 silent=yes ;;
1077
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1079 ac_prev=sbindir ;;
1080 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1081 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
1084 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1085 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1086 | --sharedst | --shareds | --shared | --share | --shar \
1087 | --sha | --sh)
1088 ac_prev=sharedstatedir ;;
1089 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1090 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1091 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1092 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001095 -site | --site | --sit)
1096 ac_prev=site ;;
1097 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1101 ac_prev=srcdir ;;
1102 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1106 | --syscon | --sysco | --sysc | --sys | --sy)
1107 ac_prev=sysconfdir ;;
1108 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1109 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1118 verbose=yes ;;
1119
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 -version | --version | --versio | --versi | --vers | -V)
1121 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
1123 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001124 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001127 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001128 ac_useropt_orig=$ac_useropt
1129 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1130 case $ac_user_opts in
1131 *"
1132"with_$ac_useropt"
1133"*) ;;
1134 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1135 ac_unrecognized_sep=', ';;
1136 esac
1137 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001140 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001142 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001143 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001144 ac_useropt_orig=$ac_useropt
1145 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146 case $ac_user_opts in
1147 *"
1148"with_$ac_useropt"
1149"*) ;;
1150 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1151 ac_unrecognized_sep=', ';;
1152 esac
1153 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155 --x)
1156 # Obsolete; use --with-x.
1157 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1160 | --x-incl | --x-inc | --x-in | --x-i)
1161 ac_prev=x_includes ;;
1162 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1163 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
1166 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1167 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1168 ac_prev=x_libraries ;;
1169 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1170 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001173 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1174Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 ;;
1176
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 *=*)
1178 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1179 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001180 case $ac_envvar in #(
1181 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001182 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 export $ac_envvar ;;
1186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Gregory P. Smith69140482012-01-16 02:05:55 -08001192 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 ;;
1194
1195 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196done
1197
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001200 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201fi
1202
Matthias Kloseb9621712010-04-24 17:59:49 +00001203if test -n "$ac_unrecognized_opts"; then
1204 case $enable_option_checking in
1205 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001206 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1208 esac
1209fi
1210
1211# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1213 datadir sysconfdir sharedstatedir localstatedir includedir \
1214 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1215 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 # Remove trailing slashes.
1219 case $ac_val in
1220 */ )
1221 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1222 eval $ac_var=\$ac_val;;
1223 esac
1224 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001226 [\\/$]* | ?:[\\/]* ) continue;;
1227 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001229 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001230done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Martin v. Löwis11437992002-04-12 09:54:03 +00001232# There might be people who depend on the old broken behavior: `$host'
1233# used to hold the argument of --host etc.
1234# FIXME: To remove some day.
1235build=$build_alias
1236host=$host_alias
1237target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001238
Martin v. Löwis11437992002-04-12 09:54:03 +00001239# FIXME: To remove some day.
1240if test "x$host_alias" != x; then
1241 if test "x$build_alias" = x; then
1242 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001243 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1244 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 elif test "x$build_alias" != "x$host_alias"; then
1246 cross_compiling=yes
1247 fi
1248fi
1249
1250ac_tool_prefix=
1251test -n "$host_alias" && ac_tool_prefix=$host_alias-
1252
1253test "$silent" = yes && exec 6>/dev/null
1254
Guido van Rossum627b2d71993-12-24 10:39:16 +00001255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256ac_pwd=`pwd` && test -n "$ac_pwd" &&
1257ac_ls_di=`ls -di .` &&
1258ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001259 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001261 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262
1263
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264# Find the source files, if location was not specified.
1265if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 ac_confdir=`$as_dirname -- "$as_myself" ||
1269$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1270 X"$as_myself" : 'X\(//\)[^/]' \| \
1271 X"$as_myself" : 'X\(//\)$' \| \
1272 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1273$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1275 s//\1/
1276 q
1277 }
1278 /^X\(\/\/\)[^/].*/{
1279 s//\1/
1280 q
1281 }
1282 /^X\(\/\/\)$/{
1283 s//\1/
1284 q
1285 }
1286 /^X\(\/\).*/{
1287 s//\1/
1288 q
1289 }
1290 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293 srcdir=..
1294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001295else
1296 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298if test ! -r "$srcdir/$ac_unique_file"; then
1299 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001300 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1303ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001304 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305 pwd)`
1306# When building in place, set srcdir=.
1307if test "$ac_abs_confdir" = "$ac_pwd"; then
1308 srcdir=.
1309fi
1310# Remove unnecessary trailing slashes from srcdir.
1311# Double slashes in file names in object file debugging info
1312# mess up M-x gdb in Emacs.
1313case $srcdir in
1314*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1315esac
1316for ac_var in $ac_precious_vars; do
1317 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1318 eval ac_env_${ac_var}_value=\$${ac_var}
1319 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1320 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1321done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322
Martin v. Löwis11437992002-04-12 09:54:03 +00001323#
1324# Report the --help message.
1325#
1326if test "$ac_init_help" = "long"; then
1327 # Omit some internal or obsolete options to make the list less imposing.
1328 # This message is too long to be a string in the A/UX 3.1 sh.
1329 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001330\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332Usage: $0 [OPTION]... [VAR=VALUE]...
1333
1334To assign environment variables (e.g., CC, CFLAGS...), specify them as
1335VAR=VALUE. See below for descriptions of some of the useful variables.
1336
1337Defaults for the options are specified in brackets.
1338
1339Configuration:
1340 -h, --help display this help and exit
1341 --help=short display options specific to this package
1342 --help=recursive display the short help of all the included packages
1343 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001344 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001345 --cache-file=FILE cache test results in FILE [disabled]
1346 -C, --config-cache alias for \`--cache-file=config.cache'
1347 -n, --no-create do not create output files
1348 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1349
Martin v. Löwis11437992002-04-12 09:54:03 +00001350Installation directories:
1351 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001352 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001353 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001354 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001355
1356By default, \`make install' will install all the files in
1357\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1358an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1359for instance \`--prefix=\$HOME'.
1360
1361For better control, use the options below.
1362
1363Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001364 --bindir=DIR user executables [EPREFIX/bin]
1365 --sbindir=DIR system admin executables [EPREFIX/sbin]
1366 --libexecdir=DIR program executables [EPREFIX/libexec]
1367 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1368 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1369 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1370 --libdir=DIR object code libraries [EPREFIX/lib]
1371 --includedir=DIR C header files [PREFIX/include]
1372 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1373 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1374 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1375 --infodir=DIR info documentation [DATAROOTDIR/info]
1376 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1377 --mandir=DIR man documentation [DATAROOTDIR/man]
1378 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1379 --htmldir=DIR html documentation [DOCDIR]
1380 --dvidir=DIR dvi documentation [DOCDIR]
1381 --pdfdir=DIR pdf documentation [DOCDIR]
1382 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383_ACEOF
1384
1385 cat <<\_ACEOF
1386_ACEOF
1387fi
1388
1389if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001390 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001391 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001392 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001393 cat <<\_ACEOF
1394
1395Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001397 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1398 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001399 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001400 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-framework[=INSTALLDIR]
1402 Build (MacOSX|Darwin) framework
1403 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001404 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001405 --enable-loadable-sqlite-extensions
1406 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --enable-ipv6 Enable ipv6 (with ipv4) support
1408 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001409 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001410 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Optional Packages:
1413 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1414 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001415 --with-universal-archs=ARCH
1416 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001417 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001418 --with-framework-name=FRAMEWORK
1419 specify an alternate name of the framework built
1420 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001422 --with-cxx-main=<compiler>
1423 compile main() and link python executable with C++
1424 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with-suffix=.exe set executable suffix
1426 --with-pydebug build with Py_DEBUG defined
1427 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001428 --with-system-expat build pyexpat module using an installed expat
1429 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001430 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001431 --with-dbmliborder=db1:db2:...
1432 order to check db backends for dbm. Valid value is a
1433 colon separated string with the backend names
1434 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --with-signal-module disable/enable signal module
1436 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1437 --with(out)-threads[=DIRECTORY]
1438 disable/enable thread support
1439 --with(out)-thread[=DIRECTORY]
1440 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001442 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001443 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001444 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001445 --with-fpectl enable SIGFPE catching
1446 --with-libm=STRING math library
1447 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001448 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001449 --with(out)-computed-gotos
1450 Use computed gotos in evaluation loop (enabled by
1451 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453Some influential environment variables:
1454 CC C compiler command
1455 CFLAGS C compiler flags
1456 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1457 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 CPP C preprocessor
1462
1463Use these variables to override the choices made by `configure' or to help
1464it to find libraries and programs with nonstandard names/locations.
1465
Georg Brandle2e15612009-05-20 18:25:10 +00001466Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001469fi
1470
1471if test "$ac_init_help" = "recursive"; then
1472 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 test -d "$ac_dir" ||
1475 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1476 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 ac_builddir=.
1478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479case "$ac_dir" in
1480.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1481*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 case $ac_top_builddir_sub in
1486 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1487 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1488 esac ;;
1489esac
1490ac_abs_top_builddir=$ac_pwd
1491ac_abs_builddir=$ac_pwd$ac_dir_suffix
1492# for backward compatibility:
1493ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498 ac_top_srcdir=$ac_top_builddir_sub
1499 ac_abs_top_srcdir=$ac_pwd ;;
1500 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001501 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 ac_top_srcdir=$srcdir
1503 ac_abs_top_srcdir=$srcdir ;;
1504 *) # Relative name.
1505 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1506 ac_top_srcdir=$ac_top_build_prefix$srcdir
1507 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001508esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 cd "$ac_dir" || { ac_status=$?; continue; }
1512 # Check for guested configure.
1513 if test -f "$ac_srcdir/configure.gnu"; then
1514 echo &&
1515 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1516 elif test -f "$ac_srcdir/configure"; then
1517 echo &&
1518 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001520 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 fi || ac_status=$?
1522 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001523 done
1524fi
1525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001527if $ac_init_version; then
1528 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001529python configure 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -08001530generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001531
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001532Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533This configure script is free software; the Free Software Foundation
1534gives unlimited permission to copy, distribute and modify it.
1535_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001538
1539## ------------------------ ##
1540## Autoconf initialization. ##
1541## ------------------------ ##
1542
1543# ac_fn_c_try_compile LINENO
1544# --------------------------
1545# Try to compile conftest.$ac_ext, and return whether this succeeded.
1546ac_fn_c_try_compile ()
1547{
1548 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1549 rm -f conftest.$ac_objext
1550 if { { ac_try="$ac_compile"
1551case "(($ac_try" in
1552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1553 *) ac_try_echo=$ac_try;;
1554esac
1555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1556$as_echo "$ac_try_echo"; } >&5
1557 (eval "$ac_compile") 2>conftest.err
1558 ac_status=$?
1559 if test -s conftest.err; then
1560 grep -v '^ *+' conftest.err >conftest.er1
1561 cat conftest.er1 >&5
1562 mv -f conftest.er1 conftest.err
1563 fi
1564 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1565 test $ac_status = 0; } && {
1566 test -z "$ac_c_werror_flag" ||
1567 test ! -s conftest.err
1568 } && test -s conftest.$ac_objext; then :
1569 ac_retval=0
1570else
1571 $as_echo "$as_me: failed program was:" >&5
1572sed 's/^/| /' conftest.$ac_ext >&5
1573
1574 ac_retval=1
1575fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001576 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 as_fn_set_status $ac_retval
1578
1579} # ac_fn_c_try_compile
1580
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001581# ac_fn_c_try_link LINENO
1582# -----------------------
1583# Try to link conftest.$ac_ext, and return whether this succeeded.
1584ac_fn_c_try_link ()
1585{
1586 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1587 rm -f conftest.$ac_objext conftest$ac_exeext
1588 if { { ac_try="$ac_link"
1589case "(($ac_try" in
1590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1591 *) ac_try_echo=$ac_try;;
1592esac
1593eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1594$as_echo "$ac_try_echo"; } >&5
1595 (eval "$ac_link") 2>conftest.err
1596 ac_status=$?
1597 if test -s conftest.err; then
1598 grep -v '^ *+' conftest.err >conftest.er1
1599 cat conftest.er1 >&5
1600 mv -f conftest.er1 conftest.err
1601 fi
1602 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1603 test $ac_status = 0; } && {
1604 test -z "$ac_c_werror_flag" ||
1605 test ! -s conftest.err
1606 } && test -s conftest$ac_exeext && {
1607 test "$cross_compiling" = yes ||
1608 $as_test_x conftest$ac_exeext
1609 }; then :
1610 ac_retval=0
1611else
1612 $as_echo "$as_me: failed program was:" >&5
1613sed 's/^/| /' conftest.$ac_ext >&5
1614
1615 ac_retval=1
1616fi
1617 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1618 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1619 # interfere with the next link command; also delete a directory that is
1620 # left behind by Apple's compiler. We do this before executing the actions.
1621 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001622 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001623 as_fn_set_status $ac_retval
1624
1625} # ac_fn_c_try_link
1626
Matthias Kloseb9621712010-04-24 17:59:49 +00001627# ac_fn_c_try_cpp LINENO
1628# ----------------------
1629# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1630ac_fn_c_try_cpp ()
1631{
1632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1633 if { { ac_try="$ac_cpp conftest.$ac_ext"
1634case "(($ac_try" in
1635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1636 *) ac_try_echo=$ac_try;;
1637esac
1638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1639$as_echo "$ac_try_echo"; } >&5
1640 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1641 ac_status=$?
1642 if test -s conftest.err; then
1643 grep -v '^ *+' conftest.err >conftest.er1
1644 cat conftest.er1 >&5
1645 mv -f conftest.er1 conftest.err
1646 fi
1647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001648 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001649 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1650 test ! -s conftest.err
1651 }; then :
1652 ac_retval=0
1653else
1654 $as_echo "$as_me: failed program was:" >&5
1655sed 's/^/| /' conftest.$ac_ext >&5
1656
1657 ac_retval=1
1658fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001659 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 as_fn_set_status $ac_retval
1661
1662} # ac_fn_c_try_cpp
1663
1664# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1665# -------------------------------------------------------
1666# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1667# the include files in INCLUDES and setting the cache variable VAR
1668# accordingly.
1669ac_fn_c_check_header_mongrel ()
1670{
1671 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith69140482012-01-16 02:05:55 -08001672 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1674$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001675if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001676 $as_echo_n "(cached) " >&6
1677fi
1678eval ac_res=\$$3
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1680$as_echo "$ac_res" >&6; }
1681else
1682 # Is the header compilable?
1683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1684$as_echo_n "checking $2 usability... " >&6; }
1685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1686/* end confdefs.h. */
1687$4
1688#include <$2>
1689_ACEOF
1690if ac_fn_c_try_compile "$LINENO"; then :
1691 ac_header_compiler=yes
1692else
1693 ac_header_compiler=no
1694fi
1695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1697$as_echo "$ac_header_compiler" >&6; }
1698
1699# Is the header present?
1700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1701$as_echo_n "checking $2 presence... " >&6; }
1702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1703/* end confdefs.h. */
1704#include <$2>
1705_ACEOF
1706if ac_fn_c_try_cpp "$LINENO"; then :
1707 ac_header_preproc=yes
1708else
1709 ac_header_preproc=no
1710fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001711rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1713$as_echo "$ac_header_preproc" >&6; }
1714
1715# So? What about this header?
1716case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1717 yes:no: )
1718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1719$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1721$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1722 ;;
1723 no:yes:* )
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1725$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1727$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1729$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1731$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1733$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001734( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001735## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001736## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001737 ) | sed "s/^/$as_me: WARNING: /" >&2
1738 ;;
1739esac
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1741$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001742if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 $as_echo_n "(cached) " >&6
1744else
1745 eval "$3=\$ac_header_compiler"
1746fi
1747eval ac_res=\$$3
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1749$as_echo "$ac_res" >&6; }
1750fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001751 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001752
1753} # ac_fn_c_check_header_mongrel
1754
1755# ac_fn_c_try_run LINENO
1756# ----------------------
1757# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1758# that executables *can* be run.
1759ac_fn_c_try_run ()
1760{
1761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762 if { { ac_try="$ac_link"
1763case "(($ac_try" in
1764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765 *) ac_try_echo=$ac_try;;
1766esac
1767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1768$as_echo "$ac_try_echo"; } >&5
1769 (eval "$ac_link") 2>&5
1770 ac_status=$?
1771 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1772 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1773 { { case "(($ac_try" in
1774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775 *) ac_try_echo=$ac_try;;
1776esac
1777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778$as_echo "$ac_try_echo"; } >&5
1779 (eval "$ac_try") 2>&5
1780 ac_status=$?
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; }; }; then :
1783 ac_retval=0
1784else
1785 $as_echo "$as_me: program exited with status $ac_status" >&5
1786 $as_echo "$as_me: failed program was:" >&5
1787sed 's/^/| /' conftest.$ac_ext >&5
1788
1789 ac_retval=$ac_status
1790fi
1791 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001792 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001793 as_fn_set_status $ac_retval
1794
1795} # ac_fn_c_try_run
1796
1797# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1798# -------------------------------------------------------
1799# Tests whether HEADER exists and can be compiled using the include files in
1800# INCLUDES, setting the cache variable VAR accordingly.
1801ac_fn_c_check_header_compile ()
1802{
1803 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1805$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001806if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 $as_echo_n "(cached) " >&6
1808else
1809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1810/* end confdefs.h. */
1811$4
1812#include <$2>
1813_ACEOF
1814if ac_fn_c_try_compile "$LINENO"; then :
1815 eval "$3=yes"
1816else
1817 eval "$3=no"
1818fi
1819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1820fi
1821eval ac_res=\$$3
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1823$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001825
1826} # ac_fn_c_check_header_compile
1827
Matthias Kloseb9621712010-04-24 17:59:49 +00001828# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1829# -------------------------------------------
1830# Tests whether TYPE exists after having included INCLUDES, setting cache
1831# variable VAR accordingly.
1832ac_fn_c_check_type ()
1833{
1834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=no"
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842/* end confdefs.h. */
1843$4
1844int
1845main ()
1846{
1847if (sizeof ($2))
1848 return 0;
1849 ;
1850 return 0;
1851}
1852_ACEOF
1853if ac_fn_c_try_compile "$LINENO"; then :
1854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1855/* end confdefs.h. */
1856$4
1857int
1858main ()
1859{
1860if (sizeof (($2)))
1861 return 0;
1862 ;
1863 return 0;
1864}
1865_ACEOF
1866if ac_fn_c_try_compile "$LINENO"; then :
1867
1868else
1869 eval "$3=yes"
1870fi
1871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1872fi
1873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1874fi
1875eval ac_res=\$$3
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1877$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001878 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001879
1880} # ac_fn_c_check_type
1881
1882# ac_fn_c_find_uintX_t LINENO BITS VAR
1883# ------------------------------------
1884# Finds an unsigned integer type with width BITS, setting cache variable VAR
1885# accordingly.
1886ac_fn_c_find_uintX_t ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1890$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001891if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001892 $as_echo_n "(cached) " >&6
1893else
1894 eval "$3=no"
1895 # Order is important - never check a type that is potentially smaller
1896 # than half of the expected target width.
1897 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1898 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h. */
1901$ac_includes_default
1902int
1903main ()
1904{
1905static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1906test_array [0] = 0
1907
1908 ;
1909 return 0;
1910}
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913 case $ac_type in #(
1914 uint$2_t) :
1915 eval "$3=yes" ;; #(
1916 *) :
1917 eval "$3=\$ac_type" ;;
1918esac
1919fi
1920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001921 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001922
1923else
1924 break
1925fi
1926 done
1927fi
1928eval ac_res=\$$3
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001931 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001932
1933} # ac_fn_c_find_uintX_t
1934
1935# ac_fn_c_find_intX_t LINENO BITS VAR
1936# -----------------------------------
1937# Finds a signed integer type with width BITS, setting cache variable VAR
1938# accordingly.
1939ac_fn_c_find_intX_t ()
1940{
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1943$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001944if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001945 $as_echo_n "(cached) " >&6
1946else
1947 eval "$3=no"
1948 # Order is important - never check a type that is potentially smaller
1949 # than half of the expected target width.
1950 for ac_type in int$2_t 'int' 'long int' \
1951 'long long int' 'short int' 'signed char'; do
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001955 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001956int
1957main ()
1958{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001959static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001960test_array [0] = 0
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1968/* end confdefs.h. */
1969$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001970 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001971int
1972main ()
1973{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001974static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001975 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1976test_array [0] = 0
1977
1978 ;
1979 return 0;
1980}
1981_ACEOF
1982if ac_fn_c_try_compile "$LINENO"; then :
1983
1984else
1985 case $ac_type in #(
1986 int$2_t) :
1987 eval "$3=yes" ;; #(
1988 *) :
1989 eval "$3=\$ac_type" ;;
1990esac
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1993fi
1994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001995 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997else
1998 break
1999fi
2000 done
2001fi
2002eval ac_res=\$$3
2003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2004$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002005 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007} # ac_fn_c_find_intX_t
2008
2009# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2010# --------------------------------------------
2011# Tries to find the compile-time value of EXPR in a program that includes
2012# INCLUDES, setting VAR accordingly. Returns whether the value could be
2013# computed
2014ac_fn_c_compute_int ()
2015{
2016 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2017 if test "$cross_compiling" = yes; then
2018 # Depending upon the size, compute the lo and hi bounds.
2019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) >= 0)];
2026test_array [0] = 0
2027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_lo=0 ac_mid=0
2034 while :; do
2035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036/* end confdefs.h. */
2037$4
2038int
2039main ()
2040{
2041static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2042test_array [0] = 0
2043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049 ac_hi=$ac_mid; break
2050else
2051 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2052 if test $ac_lo -le $ac_mid; then
2053 ac_lo= ac_hi=
2054 break
2055 fi
2056 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2057fi
2058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2059 done
2060else
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) < 0)];
2068test_array [0] = 0
2069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_hi=-1 ac_mid=-1
2076 while :; do
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2084test_array [0] = 0
2085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_lo=$ac_mid; break
2092else
2093 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2094 if test $ac_mid -le $ac_hi; then
2095 ac_lo= ac_hi=
2096 break
2097 fi
2098 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101 done
2102else
2103 ac_lo= ac_hi=
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108# Binary search between lo and hi bounds.
2109while test "x$ac_lo" != "x$ac_hi"; do
2110 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112/* end confdefs.h. */
2113$4
2114int
2115main ()
2116{
2117static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2118test_array [0] = 0
2119
2120 ;
2121 return 0;
2122}
2123_ACEOF
2124if ac_fn_c_try_compile "$LINENO"; then :
2125 ac_hi=$ac_mid
2126else
2127 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130done
2131case $ac_lo in #((
2132?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2133'') ac_retval=1 ;;
2134esac
2135 else
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139static long int longval () { return $2; }
2140static unsigned long int ulongval () { return $2; }
2141#include <stdio.h>
2142#include <stdlib.h>
2143int
2144main ()
2145{
2146
2147 FILE *f = fopen ("conftest.val", "w");
2148 if (! f)
2149 return 1;
2150 if (($2) < 0)
2151 {
2152 long int i = longval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%ld", i);
2156 }
2157 else
2158 {
2159 unsigned long int i = ulongval ();
2160 if (i != ($2))
2161 return 1;
2162 fprintf (f, "%lu", i);
2163 }
2164 /* Do not output a trailing newline, as this causes \r\n confusion
2165 on some platforms. */
2166 return ferror (f) || fclose (f) != 0;
2167
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_run "$LINENO"; then :
2173 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2174else
2175 ac_retval=1
2176fi
2177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2178 conftest.$ac_objext conftest.beam conftest.$ac_ext
2179rm -f conftest.val
2180
2181 fi
Gregory P. Smith69140482012-01-16 02:05:55 -08002182 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002183 as_fn_set_status $ac_retval
2184
2185} # ac_fn_c_compute_int
2186
2187# ac_fn_c_check_func LINENO FUNC VAR
2188# ----------------------------------
2189# Tests whether FUNC exists, setting the cache variable VAR accordingly
2190ac_fn_c_check_func ()
2191{
2192 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2194$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002195if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002196 $as_echo_n "(cached) " >&6
2197else
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2201 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2202#define $2 innocuous_$2
2203
2204/* System header to define __stub macros and hopefully few prototypes,
2205 which can conflict with char $2 (); below.
2206 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2207 <limits.h> exists even on freestanding compilers. */
2208
2209#ifdef __STDC__
2210# include <limits.h>
2211#else
2212# include <assert.h>
2213#endif
2214
2215#undef $2
2216
2217/* Override any GCC internal prototype to avoid an error.
2218 Use char because int might match the return type of a GCC
2219 builtin and then its argument prototype would still apply. */
2220#ifdef __cplusplus
2221extern "C"
2222#endif
2223char $2 ();
2224/* The GNU C library defines this for functions which it implements
2225 to always fail with ENOSYS. Some functions are actually named
2226 something starting with __ and the normal name is an alias. */
2227#if defined __stub_$2 || defined __stub___$2
2228choke me
2229#endif
2230
2231int
2232main ()
2233{
2234return $2 ();
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239if ac_fn_c_try_link "$LINENO"; then :
2240 eval "$3=yes"
2241else
2242 eval "$3=no"
2243fi
2244rm -f core conftest.err conftest.$ac_objext \
2245 conftest$ac_exeext conftest.$ac_ext
2246fi
2247eval ac_res=\$$3
2248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2249$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002250 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002251
2252} # ac_fn_c_check_func
2253
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002254# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2255# ---------------------------------------------
2256# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2257# accordingly.
2258ac_fn_c_check_decl ()
2259{
2260 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2261 as_decl_name=`echo $2|sed 's/ *(.*//'`
2262 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2264$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2265if eval \${$3+:} false; then :
2266 $as_echo_n "(cached) " >&6
2267else
2268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h. */
2270$4
2271int
2272main ()
2273{
2274#ifndef $as_decl_name
2275#ifdef __cplusplus
2276 (void) $as_decl_use;
2277#else
2278 (void) $as_decl_name;
2279#endif
2280#endif
2281
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
2287 eval "$3=yes"
2288else
2289 eval "$3=no"
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293eval ac_res=\$$3
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295$as_echo "$ac_res" >&6; }
2296 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297
2298} # ac_fn_c_check_decl
2299
Matthias Kloseb9621712010-04-24 17:59:49 +00002300# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2301# ----------------------------------------------------
2302# Tries to find if the field MEMBER exists in type AGGR, after including
2303# INCLUDES, setting cache variable VAR accordingly.
2304ac_fn_c_check_member ()
2305{
2306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2308$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002309if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002310 $as_echo_n "(cached) " >&6
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h. */
2330$5
2331int
2332main ()
2333{
2334static $2 ac_aggr;
2335if (sizeof ac_aggr.$3)
2336return 0;
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_compile "$LINENO"; then :
2342 eval "$4=yes"
2343else
2344 eval "$4=no"
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347fi
2348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349fi
2350eval ac_res=\$$4
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002354
2355} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002357This file contains any messages produced by compilers while
2358running configure, to aid debugging if configure makes a mistake.
2359
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002360It was created by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -08002361generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002362
2363 $ $0 $@
2364
2365_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002366exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002367{
2368cat <<_ASUNAME
2369## --------- ##
2370## Platform. ##
2371## --------- ##
2372
2373hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2374uname -m = `(uname -m) 2>/dev/null || echo unknown`
2375uname -r = `(uname -r) 2>/dev/null || echo unknown`
2376uname -s = `(uname -s) 2>/dev/null || echo unknown`
2377uname -v = `(uname -v) 2>/dev/null || echo unknown`
2378
2379/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2380/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2381
2382/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2383/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2384/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002385/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002386/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2387/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2388/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2389
2390_ASUNAME
2391
2392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2393for as_dir in $PATH
2394do
2395 IFS=$as_save_IFS
2396 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002397 $as_echo "PATH: $as_dir"
2398 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002400
2401} >&5
2402
2403cat >&5 <<_ACEOF
2404
2405
2406## ----------- ##
2407## Core tests. ##
2408## ----------- ##
2409
2410_ACEOF
2411
2412
2413# Keep a trace of the command line.
2414# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002415# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002416# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002417# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002418ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002419ac_configure_args0=
2420ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002421ac_must_keep_next=false
2422for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002423do
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 for ac_arg
2425 do
2426 case $ac_arg in
2427 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2428 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2429 | -silent | --silent | --silen | --sile | --sil)
2430 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002431 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 esac
2434 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002439 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002441 case $ac_arg in
2442 *=* | --config-cache | -C | -disable-* | --disable-* \
2443 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2444 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2445 | -with-* | --with-* | -without-* | --without-* | --x)
2446 case "$ac_configure_args0 " in
2447 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2448 esac
2449 ;;
2450 -* ) ac_must_keep_next=true ;;
2451 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002453 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002454 ;;
2455 esac
2456 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002457done
Matthias Kloseb9621712010-04-24 17:59:49 +00002458{ ac_configure_args0=; unset ac_configure_args0;}
2459{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002460
2461# When interrupted or exit'd, cleanup temporary files, and complete
2462# config.log. We remove comments because anyway the quotes in there
2463# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464# WARNING: Use '\'' to represent an apostrophe within the trap.
2465# 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 +00002466trap 'exit_status=$?
2467 # Save into config.log some information that might help in debugging.
2468 {
2469 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002470
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002471 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002472## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002473## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 echo
2475 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476(
2477 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2478 eval ac_val=\$$ac_var
2479 case $ac_val in #(
2480 *${as_nl}*)
2481 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002482 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2483$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac
2485 case $ac_var in #(
2486 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2488 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac ;;
2490 esac
2491 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2494 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 "s/'\''/'\''\\\\'\'''\''/g;
2497 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2498 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002499 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002501 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 esac |
2503 sort
2504)
Martin v. Löwis11437992002-04-12 09:54:03 +00002505 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002506
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002507 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002508## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002509## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 echo
2511 for ac_var in $ac_subst_vars
2512 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 eval ac_val=\$$ac_var
2514 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 done | sort
2519 echo
2520
2521 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002522 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002524## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 echo
2526 for ac_var in $ac_subst_files
2527 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 eval ac_val=\$$ac_var
2529 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 done | sort
2534 echo
2535 fi
2536
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002538 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002539## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002540## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 echo
2544 fi
2545 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 $as_echo "$as_me: caught signal $ac_signal"
2547 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 rm -f core *.core core.conftest.* &&
2550 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002553for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002554 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002555done
2556ac_signal=0
2557
2558# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002560
Matthias Kloseb9621712010-04-24 17:59:49 +00002561$as_echo "/* confdefs.h */" > confdefs.h
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563# Predefined preprocessor variables.
2564
2565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_NAME "$PACKAGE_NAME"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_VERSION "$PACKAGE_VERSION"
2575_ACEOF
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_STRING "$PACKAGE_STRING"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2583_ACEOF
2584
Matthias Kloseb9621712010-04-24 17:59:49 +00002585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_URL "$PACKAGE_URL"
2587_ACEOF
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589
2590# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002591# Prefer an explicitly selected file to automatically selected ones.
2592ac_site_file1=NONE
2593ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002595 # We do not want a PATH search for config.site.
2596 case $CONFIG_SITE in #((
2597 -*) ac_site_file1=./$CONFIG_SITE;;
2598 */*) ac_site_file1=$CONFIG_SITE;;
2599 *) ac_site_file1=./$CONFIG_SITE;;
2600 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 ac_site_file1=$prefix/share/config.site
2603 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604else
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 ac_site_file1=$ac_default_prefix/share/config.site
2606 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002608for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609do
Matthias Kloseb9621712010-04-24 17:59:49 +00002610 test "x$ac_site_file" = xNONE && continue
2611 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2613$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002615 . "$ac_site_file" \
2616 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2618as_fn_error $? "failed to load site script $ac_site_file
Gregory P. Smith69140482012-01-16 02:05:55 -08002619See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002620 fi
2621done
2622
2623if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 # Some versions of bash will fail to source /dev/null (special files
2625 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2626 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2627 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2628$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2631 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 esac
2633 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002634else
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2636$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 >$cache_file
2638fi
2639
2640# Check that the precious variables saved in the cache have kept the same
2641# value.
2642ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2645 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2647 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 case $ac_old_set,$ac_new_set in
2649 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2651$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 +00002652 ac_cache_corrupted=: ;;
2653 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2655$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 ac_cache_corrupted=: ;;
2657 ,);;
2658 *)
2659 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 # differences in whitespace do not lead to failure.
2661 ac_old_val_w=`echo x $ac_old_val`
2662 ac_new_val_w=`echo x $ac_new_val`
2663 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2665$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2666 ac_cache_corrupted=:
2667 else
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2669$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2670 eval $ac_var=\$ac_old_val
2671 fi
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2673$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2675$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 fi;;
2677 esac
2678 # Pass precious variables to config.status.
2679 if test "$ac_new_set" = set; then
2680 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 *) ac_arg=$ac_var=$ac_new_val ;;
2683 esac
2684 case " $ac_configure_args " in
2685 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002686 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 esac
2688 fi
2689done
2690if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002691 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2694$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002695 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002697## -------------------- ##
2698## Main body of script. ##
2699## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700
Guido van Rossum7f43da71994-08-01 12:15:30 +00002701ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002702ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2705ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002706
Guido van Rossum627b2d71993-12-24 10:39:16 +00002707
Michael W. Hudson54241132001-12-07 15:38:26 +00002708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002710
2711
Martin v. Löwis11437992002-04-12 09:54:03 +00002712
Benjamin Petersond23f8222009-04-05 19:13:16 +00002713if test "$prefix" != "/"; then
2714 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2715fi
2716
2717
Martin v. Löwis11437992002-04-12 09:54:03 +00002718
2719
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002720# We don't use PACKAGE_ variables, and they cause conflicts
2721# with other autoconf-based packages that include Python.h
2722grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2723rm confdefs.h
2724mv confdefs.h.new confdefs.h
2725
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002726
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002727VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002728
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002729# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002730
2731SOVERSION=1.0
2732
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002733# The later defininition of _XOPEN_SOURCE disables certain features
2734# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2735
Matthias Kloseb9621712010-04-24 17:59:49 +00002736$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002737
2738
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002739# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2740# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2741# them.
2742
Matthias Kloseb9621712010-04-24 17:59:49 +00002743$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002744
2745
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002746# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2747# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2748# them.
2749
Matthias Kloseb9621712010-04-24 17:59:49 +00002750$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002751
2752
Martin v. Löwisd6320502004-08-12 13:45:08 +00002753# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2754# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2755
Matthias Kloseb9621712010-04-24 17:59:49 +00002756$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002757
2758
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002759# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2760# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2761# them.
2762
Matthias Kloseb9621712010-04-24 17:59:49 +00002763$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002764
2765
2766
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002767define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002768
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002769# Arguments passed to configure.
2770
2771CONFIG_ARGS="$ac_configure_args"
2772
Matthias Kloseb9621712010-04-24 17:59:49 +00002773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2774$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002776if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002778 case $enableval in
2779 yes)
2780 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002781 if test ! -d "${enableval}"
2782 then
2783 enableval=/
2784 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002785 ;;
2786 esac
2787 case $enableval in
2788 no)
2789 UNIVERSALSDK=
2790 enable_universalsdk=
2791 ;;
2792 *)
2793 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794 if test ! -d "${UNIVERSALSDK}"
2795 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002796 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002797 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002798 ;;
2799 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002800
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002801
Thomas Wouters477c8d52006-05-27 19:21:47 +00002802else
2803
2804 UNIVERSALSDK=
2805 enable_universalsdk=
2806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002807fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002808
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002809if test -n "${UNIVERSALSDK}"
2810then
Matthias Kloseb9621712010-04-24 17:59:49 +00002811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2812$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002813else
Matthias Kloseb9621712010-04-24 17:59:49 +00002814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2815$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002816fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002818
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002819
2820
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002821UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002822
Matthias Kloseb9621712010-04-24 17:59:49 +00002823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2824$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002825
2826# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002827if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002828 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2830$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002831 UNIVERSAL_ARCHS="$withval"
2832
2833else
2834
Matthias Kloseb9621712010-04-24 17:59:49 +00002835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2836$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002837
2838fi
2839
2840
2841
2842
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002843
2844# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002845if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002846 withval=$with_framework_name;
2847 PYTHONFRAMEWORK=${withval}
2848 PYTHONFRAMEWORKDIR=${withval}.framework
2849 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2850
2851else
2852
2853 PYTHONFRAMEWORK=Python
2854 PYTHONFRAMEWORKDIR=Python.framework
2855 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2856
2857fi
2858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002860if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002862 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002863 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002864 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002865 esac
2866 case $enableval in
2867 no)
2868 PYTHONFRAMEWORK=
2869 PYTHONFRAMEWORKDIR=no-framework
2870 PYTHONFRAMEWORKPREFIX=
2871 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002872 FRAMEWORKINSTALLFIRST=
2873 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002874 FRAMEWORKALTINSTALLFIRST=
2875 FRAMEWORKALTINSTALLLAST=
2876 if test "x${prefix}" = "xNONE"; then
2877 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2878 else
2879 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2880 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002881 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002882 ;;
2883 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002884 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002885 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002886 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002887 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002888 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2889 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002890 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002891
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002892 if test "x${prefix}" = "xNONE" ; then
2893 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002894
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002895 else
2896 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2897 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002898
2899 case "${enableval}" in
2900 /System*)
2901 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2902 if test "${prefix}" = "NONE" ; then
2903 # See below
2904 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2905 fi
2906 ;;
2907
2908 /Library*)
2909 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2910 ;;
2911
2912 */Library/Frameworks)
2913 MDIR="`dirname "${enableval}"`"
2914 MDIR="`dirname "${MDIR}"`"
2915 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2916
2917 if test "${prefix}" = "NONE"; then
2918 # User hasn't specified the
2919 # --prefix option, but wants to install
2920 # the framework in a non-default location,
2921 # ensure that the compatibility links get
2922 # installed relative to that prefix as well
2923 # instead of in /usr/local.
2924 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2925 fi
2926 ;;
2927
2928 *)
2929 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2930 ;;
2931 esac
2932
Jack Jansen127e56e2001-09-11 14:41:54 +00002933 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002934
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002935 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002936 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002937 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002939 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002940
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002941 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2942
2943 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2944
Jack Jansene578a632001-08-15 01:27:14 +00002945 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002946
Guido van Rossum563e7081996-09-10 18:20:48 +00002947else
Martin v. Löwis11437992002-04-12 09:54:03 +00002948
Jack Jansene578a632001-08-15 01:27:14 +00002949 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002950 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002951 PYTHONFRAMEWORKPREFIX=
2952 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002953 FRAMEWORKINSTALLFIRST=
2954 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002955 FRAMEWORKALTINSTALLFIRST=
2956 FRAMEWORKALTINSTALLLAST=
2957 if test "x${prefix}" = "xNONE" ; then
2958 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2959 else
2960 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2961 fi
Jack Jansene578a632001-08-15 01:27:14 +00002962 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002963
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002965fi
2966
Thomas Wouters477c8d52006-05-27 19:21:47 +00002967
2968
Michael W. Hudson54241132001-12-07 15:38:26 +00002969
2970
2971
2972
Jack Jansene578a632001-08-15 01:27:14 +00002973
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002974
2975
2976
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002977
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002978
Jack Jansene578a632001-08-15 01:27:14 +00002979##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002980## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002981## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002982##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002983# Set name for machine-dependent library files
2984
Matthias Kloseb9621712010-04-24 17:59:49 +00002985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2986$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002987if test -z "$MACHDEP"
2988then
Guido van Rossum563e7081996-09-10 18:20:48 +00002989 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002990 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002991 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002992 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002993 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002994 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002995 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002996 ac_md_system=`echo $ac_sys_system |
2997 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2998 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002999 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003000 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003001
Guido van Rossum07397971997-04-29 21:49:50 +00003002 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02003003 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003004 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003005 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003006 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003007 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003008 esac
3009fi
Guido van Rossum91922671997-10-09 20:24:13 +00003010
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003011# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3012# disable features if it is defined, without any means to access these
3013# features as extensions. For these systems, we skip the definition of
3014# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3015# some feature, make sure there is no alternative way to access this
3016# feature. Also, when using wildcards, make sure you have verified the
3017# need for not defining _XOPEN_SOURCE on all systems matching the
3018# wildcard, and that the wildcard does not include future systems
3019# (which may remove their limitations).
3020case $ac_sys_system/$ac_sys_release in
3021 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3022 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003023 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003024 # In addition, Stefan Krah confirms that issue #1244610 exists through
3025 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003026 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003027 define_xopen_source=no
3028 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3029 # also defined. This can be overridden by defining _BSD_SOURCE
3030 # As this has a different meaning on Linux, only define it on OpenBSD
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003033
3034 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003035 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003036 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3037 # also defined. This can be overridden by defining _BSD_SOURCE
3038 # As this has a different meaning on Linux, only define it on OpenBSD
3039
Matthias Kloseb9621712010-04-24 17:59:49 +00003040$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003041
3042 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003043 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3044 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3045 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003046 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 +00003047 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003048 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3049 # request to enable features supported by the standard as a request
3050 # to disable features not supported by the standard. The best way
3051 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3052 # entirely and define __EXTENSIONS__ instead.
3053 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003054 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003055 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3056 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003057 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003058 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003059 define_xopen_source=no;;
3060 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003061 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003062 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003063 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003064 # On FreeBSD 4, the math functions C89 does not cover are never defined
3065 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3066 FreeBSD/4.*)
3067 define_xopen_source=no;;
3068 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3069 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3070 # identifies itself as Darwin/7.*
3071 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3072 # disables platform specific features beyond repair.
3073 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3074 # has no effect, don't bother defining them
3075 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003076 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003077 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003078 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003079 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3080 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3081 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003082 AIX/4)
3083 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003084 AIX/5)
3085 if test `uname -r` -eq 1; then
3086 define_xopen_source=no
3087 fi
3088 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003089 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3090 # defining NI_NUMERICHOST.
3091 QNX/6.3.2)
3092 define_xopen_source=no
3093 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003094
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003095esac
3096
3097if test $define_xopen_source = yes
3098then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003099
Matthias Kloseb9621712010-04-24 17:59:49 +00003100$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003101
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003102
3103 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3104 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3105 # several APIs are not declared. Since this is also needed in some
3106 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003107
Matthias Kloseb9621712010-04-24 17:59:49 +00003108$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003109
3110
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003113
3114
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003115fi
3116
Guido van Rossum91922671997-10-09 20:24:13 +00003117#
3118# SGI compilers allow the specification of the both the ABI and the
3119# ISA on the command line. Depending on the values of these switches,
3120# different and often incompatable code will be generated.
3121#
3122# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3123# thus supply support for various ABI/ISA combinations. The MACHDEP
3124# variable is also adjusted.
3125#
3126
3127if test ! -z "$SGI_ABI"
3128then
3129 CC="cc $SGI_ABI"
3130 LDFLAGS="$SGI_ABI $LDFLAGS"
3131 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3134$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003135
Jack Jansen6b08a402004-06-03 12:41:45 +00003136# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3137# it may influence the way we can build extensions, so distutils
3138# needs to check it
3139
Thomas Wouters477c8d52006-05-27 19:21:47 +00003140
Jack Jansen6b08a402004-06-03 12:41:45 +00003141CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003142EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003143
Matthias Kloseb9621712010-04-24 17:59:49 +00003144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3145$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003146ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3148$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003149
Guido van Rossum627b2d71993-12-24 10:39:16 +00003150# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003151
3152# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3153# for debug/optimization stuff. BASECFLAGS is for flags that are required
3154# just to get things to compile and link. Users are free to override OPT
3155# when running configure or make. The build should not break if they do.
3156# BASECFLAGS should generally not be messed with, however.
3157
3158# XXX shouldn't some/most/all of this code be merged with the stuff later
3159# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3161$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003164if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003166 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003167 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003168 without_gcc=yes;;
3169 yes) CC=gcc
3170 without_gcc=no;;
3171 *) CC=$withval
3172 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003173 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003174else
Martin v. Löwis11437992002-04-12 09:54:03 +00003175
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003176 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003177 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003178 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003179 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003180 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181fi
3182
Matthias Kloseb9621712010-04-24 17:59:49 +00003183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3184$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003185
Guido van Rossum8b131c51995-03-09 14:10:13 +00003186# If the user switches compilers, we can't believe the cache
3187if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3188then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003189 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003190(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003191fi
3192
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003193# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3194# when the compiler supports them, but we don't always want -O2, and
3195# we set -g later.
3196if test -z "$CFLAGS"; then
3197 CFLAGS=
3198fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003199ac_ext=c
3200ac_cpp='$CPP $CPPFLAGS'
3201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3203ac_compiler_gnu=$ac_cv_c_compiler_gnu
3204if test -n "$ac_tool_prefix"; then
3205 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3206set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3208$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003209if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003210 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003211else
3212 if test -n "$CC"; then
3213 ac_cv_prog_CC="$CC" # Let the user override the test.
3214else
Martin v. Löwis11437992002-04-12 09:54:03 +00003215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3216for as_dir in $PATH
3217do
3218 IFS=$as_save_IFS
3219 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003220 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221 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 +00003222 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003223 $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 +00003224 break 2
3225 fi
3226done
Matthias Kloseb9621712010-04-24 17:59:49 +00003227 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003229
Jack Jansendd19cf82001-12-06 22:36:17 +00003230fi
3231fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003232CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003233if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3235$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003236else
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3238$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003239fi
3240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241
Martin v. Löwis11437992002-04-12 09:54:03 +00003242fi
3243if test -z "$ac_cv_prog_CC"; then
3244 ac_ct_CC=$CC
3245 # Extract the first word of "gcc", so it can be a program name with args.
3246set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3248$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003249if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003251else
3252 if test -n "$ac_ct_CC"; then
3253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3254else
3255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3256for as_dir in $PATH
3257do
3258 IFS=$as_save_IFS
3259 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003261 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 +00003262 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 $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 +00003264 break 2
3265 fi
3266done
Matthias Kloseb9621712010-04-24 17:59:49 +00003267 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003269
3270fi
3271fi
3272ac_ct_CC=$ac_cv_prog_ac_ct_CC
3273if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3275$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003276else
Matthias Kloseb9621712010-04-24 17:59:49 +00003277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3278$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003279fi
3280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003281 if test "x$ac_ct_CC" = x; then
3282 CC=""
3283 else
3284 case $cross_compiling:$ac_tool_warned in
3285yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003286{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3287$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003288ac_tool_warned=yes ;;
3289esac
3290 CC=$ac_ct_CC
3291 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003292else
3293 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003294fi
3295
Jack Jansendd19cf82001-12-06 22:36:17 +00003296if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297 if test -n "$ac_tool_prefix"; then
3298 # 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 +00003299set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3301$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003302if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003304else
3305 if test -n "$CC"; then
3306 ac_cv_prog_CC="$CC" # Let the user override the test.
3307else
Martin v. Löwis11437992002-04-12 09:54:03 +00003308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3309for as_dir in $PATH
3310do
3311 IFS=$as_save_IFS
3312 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314 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 +00003315 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003316 $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 +00003317 break 2
3318 fi
3319done
Matthias Kloseb9621712010-04-24 17:59:49 +00003320 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003322
3323fi
3324fi
3325CC=$ac_cv_prog_CC
3326if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3328$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003329else
Matthias Kloseb9621712010-04-24 17:59:49 +00003330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3331$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003332fi
3333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003334
Martin v. Löwis11437992002-04-12 09:54:03 +00003335 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003336fi
3337if test -z "$CC"; then
3338 # Extract the first word of "cc", so it can be a program name with args.
3339set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3341$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003342if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003343 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003344else
3345 if test -n "$CC"; then
3346 ac_cv_prog_CC="$CC" # Let the user override the test.
3347else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3350for as_dir in $PATH
3351do
3352 IFS=$as_save_IFS
3353 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003355 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 +00003356 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3357 ac_prog_rejected=yes
3358 continue
3359 fi
3360 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 $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 +00003362 break 2
3363 fi
3364done
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003366IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003367
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003368if test $ac_prog_rejected = yes; then
3369 # We found a bogon in the path, so make sure we never use it.
3370 set dummy $ac_cv_prog_CC
3371 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003373 # We chose a different compiler from the bogus one.
3374 # However, it has the same basename, so the bogon will be chosen
3375 # first if we set CC to just the basename; use the full file name.
3376 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003377 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003378 fi
3379fi
3380fi
3381fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003382CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003383if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3385$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003386else
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3388$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003389fi
3390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391
Martin v. Löwis11437992002-04-12 09:54:03 +00003392fi
3393if test -z "$CC"; then
3394 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003395 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003396 do
3397 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3398set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3400$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003401if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003402 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003403else
3404 if test -n "$CC"; then
3405 ac_cv_prog_CC="$CC" # Let the user override the test.
3406else
Martin v. Löwis11437992002-04-12 09:54:03 +00003407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3408for as_dir in $PATH
3409do
3410 IFS=$as_save_IFS
3411 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003413 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 +00003414 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 $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 +00003416 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003417 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003418done
Matthias Kloseb9621712010-04-24 17:59:49 +00003419 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003420IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003421
3422fi
3423fi
3424CC=$ac_cv_prog_CC
3425if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3427$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003428else
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3430$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003431fi
3432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 test -n "$CC" && break
3435 done
3436fi
3437if test -z "$CC"; then
3438 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003439 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003440do
3441 # Extract the first word of "$ac_prog", so it can be a program name with args.
3442set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3444$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003445if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003447else
3448 if test -n "$ac_ct_CC"; then
3449 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3450else
3451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3452for as_dir in $PATH
3453do
3454 IFS=$as_save_IFS
3455 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 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 +00003458 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003459 $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 +00003460 break 2
3461 fi
3462done
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003465
Martin v. Löwis11437992002-04-12 09:54:03 +00003466fi
3467fi
3468ac_ct_CC=$ac_cv_prog_ac_ct_CC
3469if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3471$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472else
Matthias Kloseb9621712010-04-24 17:59:49 +00003473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3474$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003475fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 test -n "$ac_ct_CC" && break
3479done
Michael W. Hudson54241132001-12-07 15:38:26 +00003480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481 if test "x$ac_ct_CC" = x; then
3482 CC=""
3483 else
3484 case $cross_compiling:$ac_tool_warned in
3485yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3487$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488ac_tool_warned=yes ;;
3489esac
3490 CC=$ac_ct_CC
3491 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003492fi
3493
3494fi
3495
3496
Matthias Kloseb9621712010-04-24 17:59:49 +00003497test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003499as_fn_error $? "no acceptable C compiler found in \$PATH
Gregory P. Smith69140482012-01-16 02:05:55 -08003500See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003501
3502# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003503$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3504set X $ac_compile
3505ac_compiler=$2
3506for ac_option in --version -v -V -qversion; do
3507 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508case "(($ac_try" in
3509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3510 *) ac_try_echo=$ac_try;;
3511esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3513$as_echo "$ac_try_echo"; } >&5
3514 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003515 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003516 if test -s conftest.err; then
3517 sed '10a\
3518... rest of stderr output deleted ...
3519 10q' conftest.err >conftest.er1
3520 cat conftest.er1 >&5
3521 fi
3522 rm -f conftest.er1 conftest.err
3523 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3524 test $ac_status = 0; }
3525done
Martin v. Löwis11437992002-04-12 09:54:03 +00003526
Matthias Kloseb9621712010-04-24 17:59:49 +00003527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003528/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003529
Martin v. Löwis11437992002-04-12 09:54:03 +00003530int
3531main ()
3532{
3533
3534 ;
3535 return 0;
3536}
3537_ACEOF
3538ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003539ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003540# Try to create an executable without -o first, disregard a.out.
3541# It will help us diagnose broken compilers, and finding out an intuition
3542# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3544$as_echo_n "checking whether the C compiler works... " >&6; }
3545ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3546
3547# The possible output files:
3548ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550ac_rmfiles=
3551for ac_file in $ac_files
3552do
3553 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003554 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3556 esac
3557done
3558rm -f $ac_rmfiles
3559
Matthias Kloseb9621712010-04-24 17:59:49 +00003560if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3566$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003567 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3570 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3572# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3573# in a Makefile. We should not override ac_cv_exeext if it was cached,
3574# so that the user can short-circuit this test for compilers unknown to
3575# Autoconf.
3576for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003577do
3578 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003581 ;;
3582 [ab].out )
3583 # We found the default executable, but exeext='' is most
3584 # certainly right.
3585 break;;
3586 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003587 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588 then :; else
3589 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3590 fi
3591 # We set ac_cv_exeext here because the later test for it is not
3592 # safe: cross compilers may not add the suffix if given an `-o'
3593 # argument, so we may need to know it at that point already.
3594 # Even if this section looks crufty: it has the advantage of
3595 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003596 break;;
3597 * )
3598 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 esac
3600done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601test "$ac_cv_exeext" = no && ac_cv_exeext=
3602
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003603else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604 ac_file=''
3605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003606if test -z "$ac_file"; then :
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
3609$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003610sed 's/^/| /' conftest.$ac_ext >&5
3611
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003614as_fn_error 77 "C compiler cannot create executables
Gregory P. Smith69140482012-01-16 02:05:55 -08003615See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003616else
3617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3618$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3621$as_echo_n "checking for C compiler default output file name... " >&6; }
3622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3623$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003625
Matthias Kloseb9621712010-04-24 17:59:49 +00003626rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003627ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3629$as_echo_n "checking for suffix of executables... " >&6; }
3630if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631case "(($ac_try" in
3632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3633 *) ac_try_echo=$ac_try;;
3634esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3636$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3640 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003641 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3642# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3643# work properly (i.e., refer to `conftest.exe'), while it won't with
3644# `rm'.
3645for ac_file in conftest.exe conftest conftest.*; do
3646 test -f "$ac_file" || continue
3647 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003649 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3650 break;;
3651 * ) break;;
3652 esac
3653done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003654else
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003657as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Gregory P. Smith69140482012-01-16 02:05:55 -08003658See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003660rm -f conftest conftest$ac_cv_exeext
3661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3662$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003663
3664rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003665EXEEXT=$ac_cv_exeext
3666ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3668/* end confdefs.h. */
3669#include <stdio.h>
3670int
3671main ()
3672{
3673FILE *f = fopen ("conftest.out", "w");
3674 return ferror (f) || fclose (f) != 0;
3675
3676 ;
3677 return 0;
3678}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003680ac_clean_files="$ac_clean_files conftest.out"
3681# Check that the compiler produces executables we can run. If not, either
3682# the compiler is broken, or we cross compile.
3683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3684$as_echo_n "checking whether we are cross compiling... " >&6; }
3685if test "$cross_compiling" != yes; then
3686 { { ac_try="$ac_link"
3687case "(($ac_try" in
3688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3689 *) ac_try_echo=$ac_try;;
3690esac
3691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3692$as_echo "$ac_try_echo"; } >&5
3693 (eval "$ac_link") 2>&5
3694 ac_status=$?
3695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3696 test $ac_status = 0; }
3697 if { ac_try='./conftest$ac_cv_exeext'
3698 { { case "(($ac_try" in
3699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3700 *) ac_try_echo=$ac_try;;
3701esac
3702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3703$as_echo "$ac_try_echo"; } >&5
3704 (eval "$ac_try") 2>&5
3705 ac_status=$?
3706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3707 test $ac_status = 0; }; }; then
3708 cross_compiling=no
3709 else
3710 if test "$cross_compiling" = maybe; then
3711 cross_compiling=yes
3712 else
3713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003715as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003716If you meant to cross compile, use \`--host'.
Gregory P. Smith69140482012-01-16 02:05:55 -08003717See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 fi
3719 fi
3720fi
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3722$as_echo "$cross_compiling" >&6; }
3723
3724rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3725ac_clean_files=$ac_clean_files_save
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3727$as_echo_n "checking for suffix of object files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003728if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $as_echo_n "(cached) " >&6
3730else
3731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003732/* end confdefs.h. */
3733
3734int
3735main ()
3736{
3737
3738 ;
3739 return 0;
3740}
3741_ACEOF
3742rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003743if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744case "(($ac_try" in
3745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3746 *) ac_try_echo=$ac_try;;
3747esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3749$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3753 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754 for ac_file in conftest.o conftest.obj conftest.*; do
3755 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3759 break;;
3760 esac
3761done
3762else
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003764sed 's/^/| /' conftest.$ac_ext >&5
3765
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003768as_fn_error $? "cannot compute suffix of object files: cannot compile
Gregory P. Smith69140482012-01-16 02:05:55 -08003769See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003770fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003771rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3774$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003775OBJEXT=$ac_cv_objext
3776ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3778$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003779if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003781else
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003784
Martin v. Löwis11437992002-04-12 09:54:03 +00003785int
3786main ()
3787{
3788#ifndef __GNUC__
3789 choke me
3790#endif
3791
3792 ;
3793 return 0;
3794}
3795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003796if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 ac_compiler_gnu=yes
3798else
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003802ac_cv_c_compiler_gnu=$ac_compiler_gnu
3803
3804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3806$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3807if test $ac_compiler_gnu = yes; then
3808 GCC=yes
3809else
3810 GCC=
3811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003812ac_test_CFLAGS=${CFLAGS+set}
3813ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3815$as_echo_n "checking whether $CC accepts -g... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003816if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003818else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819 ac_save_c_werror_flag=$ac_c_werror_flag
3820 ac_c_werror_flag=yes
3821 ac_cv_prog_cc_g=no
3822 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826int
3827main ()
3828{
3829
3830 ;
3831 return 0;
3832}
3833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003834if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003835 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003836else
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 CFLAGS=""
3838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839/* end confdefs.h. */
3840
3841int
3842main ()
3843{
3844
3845 ;
3846 return 0;
3847}
3848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003849if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850
Matthias Kloseb9621712010-04-24 17:59:49 +00003851else
3852 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855/* end confdefs.h. */
3856
3857int
3858main ()
3859{
3860
3861 ;
3862 return 0;
3863}
3864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003865if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3873 ac_c_werror_flag=$ac_save_c_werror_flag
3874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3876$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003877if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003879elif test $ac_cv_prog_cc_g = yes; then
3880 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003881 CFLAGS="-g -O2"
3882 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003883 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884 fi
3885else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003886 if test "$GCC" = yes; then
3887 CFLAGS="-O2"
3888 else
3889 CFLAGS=
3890 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3893$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003894if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003896else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003898ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003900/* end confdefs.h. */
3901#include <stdarg.h>
3902#include <stdio.h>
3903#include <sys/types.h>
3904#include <sys/stat.h>
3905/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3906struct buf { int x; };
3907FILE * (*rcsopen) (struct buf *, struct stat *, int);
3908static char *e (p, i)
3909 char **p;
3910 int i;
3911{
3912 return p[i];
3913}
3914static char *f (char * (*g) (char **, int), char **p, ...)
3915{
3916 char *s;
3917 va_list v;
3918 va_start (v,p);
3919 s = g (p, va_arg (v,int));
3920 va_end (v);
3921 return s;
3922}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003923
3924/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3925 function prototypes and stuff, but not '\xHH' hex character constants.
3926 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003928 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3929 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003931int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3934 inside strings and character constants. */
3935#define FOO(x) 'x'
3936int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3937
Skip Montanaro6dead952003-09-25 14:50:04 +00003938int test (int i, double x);
3939struct s1 {int (*f) (int a);};
3940struct s2 {int (*f) (double a);};
3941int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3942int argc;
3943char **argv;
3944int
3945main ()
3946{
3947return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3948 ;
3949 return 0;
3950}
3951_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3953 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003954do
3955 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959rm -f core conftest.err conftest.$ac_objext
3960 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003961done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003963CC=$ac_save_CC
3964
3965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966# AC_CACHE_VAL
3967case "x$ac_cv_prog_cc_c89" in
3968 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3970$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3973$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003974 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3977$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003978esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003979if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003980
Matthias Kloseb9621712010-04-24 17:59:49 +00003981fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003982
Martin v. Löwis11437992002-04-12 09:54:03 +00003983ac_ext=c
3984ac_cpp='$CPP $CPPFLAGS'
3985ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3986ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3987ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003989
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003990
3991
Matthias Kloseb9621712010-04-24 17:59:49 +00003992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3993$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003996if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003998
3999 case $withval in
4000 no) with_cxx_main=no
4001 MAINCC='$(CC)';;
4002 yes) with_cxx_main=yes
4003 MAINCC='$(CXX)';;
4004 *) with_cxx_main=yes
4005 MAINCC=$withval
4006 if test -z "$CXX"
4007 then
4008 CXX=$withval
4009 fi;;
4010 esac
4011else
4012
4013 with_cxx_main=no
4014 MAINCC='$(CC)'
4015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016fi
4017
Matthias Kloseb9621712010-04-24 17:59:49 +00004018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4019$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004020
4021preset_cxx="$CXX"
4022if test -z "$CXX"
4023then
4024 case "$CC" in
4025 gcc) # Extract the first word of "g++", so it can be a program name with args.
4026set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4028$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004029if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004031else
4032 case $CXX in
4033 [\\/]* | ?:[\\/]*)
4034 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4035 ;;
4036 *)
4037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4038for as_dir in notfound
4039do
4040 IFS=$as_save_IFS
4041 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004043 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 +00004044 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004046 break 2
4047 fi
4048done
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004050IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004051
4052 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4053 ;;
4054esac
4055fi
4056CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004057if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4059$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004060else
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004064
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004065 ;;
4066 cc) # Extract the first word of "c++", so it can be a program name with args.
4067set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4069$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004070if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004072else
4073 case $CXX in
4074 [\\/]* | ?:[\\/]*)
4075 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4076 ;;
4077 *)
4078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079for as_dir in notfound
4080do
4081 IFS=$as_save_IFS
4082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 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 +00004085 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004087 break 2
4088 fi
4089done
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004092
4093 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4094 ;;
4095esac
4096fi
4097CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004098if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4100$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004101else
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004105
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004106 ;;
4107 esac
4108 if test "$CXX" = "notfound"
4109 then
4110 CXX=""
4111 fi
4112fi
4113if test -z "$CXX"
4114then
4115 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4116do
4117 # Extract the first word of "$ac_prog", so it can be a program name with args.
4118set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4120$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004121if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123else
4124 if test -n "$CXX"; then
4125 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4126else
4127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4128for as_dir in $PATH
4129do
4130 IFS=$as_save_IFS
4131 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133 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 +00004134 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004136 break 2
4137 fi
4138done
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004141
4142fi
4143fi
4144CXX=$ac_cv_prog_CXX
4145if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4147$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148else
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004151fi
4152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004153
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004154 test -n "$CXX" && break
4155done
4156test -n "$CXX" || CXX="notfound"
4157
4158 if test "$CXX" = "notfound"
4159 then
4160 CXX=""
4161 fi
4162fi
4163if test "$preset_cxx" != "$CXX"
4164then
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004166
4167 By default, distutils will build C++ extension modules with \"$CXX\".
4168 If this is not intended, then set CXX on the configure command line.
4169 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004170$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004171
4172 By default, distutils will build C++ extension modules with \"$CXX\".
4173 If this is not intended, then set CXX on the configure command line.
4174 " >&2;}
4175fi
4176
4177
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4179$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4180save_LDFLAGS="$LDFLAGS"
4181LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004182
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184/* end confdefs.h. */
4185
4186int
4187main ()
4188{
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
4194if ac_fn_c_try_link "$LINENO"; then :
4195 NO_AS_NEEDED="-Wl,--no-as-needed"
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4197$as_echo "yes" >&6; }
4198else
4199 NO_AS_NEEDED=""
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4201$as_echo "no" >&6; }
4202fi
4203rm -f core conftest.err conftest.$ac_objext \
4204 conftest$ac_exeext conftest.$ac_ext
4205LDFLAGS="$save_LDFLAGS"
4206
4207
4208
4209# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004210ac_ext=c
4211ac_cpp='$CPP $CPPFLAGS'
4212ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4213ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4214ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4216$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004217# On Suns, sometimes $CPP names a directory.
4218if test -n "$CPP" && test -d "$CPP"; then
4219 CPP=
4220fi
4221if test -z "$CPP"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08004222 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004224else
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 # Double quotes because CPP needs to be expanded
4226 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4227 do
4228 ac_preproc_ok=false
4229for ac_c_preproc_warn_flag in '' yes
4230do
4231 # Use a header file that comes with gcc, so configuring glibc
4232 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004233 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4234 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004235 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004236 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
4239#ifdef __STDC__
4240# include <limits.h>
4241#else
4242# include <assert.h>
4243#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004247
Matthias Kloseb9621712010-04-24 17:59:49 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Broken: fails on valid input.
4250continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004251fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004252rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004258#include <ac_nonexistent.h>
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: success on invalid input.
4262continue
4263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # Passes both tests.
4265ac_preproc_ok=:
4266break
4267fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004268rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004269
4270done
4271# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004272rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004273if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 break
4275fi
4276
4277 done
4278 ac_cv_prog_CPP=$CPP
4279
4280fi
4281 CPP=$ac_cv_prog_CPP
4282else
4283 ac_cv_prog_CPP=$CPP
4284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4286$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004287ac_preproc_ok=false
4288for ac_c_preproc_warn_flag in '' yes
4289do
4290 # Use a header file that comes with gcc, so configuring glibc
4291 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004292 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4293 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004294 # On the NeXT, cc -E runs the code through the compiler's parser,
4295 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004297/* end confdefs.h. */
4298#ifdef __STDC__
4299# include <limits.h>
4300#else
4301# include <assert.h>
4302#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004305if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004306
Matthias Kloseb9621712010-04-24 17:59:49 +00004307else
Martin v. Löwis11437992002-04-12 09:54:03 +00004308 # Broken: fails on valid input.
4309continue
4310fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004311rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004317#include <ac_nonexistent.h>
4318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004319if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004320 # Broken: success on invalid input.
4321continue
4322else
Martin v. Löwis11437992002-04-12 09:54:03 +00004323 # Passes both tests.
4324ac_preproc_ok=:
4325break
4326fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004327rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004328
4329done
4330# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004331rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004332if $ac_preproc_ok; then :
4333
Martin v. Löwis11437992002-04-12 09:54:03 +00004334else
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4336$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004337as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Gregory P. Smith69140482012-01-16 02:05:55 -08004338See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004339fi
4340
4341ac_ext=c
4342ac_cpp='$CPP $CPPFLAGS'
4343ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4344ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4345ac_compiler_gnu=$ac_cv_c_compiler_gnu
4346
4347
Matthias Kloseb9621712010-04-24 17:59:49 +00004348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4349$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004350if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004352else
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 # Loop through the user's path and test for each of PROGNAME-LIST
4356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4358do
4359 IFS=$as_save_IFS
4360 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 for ac_prog in grep ggrep; do
4362 for ac_exec_ext in '' $ac_executable_extensions; do
4363 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4364 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4365# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 # Check for GNU $ac_path_GREP
4367case `"$ac_path_GREP" --version 2>&1` in
4368*GNU*)
4369 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4370*)
4371 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 while :
4374 do
4375 cat "conftest.in" "conftest.in" >"conftest.tmp"
4376 mv "conftest.tmp" "conftest.in"
4377 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4380 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4383 # Best one so far, save it but keep looking for a better one
4384 ac_cv_path_GREP="$ac_path_GREP"
4385 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004386 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387 # 10*(2^10) chars as input seems more than enough
4388 test $ac_count -gt 10 && break
4389 done
4390 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4391esac
4392
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 $ac_path_GREP_found && break 3
4394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004399 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 +00004400 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401else
4402 ac_cv_path_GREP=$GREP
4403fi
4404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4407$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 GREP="$ac_cv_path_GREP"
4409
4410
Matthias Kloseb9621712010-04-24 17:59:49 +00004411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4412$as_echo_n "checking for egrep... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004413if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004414 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415else
4416 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4417 then ac_cv_path_EGREP="$GREP -E"
4418 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004419 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 # Loop through the user's path and test for each of PROGNAME-LIST
4422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4424do
4425 IFS=$as_save_IFS
4426 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 for ac_prog in egrep; do
4428 for ac_exec_ext in '' $ac_executable_extensions; do
4429 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4430 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4431# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004432 # Check for GNU $ac_path_EGREP
4433case `"$ac_path_EGREP" --version 2>&1` in
4434*GNU*)
4435 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4436*)
4437 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 while :
4440 do
4441 cat "conftest.in" "conftest.in" >"conftest.tmp"
4442 mv "conftest.tmp" "conftest.in"
4443 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004445 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4446 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4449 # Best one so far, save it but keep looking for a better one
4450 ac_cv_path_EGREP="$ac_path_EGREP"
4451 ac_path_EGREP_max=$ac_count
4452 fi
4453 # 10*(2^10) chars as input seems more than enough
4454 test $ac_count -gt 10 && break
4455 done
4456 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4457esac
4458
Matthias Kloseb9621712010-04-24 17:59:49 +00004459 $ac_path_EGREP_found && break 3
4460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004461 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004465 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 +00004466 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467else
4468 ac_cv_path_EGREP=$EGREP
4469fi
4470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471 fi
4472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4474$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004475 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004476
4477
Matthias Kloseb9621712010-04-24 17:59:49 +00004478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4479$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004480if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004481 $as_echo_n "(cached) " >&6
4482else
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004484/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004485#include <stdlib.h>
4486#include <stdarg.h>
4487#include <string.h>
4488#include <float.h>
4489
4490int
4491main ()
4492{
4493
4494 ;
4495 return 0;
4496}
4497_ACEOF
4498if ac_fn_c_try_compile "$LINENO"; then :
4499 ac_cv_header_stdc=yes
4500else
4501 ac_cv_header_stdc=no
4502fi
4503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4504
4505if test $ac_cv_header_stdc = yes; then
4506 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004510
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004511_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004514
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004515else
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004517fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004518rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004519
Matthias Kloseb9621712010-04-24 17:59:49 +00004520fi
4521
4522if test $ac_cv_header_stdc = yes; then
4523 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4525/* end confdefs.h. */
4526#include <stdlib.h>
4527
4528_ACEOF
4529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4530 $EGREP "free" >/dev/null 2>&1; then :
4531
4532else
4533 ac_cv_header_stdc=no
4534fi
4535rm -f conftest*
4536
4537fi
4538
4539if test $ac_cv_header_stdc = yes; then
4540 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4541 if test "$cross_compiling" = yes; then :
4542 :
4543else
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#include <ctype.h>
4547#include <stdlib.h>
4548#if ((' ' & 0x0FF) == 0x020)
4549# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4550# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4551#else
4552# define ISLOWER(c) \
4553 (('a' <= (c) && (c) <= 'i') \
4554 || ('j' <= (c) && (c) <= 'r') \
4555 || ('s' <= (c) && (c) <= 'z'))
4556# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4557#endif
4558
4559#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4560int
4561main ()
4562{
4563 int i;
4564 for (i = 0; i < 256; i++)
4565 if (XOR (islower (i), ISLOWER (i))
4566 || toupper (i) != TOUPPER (i))
4567 return 2;
4568 return 0;
4569}
4570_ACEOF
4571if ac_fn_c_try_run "$LINENO"; then :
4572
4573else
4574 ac_cv_header_stdc=no
4575fi
4576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4577 conftest.$ac_objext conftest.beam conftest.$ac_ext
4578fi
4579
4580fi
4581fi
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4583$as_echo "$ac_cv_header_stdc" >&6; }
4584if test $ac_cv_header_stdc = yes; then
4585
4586$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4587
4588fi
4589
4590# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4591for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4592 inttypes.h stdint.h unistd.h
4593do :
4594 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4595ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4596"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004597if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004598 cat >>confdefs.h <<_ACEOF
4599#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4600_ACEOF
4601
4602fi
4603
4604done
4605
4606
4607
4608 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 -08004609if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004610 MINIX=yes
4611else
4612 MINIX=
4613fi
4614
4615
4616 if test "$MINIX" = yes; then
4617
4618$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4619
4620
4621$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4622
4623
4624$as_echo "#define _MINIX 1" >>confdefs.h
4625
4626 fi
4627
4628
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4630$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004631if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004632 $as_echo_n "(cached) " >&6
4633else
4634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4635/* end confdefs.h. */
4636
4637# define __EXTENSIONS__ 1
4638 $ac_includes_default
4639int
4640main ()
4641{
4642
4643 ;
4644 return 0;
4645}
4646_ACEOF
4647if ac_fn_c_try_compile "$LINENO"; then :
4648 ac_cv_safe_to_define___extensions__=yes
4649else
4650 ac_cv_safe_to_define___extensions__=no
4651fi
4652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4653fi
4654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4655$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4656 test $ac_cv_safe_to_define___extensions__ = yes &&
4657 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4658
4659 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4660
4661 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4662
4663 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4664
4665 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4666
4667
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004668
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004669# Check for unsupported systems
4670case $ac_sys_system/$ac_sys_release in
4671atheos*|Linux*/1*)
4672 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4673 echo See README for details.
4674 exit 1;;
4675esac
4676
4677
Matthias Kloseb9621712010-04-24 17:59:49 +00004678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4679$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680
4681# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004682if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683 withval=$with_suffix;
4684 case $withval in
4685 no) EXEEXT=;;
4686 yes) EXEEXT=.exe;;
4687 *) EXEEXT=$withval;;
4688 esac
4689fi
4690
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4692$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693
4694# Test whether we're running on a non-case-sensitive system, in which
4695# case we give a warning if no ext is given
4696
Matthias Kloseb9621712010-04-24 17:59:49 +00004697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4698$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004699if test ! -d CaseSensitiveTestDir; then
4700mkdir CaseSensitiveTestDir
4701fi
4702
4703if test -d casesensitivetestdir
4704then
Matthias Kloseb9621712010-04-24 17:59:49 +00004705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4706$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004707 BUILDEXEEXT=.exe
4708else
Matthias Kloseb9621712010-04-24 17:59:49 +00004709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4710$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004711 BUILDEXEEXT=$EXEEXT
4712fi
4713rmdir CaseSensitiveTestDir
4714
4715case $MACHDEP in
4716bsdos*)
4717 case $CC in
4718 gcc) CC="$CC -D_HAVE_BSDI";;
4719 esac;;
4720esac
4721
4722case $ac_sys_system in
4723hp*|HP*)
4724 case $CC in
4725 cc|*/cc) CC="$CC -Ae";;
4726 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727esac
4728
4729
4730
Matthias Kloseb9621712010-04-24 17:59:49 +00004731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4732$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733if test -z "$LIBRARY"
4734then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004735 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4738$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739
4740# LDLIBRARY is the name of the library to link against (as opposed to the
4741# name of the library into which to insert object files). BLDLIBRARY is also
4742# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4743# is blank as the main program is not linked directly against LDLIBRARY.
4744# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4745# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4746# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4747# DLLLIBRARY is the shared (i.e., DLL) library.
4748#
4749# RUNSHARED is used to run shared python without installed libraries
4750#
4751# INSTSONAME is the name of the shared library that will be use to install
4752# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004753#
4754# LDVERSION is the shared library version number, normally the Python version
4755# with the ABI build flags appended.
4756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757
4758
4759
4760
4761
4762
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004764LDLIBRARY="$LIBRARY"
4765BLDLIBRARY='$(LDLIBRARY)'
4766INSTSONAME='$(LDLIBRARY)'
4767DLLLIBRARY=''
4768LDLIBRARYDIR=''
4769RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004770LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004771
4772# LINKCC is the command that links the python executable -- default is $(CC).
4773# If CXX is set, and if it is needed to link a main function that was
4774# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4775# python might then depend on the C++ runtime
4776# This is altered for AIX in order to build the export list before
4777# linking.
4778
Matthias Kloseb9621712010-04-24 17:59:49 +00004779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4780$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781if test -z "$LINKCC"
4782then
4783 LINKCC='$(PURIFY) $(MAINCC)'
4784 case $ac_sys_system in
4785 AIX*)
4786 exp_extra="\"\""
4787 if test $ac_sys_release -ge 5 -o \
4788 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4789 exp_extra="."
4790 fi
4791 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004792 QNX*)
4793 # qcc must be used because the other compilers do not
4794 # support -N.
4795 LINKCC=qcc;;
4796 esac
4797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4799$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004800
4801# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4802# make sure we default having it set to "no": this is used by
4803# distutils.unixccompiler to know if it should add --enable-new-dtags
4804# to linker command lines, and failing to detect GNU ld simply results
4805# in the same bahaviour as before.
4806
Matthias Kloseb9621712010-04-24 17:59:49 +00004807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4808$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809ac_prog=ld
4810if test "$GCC" = yes; then
4811 ac_prog=`$CC -print-prog-name=ld`
4812fi
4813case `"$ac_prog" -V 2>&1 < /dev/null` in
4814 *GNU*)
4815 GNULD=yes;;
4816 *)
4817 GNULD=no;;
4818esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4820$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4823$as_echo_n "checking for inline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004824if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004825 $as_echo_n "(cached) " >&6
4826else
4827 ac_cv_c_inline=no
4828for ac_kw in inline __inline__ __inline; do
4829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4830/* end confdefs.h. */
4831#ifndef __cplusplus
4832typedef int foo_t;
4833static $ac_kw foo_t static_foo () {return 0; }
4834$ac_kw foo_t foo () {return 0; }
4835#endif
4836
4837_ACEOF
4838if ac_fn_c_try_compile "$LINENO"; then :
4839 ac_cv_c_inline=$ac_kw
4840fi
4841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4842 test "$ac_cv_c_inline" != no && break
4843done
4844
4845fi
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4847$as_echo "$ac_cv_c_inline" >&6; }
4848
4849case $ac_cv_c_inline in
4850 inline | yes) ;;
4851 *)
4852 case $ac_cv_c_inline in
4853 no) ac_val=;;
4854 *) ac_val=$ac_cv_c_inline;;
4855 esac
4856 cat >>confdefs.h <<_ACEOF
4857#ifndef __cplusplus
4858#define inline $ac_val
4859#endif
4860_ACEOF
4861 ;;
4862esac
4863
4864if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004865
4866$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004867
4868
4869fi
4870
4871
Matthias Kloseb9621712010-04-24 17:59:49 +00004872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4873$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004875if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876 enableval=$enable_shared;
4877fi
4878
4879
4880if test -z "$enable_shared"
4881then
4882 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004883 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004884 enable_shared="yes";;
4885 *)
4886 enable_shared="no";;
4887 esac
4888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4890$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891
Matthias Kloseb9621712010-04-24 17:59:49 +00004892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4893$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004894# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004895if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896 enableval=$enable_profiling; ac_save_cc="$CC"
4897 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004898 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899 ac_enable_profiling="no"
4900else
Matthias Kloseb9621712010-04-24 17:59:49 +00004901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902/* end confdefs.h. */
4903int main() { return 0; }
4904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906 ac_enable_profiling="yes"
4907else
Matthias Kloseb9621712010-04-24 17:59:49 +00004908 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912fi
4913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914 CC="$ac_save_cc"
4915fi
4916
Matthias Kloseb9621712010-04-24 17:59:49 +00004917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4918$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919
4920case "$ac_enable_profiling" in
4921 "yes")
4922 BASECFLAGS="-pg $BASECFLAGS"
4923 LDFLAGS="-pg $LDFLAGS"
4924 ;;
4925esac
4926
Matthias Kloseb9621712010-04-24 17:59:49 +00004927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4928$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929
4930# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4931# library that we build, but we do not want to link against it (we
4932# will find it with a -framework option). For this reason there is an
4933# extra variable BLDLIBRARY against which Python and the extension
4934# modules are linked, BLDLIBRARY. This is normally the same as
4935# LDLIBRARY, but empty for MacOSX framework builds.
4936if test "$enable_framework"
4937then
4938 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4939 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4940 BLDLIBRARY=''
4941else
4942 BLDLIBRARY='$(LDLIBRARY)'
4943fi
4944
4945# Other platforms follow
4946if test $enable_shared = "yes"; then
4947
Matthias Kloseb9621712010-04-24 17:59:49 +00004948$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949
4950 case $ac_sys_system in
4951 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004952 LDLIBRARY='libpython$(LDVERSION).dll.a'
4953 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954 ;;
4955 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004956 LDLIBRARY='libpython$(LDVERSION).so'
4957 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4959 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004960 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004961 then
4962 PY3LIBRARY=libpython3.so
4963 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004965 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004966 LDLIBRARY='libpython$(LDVERSION).so'
4967 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4969 case $ac_sys_system in
4970 FreeBSD*)
4971 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4972 ;;
4973 esac
4974 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004975 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004976 then
4977 PY3LIBRARY=libpython3.so
4978 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979 ;;
4980 hp*|HP*)
4981 case `uname -m` in
4982 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004983 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984 ;;
4985 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004986 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987 ;;
4988 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004989 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4991 ;;
4992 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004993 LDLIBRARY='libpython$(LDVERSION).so'
4994 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4996 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004998 LDLIBRARY='libpython$(LDVERSION).dylib'
4999 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5001 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005002 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005003 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005004 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5005 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006
5007 esac
5008else # shared is disabled
5009 case $ac_sys_system in
5010 CYGWIN*)
5011 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005012 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005013 ;;
5014 esac
5015fi
5016
Matthias Kloseb9621712010-04-24 17:59:49 +00005017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5018$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019
5020if test -n "$ac_tool_prefix"; then
5021 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5022set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5024$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005025if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027else
5028 if test -n "$RANLIB"; then
5029 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5030else
5031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5032for as_dir in $PATH
5033do
5034 IFS=$as_save_IFS
5035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5038 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 break 2
5041 fi
5042done
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044IFS=$as_save_IFS
5045
5046fi
5047fi
5048RANLIB=$ac_cv_prog_RANLIB
5049if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5051$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052else
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5054$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055fi
5056
5057
5058fi
5059if test -z "$ac_cv_prog_RANLIB"; then
5060 ac_ct_RANLIB=$RANLIB
5061 # Extract the first word of "ranlib", so it can be a program name with args.
5062set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5064$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005065if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005067else
5068 if test -n "$ac_ct_RANLIB"; then
5069 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5070else
5071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072for as_dir in $PATH
5073do
5074 IFS=$as_save_IFS
5075 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5078 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080 break 2
5081 fi
5082done
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084IFS=$as_save_IFS
5085
5086fi
5087fi
5088ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5089if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5091$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092else
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095fi
5096
5097 if test "x$ac_ct_RANLIB" = x; then
5098 RANLIB=":"
5099 else
5100 case $cross_compiling:$ac_tool_warned in
5101yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005102{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5103$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104ac_tool_warned=yes ;;
5105esac
5106 RANLIB=$ac_ct_RANLIB
5107 fi
5108else
5109 RANLIB="$ac_cv_prog_RANLIB"
5110fi
5111
5112
5113for ac_prog in ar aal
5114do
5115 # Extract the first word of "$ac_prog", so it can be a program name with args.
5116set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005119if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121else
5122 if test -n "$AR"; then
5123 ac_cv_prog_AR="$AR" # Let the user override the test.
5124else
5125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5132 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134 break 2
5135 fi
5136done
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138IFS=$as_save_IFS
5139
5140fi
5141fi
5142AR=$ac_cv_prog_AR
5143if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5145$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146else
Matthias Kloseb9621712010-04-24 17:59:49 +00005147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149fi
5150
5151
5152 test -n "$AR" && break
5153done
5154test -n "$AR" || AR="ar"
5155
5156
5157# tweak ARFLAGS only if the user didn't set it on the command line
5158
5159if test -z "$ARFLAGS"
5160then
5161 ARFLAGS="rc"
5162fi
5163
5164
5165# Extract the first word of "svnversion", so it can be a program name with args.
5166set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5168$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005169if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005170 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171else
5172 if test -n "$SVNVERSION"; then
5173 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5174else
5175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5176for as_dir in $PATH
5177do
5178 IFS=$as_save_IFS
5179 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5182 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005183 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184 break 2
5185 fi
5186done
Matthias Kloseb9621712010-04-24 17:59:49 +00005187 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188IFS=$as_save_IFS
5189
5190 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5191fi
5192fi
5193SVNVERSION=$ac_cv_prog_SVNVERSION
5194if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5196$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197else
Matthias Kloseb9621712010-04-24 17:59:49 +00005198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5199$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200fi
5201
5202
5203if test $SVNVERSION = found
5204then
5205 SVNVERSION="svnversion \$(srcdir)"
5206else
5207 SVNVERSION="echo Unversioned directory"
5208fi
5209
Trent Nelson9effe692012-10-16 08:41:32 -04005210BUILDDIR="`pwd`"
5211
5212
5213if test "$srcdir" != "$BUILDDIR"; then
5214 # If we're building out-of-tree, we need to make sure the following
5215 # resources get picked up before their $srcdir counterparts.
5216 # Objects/ -> typeslots.inc
5217 # Include/ -> Python-ast.h, graminit.h
5218 # Python/ -> importlib.h
5219 # (A side effect of this is that these resources will automatically be
5220 # regenerated when building out-of-tree, regardless of whether or not
5221 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5222 # off.)
5223 BASECPPFLAGS="-IObjects -IInclude -IPython"
5224else
5225 BASECPPFLAGS=""
5226fi
5227
Georg Brandl1ca2e792011-03-05 20:51:24 +01005228
5229
5230
Georg Brandl187c1112011-07-03 09:23:20 +02005231
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005232if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005233then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005234# Extract the first word of "hg", so it can be a program name with args.
5235set dummy hg; ac_word=$2
5236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5237$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005238if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005239 $as_echo_n "(cached) " >&6
5240else
5241 if test -n "$HAS_HG"; then
5242 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5243else
5244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5245for as_dir in $PATH
5246do
5247 IFS=$as_save_IFS
5248 test -z "$as_dir" && as_dir=.
5249 for ac_exec_ext in '' $ac_executable_extensions; do
5250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5251 ac_cv_prog_HAS_HG="found"
5252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5253 break 2
5254 fi
5255done
5256 done
5257IFS=$as_save_IFS
5258
5259 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5260fi
5261fi
5262HAS_HG=$ac_cv_prog_HAS_HG
5263if test -n "$HAS_HG"; then
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5265$as_echo "$HAS_HG" >&6; }
5266else
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268$as_echo "no" >&6; }
5269fi
5270
5271
Georg Brandl187c1112011-07-03 09:23:20 +02005272else
5273HAS_HG=no-repository
5274fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005275if test $HAS_HG = found
5276then
5277 HGVERSION="hg id -i \$(srcdir)"
5278 HGTAG="hg id -t \$(srcdir)"
5279 HGBRANCH="hg id -b \$(srcdir)"
5280else
5281 HGVERSION=""
5282 HGTAG=""
5283 HGBRANCH=""
5284fi
5285
Georg Brandl187c1112011-07-03 09:23:20 +02005286
5287DISABLE_ASDLGEN=""
5288# Extract the first word of "python", so it can be a program name with args.
5289set dummy python; ac_word=$2
5290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5291$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005292if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005293 $as_echo_n "(cached) " >&6
5294else
5295 if test -n "$HAS_PYTHON"; then
5296 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5297else
5298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299for as_dir in $PATH
5300do
5301 IFS=$as_save_IFS
5302 test -z "$as_dir" && as_dir=.
5303 for ac_exec_ext in '' $ac_executable_extensions; do
5304 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5305 ac_cv_prog_HAS_PYTHON="found"
5306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5307 break 2
5308 fi
5309done
5310 done
5311IFS=$as_save_IFS
5312
5313 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5314fi
5315fi
5316HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5317if test -n "$HAS_PYTHON"; then
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5319$as_echo "$HAS_PYTHON" >&6; }
5320else
5321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5322$as_echo "no" >&6; }
5323fi
5324
5325
5326if test $HAS_HG != found -o $HAS_PYTHON != found
5327then
5328 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5329fi
5330
5331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332case $MACHDEP in
5333bsdos*|hp*|HP*)
5334 # install -d does not work on BSDI or HP-UX
5335 if test -z "$INSTALL"
5336 then
5337 INSTALL="${srcdir}/install-sh -c"
5338 fi
5339esac
5340ac_aux_dir=
5341for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005342 if test -f "$ac_dir/install-sh"; then
5343 ac_aux_dir=$ac_dir
5344 ac_install_sh="$ac_aux_dir/install-sh -c"
5345 break
5346 elif test -f "$ac_dir/install.sh"; then
5347 ac_aux_dir=$ac_dir
5348 ac_install_sh="$ac_aux_dir/install.sh -c"
5349 break
5350 elif test -f "$ac_dir/shtool"; then
5351 ac_aux_dir=$ac_dir
5352 ac_install_sh="$ac_aux_dir/shtool install -c"
5353 break
5354 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355done
5356if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005357 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358fi
5359
5360# These three variables are undocumented and unsupported,
5361# and are intended to be withdrawn in a future Autoconf release.
5362# They can cause serious problems if a builder's source tree is in a directory
5363# whose full name contains unusual characters.
5364ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5365ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5366ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5367
5368
5369# Find a good install program. We prefer a C program (faster),
5370# so one script is as good as another. But avoid the broken or
5371# incompatible versions:
5372# SysV /etc/install, /usr/sbin/install
5373# SunOS /usr/etc/install
5374# IRIX /sbin/install
5375# AIX /bin/install
5376# AmigaOS /C/install, which installs bootblocks on floppy discs
5377# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5378# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5379# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5380# OS/2's system install, which has a completely different semantic
5381# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005382# Reject install programs that cannot install multiple files.
5383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5384$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005386if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388else
5389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5390for as_dir in $PATH
5391do
5392 IFS=$as_save_IFS
5393 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 # Account for people who put trailing slashes in PATH elements.
5395case $as_dir/ in #((
5396 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399 /usr/ucb/* ) ;;
5400 *)
5401 # OSF1 and SCO ODT 3.0 have their own names for install.
5402 # Don't use installbsd from OSF since it installs stuff as root
5403 # by default.
5404 for ac_prog in ginstall scoinst install; do
5405 for ac_exec_ext in '' $ac_executable_extensions; do
5406 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5407 if test $ac_prog = install &&
5408 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5409 # AIX install. It has an incompatible calling convention.
5410 :
5411 elif test $ac_prog = install &&
5412 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5413 # program-specific install script used by HP pwplus--don't use.
5414 :
5415 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 rm -rf conftest.one conftest.two conftest.dir
5417 echo one > conftest.one
5418 echo two > conftest.two
5419 mkdir conftest.dir
5420 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5421 test -s conftest.one && test -s conftest.two &&
5422 test -s conftest.dir/conftest.one &&
5423 test -s conftest.dir/conftest.two
5424 then
5425 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5426 break 3
5427 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428 fi
5429 fi
5430 done
5431 done
5432 ;;
5433esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005434
5435 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436IFS=$as_save_IFS
5437
Matthias Kloseb9621712010-04-24 17:59:49 +00005438rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439
5440fi
5441 if test "${ac_cv_path_install+set}" = set; then
5442 INSTALL=$ac_cv_path_install
5443 else
5444 # As a last resort, use the slow shell script. Don't cache a
5445 # value for INSTALL within a source directory, because that will
5446 # break other packages using the cache if that directory is
5447 # removed, or if the value is a relative name.
5448 INSTALL=$ac_install_sh
5449 fi
5450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5452$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453
5454# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5455# It thinks the first close brace ends the variable substitution.
5456test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5457
5458test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5459
5460test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5461
Trent Nelsona45afca2012-08-30 14:32:02 +00005462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5463$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5464if test -z "$MKDIR_P"; then
5465 if ${ac_cv_path_mkdir+:} false; then :
5466 $as_echo_n "(cached) " >&6
5467else
5468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5470do
5471 IFS=$as_save_IFS
5472 test -z "$as_dir" && as_dir=.
5473 for ac_prog in mkdir gmkdir; do
5474 for ac_exec_ext in '' $ac_executable_extensions; do
5475 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5476 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5477 'mkdir (GNU coreutils) '* | \
5478 'mkdir (coreutils) '* | \
5479 'mkdir (fileutils) '4.1*)
5480 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5481 break 3;;
5482 esac
5483 done
5484 done
5485 done
5486IFS=$as_save_IFS
5487
5488fi
5489
5490 test -d ./--version && rmdir ./--version
5491 if test "${ac_cv_path_mkdir+set}" = set; then
5492 MKDIR_P="$ac_cv_path_mkdir -p"
5493 else
5494 # As a last resort, use the slow shell script. Don't cache a
5495 # value for MKDIR_P within a source directory, because that will
5496 # break other packages using the cache if that directory is
5497 # removed, or if the value is a relative name.
5498 MKDIR_P="$ac_install_sh -d"
5499 fi
5500fi
5501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5502$as_echo "$MKDIR_P" >&6; }
5503
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504
5505# Not every filesystem supports hard links
5506
5507if test -z "$LN" ; then
5508 case $ac_sys_system in
5509 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 *) LN=ln;;
5511 esac
5512fi
5513
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005514# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005515
5516ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005517
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5520$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521
5522# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005523if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524 withval=$with_pydebug;
5525if test "$withval" != no
5526then
5527
Matthias Kloseb9621712010-04-24 17:59:49 +00005528$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529
Matthias Kloseb9621712010-04-24 17:59:49 +00005530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5531$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005533 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005534else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5535$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536fi
5537else
Matthias Kloseb9621712010-04-24 17:59:49 +00005538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5539$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540fi
5541
5542
5543# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5544# merged with this chunk of code?
5545
5546# Optimizer/debugger flags
5547# ------------------------
5548# (The following bit of code is complicated enough - please keep things
5549# indented properly. Just pretend you're editing Python code. ;-)
5550
5551# There are two parallel sets of case statements below, one that checks to
5552# see if OPT was set and one that does BASECFLAGS setting based upon
5553# compiler and platform. BASECFLAGS tweaks need to be made even if the
5554# user set OPT.
5555
5556# tweak OPT based on compiler and platform, only if the user didn't set
5557# it on the command line
5558
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005559if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560then
5561 case $GCC in
5562 yes)
5563 if test "$CC" != 'g++' ; then
5564 STRICT_PROTO="-Wstrict-prototypes"
5565 fi
5566 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5567 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5568 WRAP="-fwrapv"
5569 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005570
5571 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005572 case $CC in
5573 *clang*) WRAP="-fwrapv"
5574 ;;
5575 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005576
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005577 case $ac_cv_prog_cc_g in
5578 yes)
5579 if test "$Py_DEBUG" = 'true' ; then
5580 # Optimization messes up debuggers, so turn it off for
5581 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005582 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583 else
5584 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5585 fi
5586 ;;
5587 *)
5588 OPT="-O3 -Wall $STRICT_PROTO"
5589 ;;
5590 esac
5591 case $ac_sys_system in
5592 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5593 ;;
5594 esac
5595 ;;
5596
5597 *)
5598 OPT="-O"
5599 ;;
5600 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601fi
5602
5603
5604
5605# The -arch flags for universal builds on OSX
5606UNIVERSAL_ARCH_FLAGS=
5607
5608
5609# tweak BASECFLAGS based on compiler and platform
5610case $GCC in
5611yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005612 # Python doesn't violate C99 aliasing rules, but older versions of
5613 # GCC produce warnings for legal Python code. Enable
5614 # -fno-strict-aliasing on versions of GCC that support but produce
5615 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5617$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 ac_save_cc="$CC"
5619 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005620 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005621 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005622 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005623else
Matthias Kloseb9621712010-04-24 17:59:49 +00005624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005626
Matthias Kloseb159a552010-04-25 21:00:44 +00005627
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005628int
5629main ()
5630{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005631
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005632 ;
5633 return 0;
5634}
Matthias Kloseb159a552010-04-25 21:00:44 +00005635
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005637if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005638
5639 CC="$ac_save_cc -fstrict-aliasing"
5640 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005642/* end confdefs.h. */
5643
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005644 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005645int
5646main ()
5647{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005648double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005649 ;
5650 return 0;
5651}
Matthias Kloseb159a552010-04-25 21:00:44 +00005652
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005654if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005655
5656 ac_cv_no_strict_aliasing=no
5657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658else
Matthias Kloseb159a552010-04-25 21:00:44 +00005659
5660 ac_cv_no_strict_aliasing=yes
5661
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005662fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005664
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005665else
Matthias Kloseb159a552010-04-25 21:00:44 +00005666
5667 ac_cv_no_strict_aliasing=no
5668
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005671fi
5672
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005673 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5676$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005677 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678 then
5679 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5680 fi
5681
5682 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5683 # support. Without this, treatment of subnormals doesn't follow
5684 # the standard.
5685 case $ac_sys_machine in
5686 alpha*)
5687 BASECFLAGS="$BASECFLAGS -mieee"
5688 ;;
5689 esac
5690
5691 case $ac_sys_system in
5692 SCO_SV*)
5693 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5694 ;;
5695 # is there any other compiler on Darwin besides gcc?
5696 Darwin*)
5697 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5698 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005699 if test "${CC}" = gcc
5700 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5702$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005703 case "${UNIVERSALSDK}" in
5704 */MacOSX10.4u.sdk)
5705 # Build using 10.4 SDK, force usage of gcc when the
5706 # compiler is gcc, otherwise the user will get very
5707 # confusing error messages when building on OSX 10.6
5708 CC=gcc-4.0
5709 CPP=cpp-4.0
5710 ;;
5711 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5713$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005714 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
5716
5717 if test "${enable_universalsdk}"; then
5718 UNIVERSAL_ARCH_FLAGS=""
5719 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5720 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5721 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005722 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5724 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005725 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005726 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5729 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005730 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005731 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005733 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5734 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005735 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005736 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005737
5738 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5739 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005740 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005741 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005744 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 +00005745
5746 fi
5747
5748
Ronald Oussoren666028b2010-04-18 19:07:43 +00005749 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5750 if test "${UNIVERSALSDK}" != "/"
5751 then
5752 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5753 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005754 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 fi
5756 fi
5757
5758 # Calculate the right deployment target for this build.
5759 #
5760 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5761 if test ${cur_target} '>' 10.2; then
5762 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005763 if test ${enable_universalsdk}; then
5764 if test "${UNIVERSAL_ARCHS}" = "all"; then
5765 # Ensure that the default platform for a
5766 # 4-way universal build is OSX 10.5,
5767 # that's the first OS release where
5768 # 4-way builds make sense.
5769 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005770
5771 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5772 cur_target='10.5'
5773
5774 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5775 cur_target='10.5'
5776
5777 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5778 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005779 fi
5780 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005781 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005782 # On Intel macs default to a deployment
5783 # target of 10.4, that's the first OSX
5784 # release with Intel support.
5785 cur_target="10.4"
5786 fi
5787 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 fi
5789 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5790
5791 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5792 # environment with a value that is the same as what we'll use
5793 # in the Makefile to ensure that we'll get the same compiler
5794 # environment during configure and build time.
5795 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5796 export MACOSX_DEPLOYMENT_TARGET
5797 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5798
5799 ;;
5800 OSF*)
5801 BASECFLAGS="$BASECFLAGS -mieee"
5802 ;;
5803 esac
5804 ;;
5805
5806*)
5807 case $ac_sys_system in
5808 OpenUNIX*|UnixWare*)
5809 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5810 ;;
5811 OSF*)
5812 BASECFLAGS="$BASECFLAGS -ieee -std"
5813 ;;
5814 SCO_SV*)
5815 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5816 ;;
5817 esac
5818 ;;
5819esac
5820
5821if test "$Py_DEBUG" = 'true'; then
5822 :
5823else
5824 OPT="-DNDEBUG $OPT"
5825fi
5826
5827if test "$ac_arch_flags"
5828then
5829 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5830fi
5831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832# Check whether GCC supports PyArg_ParseTuple format
5833if test "$GCC" = "yes"
5834then
Matthias Kloseb9621712010-04-24 17:59:49 +00005835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5836$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 save_CFLAGS=$CFLAGS
5838 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840/* end confdefs.h. */
5841
5842 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843int
5844main ()
5845{
5846
5847 ;
5848 return 0;
5849}
Matthias Kloseb159a552010-04-25 21:00:44 +00005850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005852if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853
Matthias Kloseb159a552010-04-25 21:00:44 +00005854
Matthias Kloseb9621712010-04-24 17:59:49 +00005855$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856
Matthias Kloseb159a552010-04-25 21:00:44 +00005857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005858$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860else
Matthias Kloseb159a552010-04-25 21:00:44 +00005861
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005863$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864
5865fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5867 CFLAGS=$save_CFLAGS
5868fi
5869
5870# On some compilers, pthreads are available without further options
5871# (e.g. MacOS X). On some of these systems, the compiler will not
5872# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5873# So we have to see first whether pthreads are available without
5874# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5876$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005877if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005878 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879else
Matthias Kloseb9621712010-04-24 17:59:49 +00005880 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 ac_cv_pthread_is_default=no
5882else
Matthias Kloseb9621712010-04-24 17:59:49 +00005883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884/* end confdefs.h. */
5885
5886#include <pthread.h>
5887
5888void* routine(void* p){return NULL;}
5889
5890int main(){
5891 pthread_t p;
5892 if(pthread_create(&p,NULL,routine,NULL)!=0)
5893 return 1;
5894 (void)pthread_detach(p);
5895 return 0;
5896}
5897
5898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005899if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
5901 ac_cv_pthread_is_default=yes
5902 ac_cv_kthread=no
5903 ac_cv_pthread=no
5904
5905else
Matthias Kloseb9621712010-04-24 17:59:49 +00005906 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
5911
5912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913fi
5914
Matthias Kloseb9621712010-04-24 17:59:49 +00005915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5916$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917
5918
5919if test $ac_cv_pthread_is_default = yes
5920then
5921 ac_cv_kpthread=no
5922else
5923# -Kpthread, if available, provides the right #defines
5924# and linker options to make pthread_create available
5925# Some compilers won't report that they do not support -Kpthread,
5926# so we need to run a program to see whether it really made the
5927# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5929$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005930if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005931 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932else
5933 ac_save_cc="$CC"
5934CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005935if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 ac_cv_kpthread=no
5937else
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939/* end confdefs.h. */
5940
5941#include <pthread.h>
5942
5943void* routine(void* p){return NULL;}
5944
5945int main(){
5946 pthread_t p;
5947 if(pthread_create(&p,NULL,routine,NULL)!=0)
5948 return 1;
5949 (void)pthread_detach(p);
5950 return 0;
5951}
5952
5953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005954if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 ac_cv_kpthread=yes
5956else
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961fi
5962
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963CC="$ac_save_cc"
5964fi
5965
Matthias Kloseb9621712010-04-24 17:59:49 +00005966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5967$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
5969
5970if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5971then
5972# -Kthread, if available, provides the right #defines
5973# and linker options to make pthread_create available
5974# Some compilers won't report that they do not support -Kthread,
5975# so we need to run a program to see whether it really made the
5976# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5978$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005979if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 ac_save_cc="$CC"
5983CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005984if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 ac_cv_kthread=no
5986else
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988/* end confdefs.h. */
5989
5990#include <pthread.h>
5991
5992void* routine(void* p){return NULL;}
5993
5994int main(){
5995 pthread_t p;
5996 if(pthread_create(&p,NULL,routine,NULL)!=0)
5997 return 1;
5998 (void)pthread_detach(p);
5999 return 0;
6000}
6001
6002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006003if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004 ac_cv_kthread=yes
6005else
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6009 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010fi
6011
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012CC="$ac_save_cc"
6013fi
6014
Matthias Kloseb9621712010-04-24 17:59:49 +00006015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6016$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017fi
6018
6019if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6020then
6021# -pthread, if available, provides the right #defines
6022# and linker options to make pthread_create available
6023# Some compilers won't report that they do not support -pthread,
6024# so we need to run a program to see whether it really made the
6025# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6027$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006028if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030else
6031 ac_save_cc="$CC"
6032CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006033if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034 ac_cv_pthread=no
6035else
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037/* end confdefs.h. */
6038
6039#include <pthread.h>
6040
6041void* routine(void* p){return NULL;}
6042
6043int main(){
6044 pthread_t p;
6045 if(pthread_create(&p,NULL,routine,NULL)!=0)
6046 return 1;
6047 (void)pthread_detach(p);
6048 return 0;
6049}
6050
6051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006052if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053 ac_cv_pthread=yes
6054else
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059fi
6060
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061CC="$ac_save_cc"
6062fi
6063
Matthias Kloseb9621712010-04-24 17:59:49 +00006064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6065$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066fi
6067
6068# If we have set a CC compiler flag for thread support then
6069# check if it works for CXX, too.
6070ac_cv_cxx_thread=no
6071if test ! -z "$CXX"
6072then
Matthias Kloseb9621712010-04-24 17:59:49 +00006073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6074$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075ac_save_cxx="$CXX"
6076
6077if test "$ac_cv_kpthread" = "yes"
6078then
6079 CXX="$CXX -Kpthread"
6080 ac_cv_cxx_thread=yes
6081elif test "$ac_cv_kthread" = "yes"
6082then
6083 CXX="$CXX -Kthread"
6084 ac_cv_cxx_thread=yes
6085elif test "$ac_cv_pthread" = "yes"
6086then
6087 CXX="$CXX -pthread"
6088 ac_cv_cxx_thread=yes
6089fi
6090
6091if test $ac_cv_cxx_thread = yes
6092then
6093 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6094 $CXX -c conftest.$ac_ext 2>&5
6095 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6096 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6097 then
6098 ac_cv_cxx_thread=yes
6099 else
6100 ac_cv_cxx_thread=no
6101 fi
6102 rm -fr conftest*
6103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6105$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106fi
6107CXX="$ac_save_cxx"
6108
6109
6110# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6112$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006113if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115else
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117/* end confdefs.h. */
6118#include <stdlib.h>
6119#include <stdarg.h>
6120#include <string.h>
6121#include <float.h>
6122
6123int
6124main ()
6125{
6126
6127 ;
6128 return 0;
6129}
6130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006131if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132 ac_cv_header_stdc=yes
6133else
Matthias Kloseb9621712010-04-24 17:59:49 +00006134 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6137
6138if test $ac_cv_header_stdc = yes; then
6139 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141/* end confdefs.h. */
6142#include <string.h>
6143
6144_ACEOF
6145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006146 $EGREP "memchr" >/dev/null 2>&1; then :
6147
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148else
6149 ac_cv_header_stdc=no
6150fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006151rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152
6153fi
6154
6155if test $ac_cv_header_stdc = yes; then
6156 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158/* end confdefs.h. */
6159#include <stdlib.h>
6160
6161_ACEOF
6162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 $EGREP "free" >/dev/null 2>&1; then :
6164
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165else
6166 ac_cv_header_stdc=no
6167fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006168rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169
6170fi
6171
6172if test $ac_cv_header_stdc = yes; then
6173 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175 :
6176else
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178/* end confdefs.h. */
6179#include <ctype.h>
6180#include <stdlib.h>
6181#if ((' ' & 0x0FF) == 0x020)
6182# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6183# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6184#else
6185# define ISLOWER(c) \
6186 (('a' <= (c) && (c) <= 'i') \
6187 || ('j' <= (c) && (c) <= 'r') \
6188 || ('s' <= (c) && (c) <= 'z'))
6189# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6190#endif
6191
6192#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6193int
6194main ()
6195{
6196 int i;
6197 for (i = 0; i < 256; i++)
6198 if (XOR (islower (i), ISLOWER (i))
6199 || toupper (i) != TOUPPER (i))
6200 return 2;
6201 return 0;
6202}
6203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006204if ac_fn_c_try_run "$LINENO"; then :
6205
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206else
Matthias Kloseb9621712010-04-24 17:59:49 +00006207 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211fi
6212
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213fi
6214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6216$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217if test $ac_cv_header_stdc = yes; then
6218
Matthias Kloseb9621712010-04-24 17:59:49 +00006219$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220
6221fi
6222
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006223for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6224fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006225ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006226shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006227unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006228sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6229sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006230sys/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 -08006231sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006232sys/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 +00006233sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006234bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006235do :
6236 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6237ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006238if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006239 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006240#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006241_ACEOF
6242
6243fi
6244
Guido van Rossum627b2d71993-12-24 10:39:16 +00006245done
6246
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006247ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006248for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006249 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6251$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006252if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006253 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006254else
Matthias Kloseb9621712010-04-24 17:59:49 +00006255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006256/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006257#include <sys/types.h>
6258#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006259
Martin v. Löwis11437992002-04-12 09:54:03 +00006260int
6261main ()
6262{
6263if ((DIR *) 0)
6264return 0;
6265 ;
6266 return 0;
6267}
6268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006270 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006271else
Matthias Kloseb9621712010-04-24 17:59:49 +00006272 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006276eval ac_res=\$$as_ac_Header
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6278$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006279if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006280 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006281#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006282_ACEOF
6283
6284ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006285fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006287done
6288# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6289if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6291$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006292if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006293 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006294else
Martin v. Löwis11437992002-04-12 09:54:03 +00006295 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006299/* Override any GCC internal prototype to avoid an error.
6300 Use char because int might match the return type of a GCC
6301 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006302#ifdef __cplusplus
6303extern "C"
6304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006305char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006306int
6307main ()
6308{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006309return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006310 ;
6311 return 0;
6312}
6313_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006314for ac_lib in '' dir; do
6315 if test -z "$ac_lib"; then
6316 ac_res="none required"
6317 else
6318 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006319 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006320 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006322 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006324rm -f core conftest.err conftest.$ac_objext \
6325 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006326 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006327 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329done
Gregory P. Smith69140482012-01-16 02:05:55 -08006330if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006332else
6333 ac_cv_search_opendir=no
6334fi
6335rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006336LIBS=$ac_func_search_save_LIBS
6337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6339$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006340ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006341if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006342 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006343
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006344fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006345
Michael W. Hudson54241132001-12-07 15:38:26 +00006346else
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6348$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006349if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006350 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006351else
6352 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006356/* Override any GCC internal prototype to avoid an error.
6357 Use char because int might match the return type of a GCC
6358 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006359#ifdef __cplusplus
6360extern "C"
6361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006362char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006363int
6364main ()
6365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006366return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006367 ;
6368 return 0;
6369}
6370_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006371for ac_lib in '' x; do
6372 if test -z "$ac_lib"; then
6373 ac_res="none required"
6374 else
6375 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006376 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006377 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006378 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006379 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006381rm -f core conftest.err conftest.$ac_objext \
6382 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006383 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006384 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386done
Gregory P. Smith69140482012-01-16 02:05:55 -08006387if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006389else
6390 ac_cv_search_opendir=no
6391fi
6392rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006393LIBS=$ac_func_search_save_LIBS
6394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6396$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006398if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006399 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006401fi
6402
6403fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006404
Matthias Kloseb9621712010-04-24 17:59:49 +00006405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6406$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006407if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006408 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006409else
Matthias Kloseb9621712010-04-24 17:59:49 +00006410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006411/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006412#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006413int
6414main ()
6415{
6416return makedev(0, 0);
6417 ;
6418 return 0;
6419}
6420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006422 ac_cv_header_sys_types_h_makedev=yes
6423else
Matthias Kloseb9621712010-04-24 17:59:49 +00006424 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006426rm -f core conftest.err conftest.$ac_objext \
6427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006428
6429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6431$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006432
6433if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006434ac_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 -08006435if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006438
6439fi
6440
6441
6442
6443 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006444 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 -08006445if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006446
Matthias Kloseb9621712010-04-24 17:59:49 +00006447$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006448
6449fi
6450
6451
6452 fi
6453fi
6454
Michael W. Hudson54241132001-12-07 15:38:26 +00006455
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006456# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006457for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006458do :
6459 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006460#ifdef HAVE_CURSES_H
6461#include <curses.h>
6462#endif
6463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464"
Gregory P. Smith69140482012-01-16 02:05:55 -08006465if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006466 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006467#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006468_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006469
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006470fi
6471
6472done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006473
6474
Martin v. Löwis11017b12006-01-14 18:12:57 +00006475# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006476for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006477do :
6478 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 +00006479#ifdef HAVE_ASM_TYPES_H
6480#include <asm/types.h>
6481#endif
6482#ifdef HAVE_SYS_SOCKET_H
6483#include <sys/socket.h>
6484#endif
6485
Matthias Kloseb9621712010-04-24 17:59:49 +00006486"
Gregory P. Smith69140482012-01-16 02:05:55 -08006487if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006489#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006490_ACEOF
6491
6492fi
6493
6494done
6495
6496
Guido van Rossum627b2d71993-12-24 10:39:16 +00006497# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006498was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6500$as_echo_n "checking for clock_t in time.h... " >&6; }
6501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006502/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006504
6505_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006507 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006508 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006509else
Martin v. Löwis11437992002-04-12 09:54:03 +00006510
6511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006513
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006514
Guido van Rossum627b2d71993-12-24 10:39:16 +00006515fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006516rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6519$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006520
Neal Norwitz11690112002-07-30 01:08:28 +00006521# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6523$as_echo_n "checking for makedev... " >&6; }
6524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006525/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006526
Jesus Cea740f53a2010-04-28 11:35:30 +00006527#if defined(MAJOR_IN_MKDEV)
6528#include <sys/mkdev.h>
6529#elif defined(MAJOR_IN_SYSMACROS)
6530#include <sys/sysmacros.h>
6531#else
6532#include <sys/types.h>
6533#endif
6534
Neal Norwitz11690112002-07-30 01:08:28 +00006535int
6536main ()
6537{
Jesus Cea740f53a2010-04-28 11:35:30 +00006538
6539 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006540 ;
6541 return 0;
6542}
Matthias Kloseb159a552010-04-25 21:00:44 +00006543
Neal Norwitz11690112002-07-30 01:08:28 +00006544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006545if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006546 ac_cv_has_makedev=yes
6547else
Matthias Kloseb9621712010-04-24 17:59:49 +00006548 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006550rm -f core conftest.err conftest.$ac_objext \
6551 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006552if test "$ac_cv_has_makedev" = "no"; then
6553 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006555/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006556
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006557#define _OSF_SOURCE 1
6558#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006559
Neal Norwitz11690112002-07-30 01:08:28 +00006560int
6561main ()
6562{
6563 makedev(0, 0)
6564 ;
6565 return 0;
6566}
6567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006568if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006569 ac_cv_has_makedev=yes
6570else
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006573rm -f core conftest.err conftest.$ac_objext \
6574 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006575 if test "$ac_cv_has_makedev" = "yes"; then
6576
Matthias Kloseb9621712010-04-24 17:59:49 +00006577$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006578
6579 fi
6580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6582$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006583if test "$ac_cv_has_makedev" = "yes"; then
6584
Matthias Kloseb9621712010-04-24 17:59:49 +00006585$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006586
6587fi
6588
Martin v. Löwis399a6892002-10-04 10:22:02 +00006589# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6590# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6591# defined, but the compiler does not support pragma redefine_extname,
6592# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6593# structures (such as rlimit64) without declaring them. As a
6594# work-around, disable LFS on such configurations
6595
6596use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6598$as_echo_n "checking Solaris LFS bug... " >&6; }
6599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006601
6602#define _LARGEFILE_SOURCE 1
6603#define _FILE_OFFSET_BITS 64
6604#include <sys/resource.h>
6605
Martin v. Löwis399a6892002-10-04 10:22:02 +00006606int
6607main ()
6608{
6609struct rlimit foo;
6610 ;
6611 return 0;
6612}
6613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615 sol_lfs_bug=no
6616else
Matthias Kloseb9621712010-04-24 17:59:49 +00006617 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6621$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622if test "$sol_lfs_bug" = "yes"; then
6623 use_lfs=no
6624fi
6625
6626if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006627# Two defines needed to enable largefile support on various platforms
6628# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006629case $ac_sys_system/$ac_sys_release in
6630AIX*)
6631
6632$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6633
6634 ;;
6635esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006636
Matthias Kloseb9621712010-04-24 17:59:49 +00006637$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006638
6639
Matthias Kloseb9621712010-04-24 17:59:49 +00006640$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006641
Martin v. Löwis399a6892002-10-04 10:22:02 +00006642fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006643
Guido van Rossum84e7b241996-08-19 21:59:00 +00006644# Add some code to confdefs.h so that the test for off_t works on SCO
6645cat >> confdefs.h <<\EOF
6646#if defined(SCO_DS)
6647#undef _OFF_T
6648#endif
6649EOF
6650
Guido van Rossumef2255b2000-03-10 22:30:29 +00006651# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006652ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006653if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006654
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006655else
Martin v. Löwis11437992002-04-12 09:54:03 +00006656
6657cat >>confdefs.h <<_ACEOF
6658#define mode_t int
6659_ACEOF
6660
6661fi
6662
Matthias Kloseb9621712010-04-24 17:59:49 +00006663ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006664if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006665
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006666else
Martin v. Löwis11437992002-04-12 09:54:03 +00006667
6668cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006669#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006670_ACEOF
6671
6672fi
6673
Matthias Kloseb9621712010-04-24 17:59:49 +00006674ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006675if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006676
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006677else
Martin v. Löwis11437992002-04-12 09:54:03 +00006678
6679cat >>confdefs.h <<_ACEOF
6680#define pid_t int
6681_ACEOF
6682
6683fi
6684
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006685
Martin v. Löwis11437992002-04-12 09:54:03 +00006686cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006687#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006688_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006689
Matthias Kloseb9621712010-04-24 17:59:49 +00006690ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006691if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006693else
Martin v. Löwis11437992002-04-12 09:54:03 +00006694
6695cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
6698
6699fi
6700
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6702$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006703if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006705else
Matthias Kloseb9621712010-04-24 17:59:49 +00006706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006707/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006709
6710_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006712 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006713 ac_cv_type_uid_t=yes
6714else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006715 ac_cv_type_uid_t=no
6716fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006717rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006718
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6721$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006722if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006723
Matthias Kloseb9621712010-04-24 17:59:49 +00006724$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006725
6726
Matthias Kloseb9621712010-04-24 17:59:49 +00006727$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006728
6729fi
6730
Matthias Kloseb9621712010-04-24 17:59:49 +00006731ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6732case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006733 no|yes) ;; #(
6734 *)
6735
Matthias Kloseb9621712010-04-24 17:59:49 +00006736$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006737
6738
6739cat >>confdefs.h <<_ACEOF
6740#define uint32_t $ac_cv_c_uint32_t
6741_ACEOF
6742;;
6743 esac
6744
Matthias Kloseb9621712010-04-24 17:59:49 +00006745ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6746case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006747 no|yes) ;; #(
6748 *)
6749
Matthias Kloseb9621712010-04-24 17:59:49 +00006750$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006751
6752
6753cat >>confdefs.h <<_ACEOF
6754#define uint64_t $ac_cv_c_uint64_t
6755_ACEOF
6756;;
6757 esac
6758
Matthias Kloseb9621712010-04-24 17:59:49 +00006759ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6760case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006761 no|yes) ;; #(
6762 *)
6763
6764cat >>confdefs.h <<_ACEOF
6765#define int32_t $ac_cv_c_int32_t
6766_ACEOF
6767;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006768esac
6769
Matthias Kloseb9621712010-04-24 17:59:49 +00006770ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6771case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006772 no|yes) ;; #(
6773 *)
6774
6775cat >>confdefs.h <<_ACEOF
6776#define int64_t $ac_cv_c_int64_t
6777_ACEOF
6778;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006779esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006780
Matthias Kloseb9621712010-04-24 17:59:49 +00006781ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006782if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783
Matthias Kloseb9621712010-04-24 17:59:49 +00006784$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006785
6786fi
6787
Jack Jansendd19cf82001-12-06 22:36:17 +00006788
Michael W. Hudson54241132001-12-07 15:38:26 +00006789# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006790# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791# The cast to long int works around a bug in the HP C Compiler
6792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6794# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6796$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006797if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006799else
Matthias Kloseb9621712010-04-24 17:59:49 +00006800 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 +00006801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 if test "$ac_cv_type_int" = yes; then
6804 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006806as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006807See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006808 else
6809 ac_cv_sizeof_int=0
6810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6815$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816
6817
6818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006820#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006821_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006822
6823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824# The cast to long int works around a bug in the HP C Compiler
6825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6827# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6829$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006830if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 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 +00006834
Martin v. Löwis11437992002-04-12 09:54:03 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 if test "$ac_cv_type_long" = yes; then
6837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006839as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006840See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841 else
6842 ac_cv_sizeof_long=0
6843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6848$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849
6850
6851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006853#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006855
6856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857# The cast to long int works around a bug in the HP C Compiler
6858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6862$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006863if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 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 +00006867
Martin v. Löwis11437992002-04-12 09:54:03 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 if test "$ac_cv_type_void_p" = yes; then
6870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006872as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006873See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874 else
6875 ac_cv_sizeof_void_p=0
6876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6881$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882
6883
6884
Martin v. Löwis11437992002-04-12 09:54:03 +00006885cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006886#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006887_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006888
6889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006890# The cast to long int works around a bug in the HP C Compiler
6891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6893# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6895$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006896if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006897 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 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 +00006900
Martin v. Löwis11437992002-04-12 09:54:03 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 if test "$ac_cv_type_short" = yes; then
6903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006905as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006906See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907 else
6908 ac_cv_sizeof_short=0
6909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006911
Martin v. Löwis11437992002-04-12 09:54:03 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6914$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006915
6916
6917
Martin v. Löwis11437992002-04-12 09:54:03 +00006918cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006919#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006920_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006921
6922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006923# The cast to long int works around a bug in the HP C Compiler
6924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6926# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6928$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006929if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 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 +00006933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934else
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 if test "$ac_cv_type_float" = yes; then
6936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006938as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08006939See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006940 else
6941 ac_cv_sizeof_float=0
6942 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006944
Martin v. Löwis11437992002-04-12 09:54:03 +00006945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6947$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006948
6949
6950
Martin v. Löwis11437992002-04-12 09:54:03 +00006951cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006952#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006953_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006954
6955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006956# The cast to long int works around a bug in the HP C Compiler
6957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6959# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6961$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006962if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006963 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006964else
Matthias Kloseb9621712010-04-24 17:59:49 +00006965 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 +00006966
Martin v. Löwis11437992002-04-12 09:54:03 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 if test "$ac_cv_type_double" = yes; then
6969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006971as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08006972See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006973 else
6974 ac_cv_sizeof_double=0
6975 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006977
Martin v. Löwis11437992002-04-12 09:54:03 +00006978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6980$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006981
6982
6983
Martin v. Löwis11437992002-04-12 09:54:03 +00006984cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006985#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006986_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006987
6988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006989# The cast to long int works around a bug in the HP C Compiler
6990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6992# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6994$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006995if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006997else
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 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 +00006999
Martin v. Löwis11437992002-04-12 09:54:03 +00007000else
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 if test "$ac_cv_type_fpos_t" = yes; then
7002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007004as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007005See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007006 else
7007 ac_cv_sizeof_fpos_t=0
7008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010
Martin v. Löwis11437992002-04-12 09:54:03 +00007011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7013$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014
7015
7016
Martin v. Löwis11437992002-04-12 09:54:03 +00007017cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007018#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007019_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007020
Michael W. Hudson54241132001-12-07 15:38:26 +00007021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022# The cast to long int works around a bug in the HP C Compiler
7023# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7024# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7025# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7027$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007028if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 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 +00007032
Martin v. Löwis18e16552006-02-15 17:27:45 +00007033else
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 if test "$ac_cv_type_size_t" = yes; then
7035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007037as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007038See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039 else
7040 ac_cv_sizeof_size_t=0
7041 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007043
Martin v. Löwis18e16552006-02-15 17:27:45 +00007044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7046$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007047
7048
7049
Martin v. Löwis18e16552006-02-15 17:27:45 +00007050cat >>confdefs.h <<_ACEOF
7051#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7052_ACEOF
7053
7054
Christian Heimes400adb02008-02-01 08:12:03 +00007055# The cast to long int works around a bug in the HP C Compiler
7056# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7057# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7058# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7060$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007061if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007063else
Matthias Kloseb9621712010-04-24 17:59:49 +00007064 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 +00007065
Christian Heimes400adb02008-02-01 08:12:03 +00007066else
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 if test "$ac_cv_type_pid_t" = yes; then
7068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007070as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007071See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007072 else
7073 ac_cv_sizeof_pid_t=0
7074 fi
7075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007076
Christian Heimes400adb02008-02-01 08:12:03 +00007077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7079$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007080
7081
7082
7083cat >>confdefs.h <<_ACEOF
7084#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7085_ACEOF
7086
7087
Michael W. Hudson54241132001-12-07 15:38:26 +00007088
Matthias Kloseb9621712010-04-24 17:59:49 +00007089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7090$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007091have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007093/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007094
Martin v. Löwis11437992002-04-12 09:54:03 +00007095int
7096main ()
7097{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007098long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007099 ;
7100 return 0;
7101}
7102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007104
7105
Matthias Kloseb9621712010-04-24 17:59:49 +00007106$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007107
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007108 have_long_long=yes
7109
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7113$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007114if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115# The cast to long int works around a bug in the HP C Compiler
7116# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7117# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7118# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7120$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007121if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007123else
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 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 +00007125
Martin v. Löwis11437992002-04-12 09:54:03 +00007126else
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 if test "$ac_cv_type_long_long" = yes; then
7128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007130as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007131See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132 else
7133 ac_cv_sizeof_long_long=0
7134 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136
Martin v. Löwis11437992002-04-12 09:54:03 +00007137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7139$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007140
7141
7142
Martin v. Löwis11437992002-04-12 09:54:03 +00007143cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007144#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007145_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007146
Michael W. Hudson54241132001-12-07 15:38:26 +00007147
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007148fi
7149
Matthias Kloseb9621712010-04-24 17:59:49 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7151$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007152have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007154/* end confdefs.h. */
7155
7156int
7157main ()
7158{
7159long double x; x = (long double)0;
7160 ;
7161 return 0;
7162}
7163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007164if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007165
7166
Matthias Kloseb9621712010-04-24 17:59:49 +00007167$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007168
7169 have_long_double=yes
7170
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007171fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7174$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007175if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007176# The cast to long int works around a bug in the HP C Compiler
7177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7179# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7181$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007182if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007183 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007184else
Matthias Kloseb9621712010-04-24 17:59:49 +00007185 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 +00007186
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007187else
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 if test "$ac_cv_type_long_double" = yes; then
7189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007191as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007192See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007193 else
7194 ac_cv_sizeof_long_double=0
7195 fi
7196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007197
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7200$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007201
7202
7203
7204cat >>confdefs.h <<_ACEOF
7205#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7206_ACEOF
7207
7208
7209fi
7210
7211
Matthias Kloseb9621712010-04-24 17:59:49 +00007212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7213$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007214have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007216/* end confdefs.h. */
7217
7218int
7219main ()
7220{
7221_Bool x; x = (_Bool)0;
7222 ;
7223 return 0;
7224}
7225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007226if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007227
7228
Matthias Kloseb9621712010-04-24 17:59:49 +00007229$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007230
7231 have_c99_bool=yes
7232
Thomas Woutersb2137042007-02-01 18:02:27 +00007233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7236$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007237if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007238# The cast to long int works around a bug in the HP C Compiler
7239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7243$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007244if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007246else
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 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 +00007248
Thomas Woutersb2137042007-02-01 18:02:27 +00007249else
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 if test "$ac_cv_type__Bool" = yes; then
7251 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007253as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007254See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007255 else
7256 ac_cv_sizeof__Bool=0
7257 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007259
Thomas Woutersb2137042007-02-01 18:02:27 +00007260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7262$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007263
7264
7265
Thomas Woutersb2137042007-02-01 18:02:27 +00007266cat >>confdefs.h <<_ACEOF
7267#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7268_ACEOF
7269
7270
7271fi
7272
Matthias Kloseb9621712010-04-24 17:59:49 +00007273ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007274 #include <stdint.h>
7275 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007276 #ifdef HAVE_INTTYPES_H
7277 #include <inttypes.h>
7278 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007279"
Gregory P. Smith69140482012-01-16 02:05:55 -08007280if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007281
7282cat >>confdefs.h <<_ACEOF
7283#define HAVE_UINTPTR_T 1
7284_ACEOF
7285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007286# The cast to long int works around a bug in the HP C Compiler
7287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7289# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7291$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007292if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007294else
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 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 +00007296
Martin v. Löwis11437992002-04-12 09:54:03 +00007297else
Matthias Kloseb9621712010-04-24 17:59:49 +00007298 if test "$ac_cv_type_uintptr_t" = yes; then
7299 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007301as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007302See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007303 else
7304 ac_cv_sizeof_uintptr_t=0
7305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7310$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007311
7312
7313
Martin v. Löwis11437992002-04-12 09:54:03 +00007314cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007315#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007316_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007317
Michael W. Hudson54241132001-12-07 15:38:26 +00007318
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007319fi
7320
Thomas Wouters89f507f2006-12-13 04:49:30 +00007321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007322# The cast to long int works around a bug in the HP C Compiler
7323# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7324# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7325# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7327$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007328if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007329 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007330else
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332#ifdef HAVE_SYS_TYPES_H
7333#include <sys/types.h>
7334#endif
7335
Matthias Kloseb9621712010-04-24 17:59:49 +00007336"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007337
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007338else
Matthias Kloseb9621712010-04-24 17:59:49 +00007339 if test "$ac_cv_type_off_t" = yes; then
7340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007342as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007343See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007344 else
7345 ac_cv_sizeof_off_t=0
7346 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007348
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7351$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007352
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007353
7354
Martin v. Löwis11437992002-04-12 09:54:03 +00007355cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007356#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007357_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007358
Michael W. Hudson54241132001-12-07 15:38:26 +00007359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007360
Matthias Kloseb9621712010-04-24 17:59:49 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7362$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007363if test "$have_long_long" = yes
7364then
7365if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007366 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007367
Matthias Kloseb9621712010-04-24 17:59:49 +00007368$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7371$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007372else
Matthias Kloseb9621712010-04-24 17:59:49 +00007373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7374$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007375fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7378$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007379fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007380
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007381# The cast to long int works around a bug in the HP C Compiler
7382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7384# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7386$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007387if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007389else
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007391#ifdef HAVE_SYS_TYPES_H
7392#include <sys/types.h>
7393#endif
7394#ifdef HAVE_TIME_H
7395#include <time.h>
7396#endif
7397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007399
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007400else
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 if test "$ac_cv_type_time_t" = yes; then
7402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007404as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007405See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007406 else
7407 ac_cv_sizeof_time_t=0
7408 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007410
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7413$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007414
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007415
7416
Martin v. Löwis11437992002-04-12 09:54:03 +00007417cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007418#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007419_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007420
Michael W. Hudson54241132001-12-07 15:38:26 +00007421
7422
Trent Mick635f6fb2000-08-23 21:33:05 +00007423# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007424ac_save_cc="$CC"
7425if test "$ac_cv_kpthread" = "yes"
7426then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007427elif test "$ac_cv_kthread" = "yes"
7428then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007429elif test "$ac_cv_pthread" = "yes"
7430then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007431fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007432
Matthias Kloseb9621712010-04-24 17:59:49 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7434$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007435have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007437/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007438
7439 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007440int
7441main ()
7442{
Guido van Rossum12580492000-09-24 16:47:19 +00007443pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007444 ;
7445 return 0;
7446}
Matthias Kloseb159a552010-04-25 21:00:44 +00007447
Martin v. Löwis11437992002-04-12 09:54:03 +00007448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007449if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007450 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7454$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007455if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007457# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7458# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7459# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7461$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007462if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007466#ifdef HAVE_PTHREAD_H
7467#include <pthread.h>
7468#endif
7469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007471
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 if test "$ac_cv_type_pthread_t" = yes; then
7474 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007476as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007477See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007478 else
7479 ac_cv_sizeof_pthread_t=0
7480 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007482
Trent Mick635f6fb2000-08-23 21:33:05 +00007483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7485$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007486
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007487
7488
Martin v. Löwis11437992002-04-12 09:54:03 +00007489cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007490#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007491_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007493
Trent Mick635f6fb2000-08-23 21:33:05 +00007494fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007495CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007496
Michael W. Hudson54241132001-12-07 15:38:26 +00007497
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007498case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007499 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007500 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7501 ;;
7502 Darwin/*)
7503 OTHER_LIBTOOL_OPT=""
7504 ;;
7505esac
7506
7507
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007508ARCH_RUN_32BIT=""
7509
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007510case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007511 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007512 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7513 if test "${enable_universalsdk}"; then
7514 :
7515 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007516 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007517 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007518 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007519 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007520 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007521 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007522 if test ${gcc_version} '<' 4.0
7523 then
7524 LIBTOOL_CRUFT="-lcc_dynamic"
7525 else
7526 LIBTOOL_CRUFT=""
7527 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007529 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007530else
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007532/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007533
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007534 #include <unistd.h>
7535 int main(int argc, char*argv[])
7536 {
7537 if (sizeof(long) == 4) {
7538 return 0;
7539 } else {
7540 return 1;
7541 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007542 }
7543
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007545if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007546 ac_osx_32bit=yes
7547else
Matthias Kloseb9621712010-04-24 17:59:49 +00007548 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7551 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007552fi
7553
7554
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007555 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007556 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007557 i386)
7558 MACOSX_DEFAULT_ARCH="i386"
7559 ;;
7560 ppc)
7561 MACOSX_DEFAULT_ARCH="ppc"
7562 ;;
7563 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007564 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007565 ;;
7566 esac
7567 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007568 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007569 i386)
7570 MACOSX_DEFAULT_ARCH="x86_64"
7571 ;;
7572 ppc)
7573 MACOSX_DEFAULT_ARCH="ppc64"
7574 ;;
7575 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007576 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007577 ;;
7578 esac
7579
7580 #ARCH_RUN_32BIT="true"
7581 fi
7582
7583 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007584 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007585 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007586esac
7587
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7589$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007590if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007591then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007592 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007593 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007594 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007595
Matthias Kloseb9621712010-04-24 17:59:49 +00007596$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007597
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7599$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007600 if test $enable_shared = "yes"
7601 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007602 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 +00007603 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007604else
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7606$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007607fi
7608
Matthias Kloseb9621712010-04-24 17:59:49 +00007609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7610$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007611case $ac_sys_system/$ac_sys_release in
7612 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007613
Matthias Kloseb9621712010-04-24 17:59:49 +00007614$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007615
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7617$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007618 ;;
7619 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007622 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007623esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007624
Guido van Rossum0a516c91994-09-12 10:58:40 +00007625# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007626
Michael W. Hudson54241132001-12-07 15:38:26 +00007627
7628
7629
7630
Benjamin Peterson99f03762010-04-11 22:15:28 +00007631
Thomas Wouters477c8d52006-05-27 19:21:47 +00007632
Georg Brandlb1441c72009-01-03 22:33:39 +00007633
Thomas Wouters477c8d52006-05-27 19:21:47 +00007634cat >>confdefs.h <<_ACEOF
7635#define SHLIB_EXT "$SO"
7636_ACEOF
7637
Guido van Rossum0a516c91994-09-12 10:58:40 +00007638# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007639# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007640# (Shared libraries in this instance are shared modules to be loaded into
7641# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7643$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007644if test -z "$LDSHARED"
7645then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007646 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007647 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007648 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007649 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007650 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007651 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007652 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007653 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007654 if test "$GCC" = "yes" ; then
7655 LDSHARED='$(CC) -shared'
7656 LDCXXSHARED='$(CXX) -shared'
7657 else
7658 LDSHARED='$(CC) -G'
7659 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007660 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007661 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007662 if test "$GCC" = "yes" ; then
7663 LDSHARED='$(CC) -shared'
7664 LDCXXSHARED='$(CXX) -shared'
7665 else
7666 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007667 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007668 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007669 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007670 LDSHARED='$(CC) -bundle'
7671 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007672 if test "$enable_framework" ; then
7673 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007674 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7675 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007676 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007677 else
7678 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007679 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007680 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007681 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007682 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007683 LDSHARED='$(CC) -bundle'
7684 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007685 if test "$enable_framework" ; then
7686 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007687 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7688 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007689 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007690 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007691 # No framework, use the Python app as bundle-loader
7692 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007693 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007694 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007695 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007696 Darwin/*)
7697 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7698 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007699
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007700 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007701 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007702 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007703 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007704 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007705 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7706 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007707 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007708 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007709 LDSHARED='$(CC) -bundle'
7710 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007711 if test "$enable_framework" ; then
7712 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007713 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7714 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007715 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007716 else
7717 # No framework, use the Python app as bundle-loader
7718 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7719 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007720 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007721 fi
7722 fi
7723 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007724 Linux*|GNU*|QNX*)
7725 LDSHARED='$(CC) -shared'
7726 LDCXXSHARED='$(CXX) -shared';;
7727 BSD/OS*/4*)
7728 LDSHARED="gcc -shared"
7729 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007730 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007731 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007732 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007733 LDSHARED='$(CC) -shared'
7734 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007735 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007736 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007737 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007738 OpenBSD*)
7739 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7740 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007741 LDSHARED='$(CC) -shared $(CCSHARED)'
7742 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007743 else
7744 case `uname -r` in
7745 [01].* | 2.[0-7] | 2.[0-7].*)
7746 LDSHARED="ld -Bshareable ${LDFLAGS}"
7747 ;;
7748 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007749 LDSHARED='$(CC) -shared $(CCSHARED)'
7750 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007751 ;;
7752 esac
7753 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007754 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007755 LDSHARED='$(CC) -shared'
7756 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007757 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007758 if test "$GCC" = "yes" ; then
7759 LDSHARED='$(CC) -shared'
7760 LDCXXSHARED='$(CXX) -shared'
7761 else
7762 LDSHARED='$(CC) -G'
7763 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007764 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007765 SCO_SV*)
7766 LDSHARED='$(CC) -Wl,-G,-Bexport'
7767 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7768 CYGWIN*)
7769 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7770 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007771 *) LDSHARED="ld";;
7772 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7775$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007776LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007777BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007778# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007779# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7781$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007782if test -z "$CCSHARED"
7783then
Guido van Rossum07397971997-04-29 21:49:50 +00007784 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007785 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007786 then CCSHARED="-fPIC";
7787 elif test `uname -p` = sparc;
7788 then CCSHARED="-xcode=pic32";
7789 else CCSHARED="-Kpic";
7790 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007791 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007792 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007793 else CCSHARED="+z";
7794 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007795 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007796 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007797 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007798 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007799 if test "$GCC" = "yes"
7800 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007801 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007802 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007803 SCO_SV*)
7804 if test "$GCC" = "yes"
7805 then CCSHARED="-fPIC"
7806 else CCSHARED="-Kpic -belf"
7807 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007808 IRIX*/6*) case $CC in
7809 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007810 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007811 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007812 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7815$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007816# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007817# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7819$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007820if test -z "$LINKFORSHARED"
7821then
Guido van Rossum07397971997-04-29 21:49:50 +00007822 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007823 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007824 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007825 LINKFORSHARED="-Wl,-E -Wl,+s";;
7826# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007827 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007828 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007829 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007831 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007832 if test "$enable_framework"
7833 then
Jack Jansenda49e192005-01-07 13:08:22 +00007834 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007835 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007836 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007837 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007838 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007839 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007840 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007841 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7842 then
7843 LINKFORSHARED="-Wl,--export-dynamic"
7844 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007845 SunOS/5*) case $CC in
7846 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007847 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007848 then
7849 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007850 fi;;
7851 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007852 CYGWIN*)
7853 if test $enable_shared = "no"
7854 then
7855 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7856 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007857 QNX*)
7858 # -Wl,-E causes the symbols to be added to the dynamic
7859 # symbol table so that they can be found when a module
7860 # is loaded. -N 2048K causes the stack size to be set
7861 # to 2048 kilobytes so that the stack doesn't overflow
7862 # when running test_compile.py.
7863 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007864 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7867$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007868
Michael W. Hudson54241132001-12-07 15:38:26 +00007869
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007870
Matthias Kloseb9621712010-04-24 17:59:49 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7872$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007873if test ! "$LIBRARY" = "$LDLIBRARY"
7874then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007875 case $ac_sys_system in
7876 CYGWIN*)
7877 # Cygwin needs CCSHARED when building extension DLLs
7878 # but not when building the interpreter DLL.
7879 CFLAGSFORSHARED='';;
7880 *)
7881 CFLAGSFORSHARED='$(CCSHARED)'
7882 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7885$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007886
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007887# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7888# library (with --enable-shared).
7889# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007890# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7891# if it is not required, since it creates a dependency of the shared library
7892# to LIBS. This, in turn, means that applications linking the shared libpython
7893# don't need to link LIBS explicitly. The default should be only changed
7894# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007895
Matthias Kloseb9621712010-04-24 17:59:49 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7897$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007898case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007899 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007900 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007901esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7903$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007904
7905
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7908$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007909if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007911else
Martin v. Löwis11437992002-04-12 09:54:03 +00007912 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007913LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917/* Override any GCC internal prototype to avoid an error.
7918 Use char because int might match the return type of a GCC
7919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007920#ifdef __cplusplus
7921extern "C"
7922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007923char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007924int
7925main ()
7926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ;
7929 return 0;
7930}
7931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937rm -f core conftest.err conftest.$ac_objext \
7938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007939LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7942$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007943if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 cat >>confdefs.h <<_ACEOF
7945#define HAVE_LIBDL 1
7946_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007948 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007949
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007950fi
7951 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7953$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007954if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007956else
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007958LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962/* Override any GCC internal prototype to avoid an error.
7963 Use char because int might match the return type of a GCC
7964 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007965#ifdef __cplusplus
7966extern "C"
7967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007968char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007969int
7970main ()
7971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 ;
7974 return 0;
7975}
7976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007977if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979else
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007982rm -f core conftest.err conftest.$ac_objext \
7983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007984LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7987$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007988if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 cat >>confdefs.h <<_ACEOF
7990#define HAVE_LIBDLD 1
7991_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007992
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007993 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007995fi
7996 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007997
Georg Brandlb1441c72009-01-03 22:33:39 +00007998# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007999if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8001$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008002if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008004else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008005 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009/* Override any GCC internal prototype to avoid an error.
8010 Use char because int might match the return type of a GCC
8011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012#ifdef __cplusplus
8013extern "C"
8014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008015char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008016int
8017main ()
8018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ;
8021 return 0;
8022}
8023_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024for ac_lib in '' pthread rt posix4; do
8025 if test -z "$ac_lib"; then
8026 ac_res="none required"
8027 else
8028 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008029 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008034rm -f core conftest.err conftest.$ac_objext \
8035 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008036 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039done
Gregory P. Smith69140482012-01-16 02:05:55 -08008040if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042else
8043 ac_cv_search_sem_init=no
8044fi
8045rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008046LIBS=$ac_func_search_save_LIBS
8047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8049$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008051if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008053
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008054fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008055 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008056 # posix4 on Solaris 2.6
8057 # pthread (first!) on Linux
8058fi
8059
Martin v. Löwis19d17342003-06-14 21:03:05 +00008060# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8062$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008063if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008065else
8066 ac_check_lib_save_LIBS=$LIBS
8067LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008069/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071/* Override any GCC internal prototype to avoid an error.
8072 Use char because int might match the return type of a GCC
8073 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008074#ifdef __cplusplus
8075extern "C"
8076#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008077char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008078int
8079main ()
8080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008082 ;
8083 return 0;
8084}
8085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008086if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008087 ac_cv_lib_intl_textdomain=yes
8088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008091rm -f core conftest.err conftest.$ac_objext \
8092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008093LIBS=$ac_check_lib_save_LIBS
8094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8096$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008097if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008098
Matthias Kloseb9621712010-04-24 17:59:49 +00008099$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008100
Brett Cannonc6d936e2009-06-07 20:09:53 +00008101 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008102fi
8103
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008104
8105# checks for system dependent C++ extensions support
8106case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8108$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008110/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008111
Georg Brandl59e87bd2011-02-15 19:48:59 +00008112 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008113int
8114main ()
8115{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008116loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ;
8118 return 0;
8119}
Matthias Kloseb159a552010-04-25 21:00:44 +00008120
Martin v. Löwis11437992002-04-12 09:54:03 +00008121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008122if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008123
Matthias Kloseb159a552010-04-25 21:00:44 +00008124
Matthias Kloseb9621712010-04-24 17:59:49 +00008125$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008126
Matthias Kloseb159a552010-04-25 21:00:44 +00008127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008128$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008129
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008130else
Matthias Kloseb159a552010-04-25 21:00:44 +00008131
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008133$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008134
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008136rm -f core conftest.err conftest.$ac_objext \
8137 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008138 *) ;;
8139esac
8140
Guido van Rossum70c7f481998-03-26 18:44:10 +00008141# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8143$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008144if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008146else
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008148LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152/* Override any GCC internal prototype to avoid an error.
8153 Use char because int might match the return type of a GCC
8154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008155#ifdef __cplusplus
8156extern "C"
8157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008158char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008159int
8160main ()
8161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008163 ;
8164 return 0;
8165}
8166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008168 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008169else
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008171fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008172rm -f core conftest.err conftest.$ac_objext \
8173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8177$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008178if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008179 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008180fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008181 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8183$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008184if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008186else
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008188LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192/* Override any GCC internal prototype to avoid an error.
8193 Use char because int might match the return type of a GCC
8194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195#ifdef __cplusplus
8196extern "C"
8197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008198char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008199int
8200main ()
8201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008203 ;
8204 return 0;
8205}
8206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008207if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008208 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008209else
Matthias Kloseb9621712010-04-24 17:59:49 +00008210 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008212rm -f core conftest.err conftest.$ac_objext \
8213 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008214LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8217$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008218if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008219 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008220fi
8221 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008222
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8224$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008227if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8230$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008231LIBS="$withval $LIBS"
8232
8233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8235$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236fi
8237
Guido van Rossum7f43da71994-08-01 12:15:30 +00008238
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008239if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008240 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8241set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8243$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008244if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008246else
8247 case $PKG_CONFIG in
8248 [\\/]* | ?:[\\/]*)
8249 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8250 ;;
8251 *)
8252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8253for as_dir in $PATH
8254do
8255 IFS=$as_save_IFS
8256 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8259 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008261 break 2
8262 fi
8263done
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008265IFS=$as_save_IFS
8266
8267 ;;
8268esac
8269fi
8270PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8271if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8273$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008274else
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8276$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008277fi
8278
8279
8280fi
8281if test -z "$ac_cv_path_PKG_CONFIG"; then
8282 ac_pt_PKG_CONFIG=$PKG_CONFIG
8283 # Extract the first word of "pkg-config", so it can be a program name with args.
8284set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008287if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008289else
8290 case $ac_pt_PKG_CONFIG in
8291 [\\/]* | ?:[\\/]*)
8292 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8293 ;;
8294 *)
8295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298 IFS=$as_save_IFS
8299 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008301 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8302 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008304 break 2
8305 fi
8306done
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008308IFS=$as_save_IFS
8309
8310 ;;
8311esac
8312fi
8313ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8314if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8316$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008320fi
8321
8322 if test "x$ac_pt_PKG_CONFIG" = x; then
8323 PKG_CONFIG=""
8324 else
8325 case $cross_compiling:$ac_tool_warned in
8326yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8328$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008329ac_tool_warned=yes ;;
8330esac
8331 PKG_CONFIG=$ac_pt_PKG_CONFIG
8332 fi
8333else
8334 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8335fi
8336
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008337
8338# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8340$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008341
8342# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008343if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008344 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008345else
8346 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008347fi
8348
8349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8351$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008352
8353# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8355$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008356
8357# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008358if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008359 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008360else
8361 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008362fi
8363
8364
8365if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008366 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8367else
8368 LIBFFI_INCLUDEDIR=""
8369fi
8370
8371
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8373$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008374
Benjamin Peterson076ed002010-10-31 17:11:02 +00008375# Check for support for loadable sqlite extensions
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8377$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8378# Check whether --enable-loadable-sqlite-extensions was given.
8379if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8380 enableval=$enable_loadable_sqlite_extensions;
8381else
8382 enable_loadable_sqlite_extensions="no"
8383fi
8384
8385
8386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8387$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8388
Matthias Klose55708cc2009-04-30 08:06:49 +00008389# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8391$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008392
8393# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008394if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008395 withval=$with_dbmliborder;
8396if test x$with_dbmliborder = xyes
8397then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008398as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008399else
8400 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8401 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8402 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008403 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008404 fi
8405 done
8406fi
8407fi
8408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8410$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008411
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008412# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008413
8414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8416$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008419if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420 withval=$with_signal_module;
8421fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008422
8423
8424if test -z "$with_signal_module"
8425then with_signal_module="yes"
8426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8428$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008429
8430if test "${with_signal_module}" = "yes"; then
8431 USE_SIGNAL_MODULE=""
8432 SIGNAL_OBJS=""
8433else
8434 USE_SIGNAL_MODULE="#"
8435 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8436fi
8437
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008438# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008439
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008440USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8443$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
Guido van Rossumec2f0731997-01-22 20:54:01 +00008445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008447if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8450$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008451LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008452if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008453 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008454fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8457$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458fi
8459
Martin v. Löwis11437992002-04-12 09:54:03 +00008460
8461# Templates for things AC_DEFINEd more than once.
8462# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008463
8464
Martin v. Löwis11437992002-04-12 09:54:03 +00008465
8466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8468$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008471if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472 withval=$with_threads;
8473fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008474
8475
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008476# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008479if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480 withval=$with_thread; with_threads=$with_thread
8481fi
8482
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008483
8484if test -z "$with_threads"
8485then with_threads="yes"
8486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8488$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008489
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008490
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008491if test "$with_threads" = "no"
8492then
8493 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008494elif test "$ac_cv_pthread_is_default" = yes
8495then
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008497
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008498 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008500
8501 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008503elif test "$ac_cv_kpthread" = "yes"
8504then
8505 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008506 if test "$ac_cv_cxx_thread" = "yes"; then
8507 CXX="$CXX -Kpthread"
8508 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008510
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008511 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008512 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008513elif test "$ac_cv_kthread" = "yes"
8514then
8515 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008516 if test "$ac_cv_cxx_thread" = "yes"; then
8517 CXX="$CXX -Kthread"
8518 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008520
8521 posix_threads=yes
8522 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008523elif test "$ac_cv_pthread" = "yes"
8524then
8525 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008526 if test "$ac_cv_cxx_thread" = "yes"; then
8527 CXX="$CXX -pthread"
8528 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008530
8531 posix_threads=yes
8532 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008533else
8534 if test ! -z "$with_threads" -a -d "$with_threads"
8535 then LDFLAGS="$LDFLAGS -L$with_threads"
8536 fi
8537 if test ! -z "$withval" -a -d "$withval"
8538 then LDFLAGS="$LDFLAGS -L$withval"
8539 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008540
8541 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008542 # define _POSIX_THREADS in unistd.h. Some apparently don't
8543 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8545$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008547/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008548
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008549#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008550#ifdef _POSIX_THREADS
8551yes
8552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
8554_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008557 unistd_defines_pthreads=yes
8558else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008559 unistd_defines_pthreads=no
8560fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008561rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008562
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8564$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008565
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008567
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 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 -08008569if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574
Matthias Kloseb9621712010-04-24 17:59:49 +00008575$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008576
8577 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008578 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008579else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008580
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 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 -08008582if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008584
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587
Matthias Kloseb9621712010-04-24 17:59:49 +00008588$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008589
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008590 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008591else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008592
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008593 # Just looking for pthread_create in libpthread is not enough:
8594 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8595 # So we really have to include pthread.h, and then link.
8596 _libs=$LIBS
8597 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8599$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008601/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008602#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008603
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008604void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008605int
8606main ()
8607{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008608
8609pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ;
8611 return 0;
8612}
8613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008615
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8617$as_echo "yes" >&6; }
8618 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008619
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008620 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008621 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008622else
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008624 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008626if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008628
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008629 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008630 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008631else
Guido van Rossumad678af1998-10-02 14:42:15 +00008632
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8634$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008635if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008637else
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008639LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643/* Override any GCC internal prototype to avoid an error.
8644 Use char because int might match the return type of a GCC
8645 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008646#ifdef __cplusplus
8647extern "C"
8648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008649char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008650int
8651main ()
8652{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ;
8655 return 0;
8656}
8657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008658if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663rm -f core conftest.err conftest.$ac_objext \
8664 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008665LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8668$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008669if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008671
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008672 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008673 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008674 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008675else
Greg Steinadf63d62000-07-05 10:38:09 +00008676
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8678$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008679if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008681else
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008683LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687/* Override any GCC internal prototype to avoid an error.
8688 Use char because int might match the return type of a GCC
8689 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008690#ifdef __cplusplus
8691extern "C"
8692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008693char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008694int
8695main ()
8696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008697return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ;
8699 return 0;
8700}
8701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008704else
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707rm -f core conftest.err conftest.$ac_objext \
8708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008709LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8712$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008713if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008715
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008716 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008717 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008718 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008719else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008720
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8722$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008723if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008725else
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008727LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731/* Override any GCC internal prototype to avoid an error.
8732 Use char because int might match the return type of a GCC
8733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734#ifdef __cplusplus
8735extern "C"
8736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008737char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ;
8743 return 0;
8744}
8745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008753LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8756$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008757if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008759
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008760 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008761 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008762 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008763else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008764
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8766$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008767if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008769else
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008771LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775/* Override any GCC internal prototype to avoid an error.
8776 Use char because int might match the return type of a GCC
8777 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008778#ifdef __cplusplus
8779extern "C"
8780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008781char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008782int
8783main ()
8784{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ;
8787 return 0;
8788}
8789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008790if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008792else
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795rm -f core conftest.err conftest.$ac_objext \
8796 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008797LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8800$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008801if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008803
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008804 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008805 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008806 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008807else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008808
Martin v. Löwis130fb172001-07-19 11:00:41 +00008809 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008810fi
8811
Guido van Rossum627b2d71993-12-24 10:39:16 +00008812
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008813fi
8814
Guido van Rossum0be3e491997-05-22 20:33:33 +00008815fi
8816
Guido van Rossum49545951997-12-02 19:28:29 +00008817fi
8818
Guido van Rossumb93a8621998-05-07 13:27:32 +00008819fi
8820
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822rm -f core conftest.err conftest.$ac_objext \
8823 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824fi
8825
Martin v. Löwis11437992002-04-12 09:54:03 +00008826
8827fi
8828
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008829
Michael W. Hudson54241132001-12-07 15:38:26 +00008830
Matthias Kloseb9621712010-04-24 17:59:49 +00008831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8832$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008833if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008835else
Martin v. Löwis11437992002-04-12 09:54:03 +00008836 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008837LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841/* Override any GCC internal prototype to avoid an error.
8842 Use char because int might match the return type of a GCC
8843 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008844#ifdef __cplusplus
8845extern "C"
8846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008847char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008848int
8849main ()
8850{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ;
8853 return 0;
8854}
8855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008856if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008858else
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008861rm -f core conftest.err conftest.$ac_objext \
8862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008863LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8866$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008867if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008869
Martin v. Löwis130fb172001-07-19 11:00:41 +00008870 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008871 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008872 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008873fi
8874
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008875
Neal Norwitza978ab02002-11-02 16:58:05 +00008876 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8878$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008879if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008881else
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008883LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887/* Override any GCC internal prototype to avoid an error.
8888 Use char because int might match the return type of a GCC
8889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008890#ifdef __cplusplus
8891extern "C"
8892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008893char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008894int
8895main ()
8896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ;
8899 return 0;
8900}
8901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008904else
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008907rm -f core conftest.err conftest.$ac_objext \
8908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008909LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8912$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008913if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008915
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008916 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008917 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008918 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008919fi
8920
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008921 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008922
Martin v. Löwis130fb172001-07-19 11:00:41 +00008923 if test "$USE_THREAD_MODULE" != "#"
8924 then
8925 # If the above checks didn't disable threads, (at least) OSF1
8926 # needs this '-threads' argument during linking.
8927 case $ac_sys_system in
8928 OSF1) LDLAST=-threads;;
8929 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008930 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008931fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008932
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008933if test "$posix_threads" = "yes"; then
8934 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008935
Matthias Kloseb9621712010-04-24 17:59:49 +00008936$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008937
8938 fi
8939
8940 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8941 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008942 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008943$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008944
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008945 ;;
8946 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008947$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008948
8949 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008950 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008951$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008952
8953 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008954 esac
8955
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8957$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008958 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008962 ac_cv_pthread_system_supported=no
8963else
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008965/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008966#include <pthread.h>
8967 void *foo(void *parm) {
8968 return NULL;
8969 }
8970 main() {
8971 pthread_attr_t attr;
8972 pthread_t id;
8973 if (pthread_attr_init(&attr)) exit(-1);
8974 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8975 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8976 exit(0);
8977 }
8978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008979if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008980 ac_cv_pthread_system_supported=yes
8981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8985 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008986fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988
Guido van Rossum627b2d71993-12-24 10:39:16 +00008989fi
8990
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8992$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008993 if test "$ac_cv_pthread_system_supported" = "yes"; then
8994
Matthias Kloseb9621712010-04-24 17:59:49 +00008995$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008996
8997 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 for ac_func in pthread_sigmask
8999do :
9000 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08009001if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009002 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009003#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009005 case $ac_sys_system in
9006 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009007
Matthias Kloseb9621712010-04-24 17:59:49 +00009008$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009009
9010 ;;
9011 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009012fi
9013done
9014
9015fi
9016
9017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009019
Matthias Kloseb9621712010-04-24 17:59:49 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9021$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009023if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9027$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028 ipv6=no
9029 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9031$as_echo "yes" >&6; }
9032 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033
9034 ipv6=yes
9035 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037else
Martin v. Löwis11437992002-04-12 09:54:03 +00009038
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009040
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9042$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043 ipv6=no
9044
9045else
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009047/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048 /* AF_INET6 available check */
9049#include <sys/types.h>
9050#include <sys/socket.h>
9051main()
9052{
9053 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9054 exit(1);
9055 else
9056 exit(0);
9057}
9058
Martin v. Löwis11437992002-04-12 09:54:03 +00009059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009060if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009061
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9063$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066else
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9069$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009071
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9074 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075fi
9076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009078if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9080$as_echo_n "checking if RFC2553 API is available... " >&6; }
9081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009082/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009083
9084 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009085#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009086int
9087main ()
9088{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009089struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009090 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 ;
9092 return 0;
9093}
Matthias Kloseb159a552010-04-25 21:00:44 +00009094
Martin v. Löwis11437992002-04-12 09:54:03 +00009095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009096if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009097
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009099$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009100 ipv6=yes
9101
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009102else
Matthias Kloseb159a552010-04-25 21:00:44 +00009103
9104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009105$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009106 ipv6=no
9107
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009110fi
9111
9112if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009114
9115fi
9116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009117fi
9118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009119
9120ipv6type=unknown
9121ipv6lib=none
9122ipv6trylibc=no
9123
9124if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9126$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009127 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9128 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009129 case $i in
9130 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009132/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009133
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009134#include <netinet/in.h>
9135#ifdef IPV6_INRIA_VERSION
9136yes
9137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009138_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009141 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009143rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009144
9145 ;;
9146 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009148/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009149
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150#include <netinet/in.h>
9151#ifdef __KAME__
9152yes
9153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009154_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009157 ipv6type=$i;
9158 ipv6lib=inet6
9159 ipv6libdir=/usr/local/v6/lib
9160 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009162rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009163
9164 ;;
9165 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009167/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009169#include <features.h>
9170#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9171yes
9172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009173_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009175 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009176 ipv6type=$i;
9177 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009178fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009179rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009180
9181 ;;
9182 linux-inet6)
9183 if test -d /usr/inet6; then
9184 ipv6type=$i
9185 ipv6lib=inet6
9186 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009187 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009188 fi
9189 ;;
9190 solaris)
9191 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009192 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009193 ipv6type=$i
9194 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009195 fi
9196 fi
9197 ;;
9198 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009200/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009201
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009202#include <sys/param.h>
9203#ifdef _TOSHIBA_INET6
9204yes
9205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009206_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009208 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209 ipv6type=$i;
9210 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009211 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009212fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009213rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009214
9215 ;;
9216 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009218/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009219
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009220#include </usr/local/v6/include/sys/v6config.h>
9221#ifdef __V6D__
9222yes
9223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009224_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009227 ipv6type=$i;
9228 ipv6lib=v6;
9229 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009230 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009231fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009232rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009233
9234 ;;
9235 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009237/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009238
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009239#include <sys/param.h>
9240#ifdef _ZETA_MINAMI_INET6
9241yes
9242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009243_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009246 ipv6type=$i;
9247 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009248 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009250rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009251
9252 ;;
9253 esac
9254 if test "$ipv6type" != "unknown"; then
9255 break
9256 fi
9257 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9259$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260fi
9261
9262if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9263 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9264 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9265 echo "using lib$ipv6lib"
9266 else
9267 if test $ipv6trylibc = "yes"; then
9268 echo "using libc"
9269 else
9270 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9271 echo "You need to fetch lib$ipv6lib.a from appropriate"
9272 echo 'ipv6 kit and compile beforehand.'
9273 exit 1
9274 fi
9275 fi
9276fi
9277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9279$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009281/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009282
9283 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009284int
9285main ()
9286{
9287FSIORefNum fRef = 0
9288 ;
9289 return 0;
9290}
Matthias Kloseb159a552010-04-25 21:00:44 +00009291
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009293if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009294
Matthias Kloseb159a552010-04-25 21:00:44 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009297
Matthias Kloseb9621712010-04-24 17:59:49 +00009298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9299$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009300
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009301else
Matthias Kloseb159a552010-04-25 21:00:44 +00009302
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009305
9306fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9308
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009309# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9311$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009314if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315 withval=$with_doc_strings;
9316fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009317
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009318
9319if test -z "$with_doc_strings"
9320then with_doc_strings="yes"
9321fi
9322if test "$with_doc_strings" != "no"
9323then
9324
Matthias Kloseb9621712010-04-24 17:59:49 +00009325$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009326
9327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9329$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009330
Antoine Pitrou042b1282010-08-13 21:15:58 +00009331# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9333$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009335# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009336if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009338if test "$withval" != no
9339then
9340
Matthias Kloseb9621712010-04-24 17:59:49 +00009341$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009342
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9344$as_echo "yes" >&6; }
9345else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009347fi
9348else
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9350$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009351fi
9352
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009353
9354# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9356$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009359if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360 withval=$with_pymalloc;
9361fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009362
Neil Schemenauera35c6882001-02-27 04:45:05 +00009363
Neil Schemenauer16c22972002-03-22 15:34:49 +00009364if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009365then
9366 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009367 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009368fi
9369if test "$with_pymalloc" != "no"
9370then
Martin v. Löwis11437992002-04-12 09:54:03 +00009371
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009373
9374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9376$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009377
Benjamin Peterson05159c42009-12-03 03:01:27 +00009378# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9380$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009381
9382# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009383if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009384 withval=$with_valgrind;
9385else
9386 with_valgrind=no
9387fi
9388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9390$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009391if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009392 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 -08009393if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009394
Matthias Kloseb9621712010-04-24 17:59:49 +00009395$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009396
9397else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009398 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009399
9400fi
9401
9402
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009403 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009404fi
9405
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009406# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009407
Guido van Rossum98935bf2001-09-05 19:13:16 +00009408DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009409
Guido van Rossume97ee181999-12-20 21:27:22 +00009410# the dlopen() function means we might want to use dynload_shlib.o. some
9411# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009412for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009413do :
9414 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009415if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009417#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009418_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009419
Guido van Rossume97ee181999-12-20 21:27:22 +00009420fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009421done
Guido van Rossume97ee181999-12-20 21:27:22 +00009422
Michael W. Hudson54241132001-12-07 15:38:26 +00009423
Guido van Rossume97ee181999-12-20 21:27:22 +00009424# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9425# loading of modules.
9426
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9428$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009429if test -z "$DYNLOADFILE"
9430then
9431 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009432 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9433 if test "$ac_cv_func_dlopen" = yes
9434 then DYNLOADFILE="dynload_shlib.o"
9435 else DYNLOADFILE="dynload_aix.o"
9436 fi
9437 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009438 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009439 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9440 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009441 *)
9442 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9443 # out any dynamic loading
9444 if test "$ac_cv_func_dlopen" = yes
9445 then DYNLOADFILE="dynload_shlib.o"
9446 else DYNLOADFILE="dynload_stub.o"
9447 fi
9448 ;;
9449 esac
9450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9452$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009453if test "$DYNLOADFILE" != "dynload_stub.o"
9454then
Martin v. Löwis11437992002-04-12 09:54:03 +00009455
Matthias Kloseb9621712010-04-24 17:59:49 +00009456$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009457
9458fi
9459
Neil Schemenauer4e425612001-06-19 15:44:15 +00009460# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9461
Michael W. Hudson54241132001-12-07 15:38:26 +00009462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9464$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009465if test -z "$MACHDEP_OBJS"
9466then
Jack Jansene578a632001-08-15 01:27:14 +00009467 MACHDEP_OBJS=$extra_machdep_objs
9468else
9469 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9472$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009473
Guido van Rossum627b2d71993-12-24 10:39:16 +00009474# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009475for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009476 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009477 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009478 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009479 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009480 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009481 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009482 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9483 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009484 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009485 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009486 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009487 truncate uname unsetenv utimes waitpid wait3 wait4 \
9488 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009489do :
9490 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9491ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009492if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009494#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009495_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009496
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009497fi
9498done
9499
Michael W. Hudson54241132001-12-07 15:38:26 +00009500
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009501ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9502 #include <dirent.h>
9503"
9504if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9505
9506$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9507
9508fi
9509
9510
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009511# For some functions, having a definition is not sufficient, since
9512# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9514$as_echo_n "checking for chroot... " >&6; }
9515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009516/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009517#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009518int
9519main ()
9520{
9521void *x=chroot
9522 ;
9523 return 0;
9524}
9525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009526if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009527
Matthias Kloseb9621712010-04-24 17:59:49 +00009528$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009529
Matthias Kloseb159a552010-04-25 21:00:44 +00009530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009531$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009532else
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9534$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009535
9536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9539$as_echo_n "checking for link... " >&6; }
9540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009541/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009542#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009543int
9544main ()
9545{
9546void *x=link
9547 ;
9548 return 0;
9549}
9550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009552
Matthias Kloseb9621712010-04-24 17:59:49 +00009553$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009554
Matthias Kloseb159a552010-04-25 21:00:44 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009556$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009557else
Matthias Kloseb9621712010-04-24 17:59:49 +00009558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9559$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009560
9561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9564$as_echo_n "checking for symlink... " >&6; }
9565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009566/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009567#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009568int
9569main ()
9570{
9571void *x=symlink
9572 ;
9573 return 0;
9574}
9575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009577
Matthias Kloseb9621712010-04-24 17:59:49 +00009578$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009579
Matthias Kloseb159a552010-04-25 21:00:44 +00009580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009581$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009582else
Matthias Kloseb9621712010-04-24 17:59:49 +00009583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009585
9586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9589$as_echo_n "checking for fchdir... " >&6; }
9590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009591/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009592#include <unistd.h>
9593int
9594main ()
9595{
9596void *x=fchdir
9597 ;
9598 return 0;
9599}
9600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009602
Matthias Kloseb9621712010-04-24 17:59:49 +00009603$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009604
Matthias Kloseb159a552010-04-25 21:00:44 +00009605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009606$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009607else
Matthias Kloseb9621712010-04-24 17:59:49 +00009608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009610
9611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9614$as_echo_n "checking for fsync... " >&6; }
9615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009616/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009617#include <unistd.h>
9618int
9619main ()
9620{
9621void *x=fsync
9622 ;
9623 return 0;
9624}
9625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009627
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009629
Matthias Kloseb159a552010-04-25 21:00:44 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009631$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009632else
Matthias Kloseb9621712010-04-24 17:59:49 +00009633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009635
9636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9639$as_echo_n "checking for fdatasync... " >&6; }
9640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009642#include <unistd.h>
9643int
9644main ()
9645{
9646void *x=fdatasync
9647 ;
9648 return 0;
9649}
9650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009652
Matthias Kloseb9621712010-04-24 17:59:49 +00009653$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009654
Matthias Kloseb159a552010-04-25 21:00:44 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009656$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009657else
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9659$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009660
9661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9664$as_echo_n "checking for epoll... " >&6; }
9665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009666/* end confdefs.h. */
9667#include <sys/epoll.h>
9668int
9669main ()
9670{
9671void *x=epoll_create
9672 ;
9673 return 0;
9674}
9675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009679
Matthias Kloseb159a552010-04-25 21:00:44 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009681$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009682else
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009685
9686fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9689$as_echo_n "checking for kqueue... " >&6; }
9690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009691/* end confdefs.h. */
9692
9693#include <sys/types.h>
9694#include <sys/event.h>
9695
9696int
9697main ()
9698{
9699int x=kqueue()
9700 ;
9701 return 0;
9702}
9703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009704if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009705
Matthias Kloseb9621712010-04-24 17:59:49 +00009706$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009707
Matthias Kloseb159a552010-04-25 21:00:44 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009709$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009710else
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009713
9714fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009716# On some systems (eg. FreeBSD 5), we would find a definition of the
9717# functions ctermid_r, setgroups in the library, but no prototype
9718# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9719# address to avoid compiler warnings and potential miscompilations
9720# because of the missing prototypes.
9721
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9723$as_echo_n "checking for ctermid_r... " >&6; }
9724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009726
Martin v. Löwisd5843682002-11-21 20:41:28 +00009727#include <stdio.h>
9728
Martin v. Löwisd5843682002-11-21 20:41:28 +00009729int
9730main ()
9731{
9732void* p = ctermid_r
9733 ;
9734 return 0;
9735}
9736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009738
Matthias Kloseb9621712010-04-24 17:59:49 +00009739$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009740
Matthias Kloseb159a552010-04-25 21:00:44 +00009741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009742$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009746
9747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9749
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9751$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009752if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009753 $as_echo_n "(cached) " >&6
9754else
9755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009756/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009757#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009758int
9759main ()
9760{
9761void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009762
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009763 ;
9764 return 0;
9765}
9766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009767if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009768 ac_cv_flock_decl=yes
9769else
9770 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009771
9772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009774
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009775fi
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9777$as_echo "$ac_cv_flock_decl" >&6; }
9778if test "x${ac_cv_flock_decl}" = xyes; then
9779 for ac_func in flock
9780do :
9781 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009782if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009783 cat >>confdefs.h <<_ACEOF
9784#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009785_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009786
Antoine Pitroua3000072010-09-07 14:52:42 +00009787else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009789$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009790if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009791 $as_echo_n "(cached) " >&6
9792else
9793 ac_check_lib_save_LIBS=$LIBS
9794LIBS="-lbsd $LIBS"
9795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9796/* end confdefs.h. */
9797
9798/* Override any GCC internal prototype to avoid an error.
9799 Use char because int might match the return type of a GCC
9800 builtin and then its argument prototype would still apply. */
9801#ifdef __cplusplus
9802extern "C"
9803#endif
9804char flock ();
9805int
9806main ()
9807{
9808return flock ();
9809 ;
9810 return 0;
9811}
9812_ACEOF
9813if ac_fn_c_try_link "$LINENO"; then :
9814 ac_cv_lib_bsd_flock=yes
9815else
9816 ac_cv_lib_bsd_flock=no
9817fi
9818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
9820LIBS=$ac_check_lib_save_LIBS
9821fi
9822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9823$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009824if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009825 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009826
9827
9828$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9829
9830
9831fi
9832
9833
9834fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009835done
9836
Antoine Pitroua3000072010-09-07 14:52:42 +00009837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838
Matthias Kloseb9621712010-04-24 17:59:49 +00009839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9840$as_echo_n "checking for getpagesize... " >&6; }
9841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009842/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009843
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009844#include <unistd.h>
9845
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009846int
9847main ()
9848{
9849void* p = getpagesize
9850 ;
9851 return 0;
9852}
9853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009855
Matthias Kloseb9621712010-04-24 17:59:49 +00009856$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009857
Matthias Kloseb159a552010-04-25 21:00:44 +00009858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009859$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009860else
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009863
9864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009866
Charles-François Natali6613c182011-11-27 12:41:06 +01009867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9868$as_echo_n "checking for broken unsetenv... " >&6; }
9869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9870/* end confdefs.h. */
9871
9872#include <stdlib.h>
9873
9874int
9875main ()
9876{
9877int res = unsetenv("DUMMY")
9878 ;
9879 return 0;
9880}
9881_ACEOF
9882if ac_fn_c_try_compile "$LINENO"; then :
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9884$as_echo "no" >&6; }
9885else
9886
9887$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9888
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9890$as_echo "yes" >&6; }
9891
9892fi
9893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9894
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009895for ac_prog in true
9896do
9897 # Extract the first word of "$ac_prog", so it can be a program name with args.
9898set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9900$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009901if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009903else
9904 if test -n "$TRUE"; then
9905 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9906else
9907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9908for as_dir in $PATH
9909do
9910 IFS=$as_save_IFS
9911 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913 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 +00009914 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 $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 +00009916 break 2
9917 fi
9918done
Matthias Kloseb9621712010-04-24 17:59:49 +00009919 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009921
9922fi
9923fi
9924TRUE=$ac_cv_prog_TRUE
9925if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9927$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009928else
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009931fi
9932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009933
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009934 test -n "$TRUE" && break
9935done
9936test -n "$TRUE" || TRUE="/bin/true"
9937
9938
Matthias Kloseb9621712010-04-24 17:59:49 +00009939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9940$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009941if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009943else
9944 ac_check_lib_save_LIBS=$LIBS
9945LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009947/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949/* Override any GCC internal prototype to avoid an error.
9950 Use char because int might match the return type of a GCC
9951 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009952#ifdef __cplusplus
9953extern "C"
9954#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009955char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009956int
9957main ()
9958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009960 ;
9961 return 0;
9962}
9963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009965 ac_cv_lib_c_inet_aton=yes
9966else
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009969rm -f core conftest.err conftest.$ac_objext \
9970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009971LIBS=$ac_check_lib_save_LIBS
9972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9974$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009975if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009976 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009977else
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9979$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009980if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009982else
9983 ac_check_lib_save_LIBS=$LIBS
9984LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009986/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009988/* Override any GCC internal prototype to avoid an error.
9989 Use char because int might match the return type of a GCC
9990 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009991#ifdef __cplusplus
9992extern "C"
9993#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009994char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009995int
9996main ()
9997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009998return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009999 ;
10000 return 0;
10001}
10002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010003if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010004 ac_cv_lib_resolv_inet_aton=yes
10005else
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010008rm -f core conftest.err conftest.$ac_objext \
10009 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010010LIBS=$ac_check_lib_save_LIBS
10011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10013$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010014if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010015 cat >>confdefs.h <<_ACEOF
10016#define HAVE_LIBRESOLV 1
10017_ACEOF
10018
10019 LIBS="-lresolv $LIBS"
10020
10021fi
10022
10023
10024fi
10025
10026
Christian Heimesd0764e22007-12-04 15:00:33 +000010027# On Tru64, chflags seems to be present, but calling it will
10028# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10030$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010031if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010032 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010033else
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010035 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010036else
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010038/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010039
Christian Heimesd0764e22007-12-04 15:00:33 +000010040#include <sys/stat.h>
10041#include <unistd.h>
10042int main(int argc, char*argv[])
10043{
10044 if(chflags(argv[0], 0) != 0)
10045 return 1;
10046 return 0;
10047}
Ned Deily3eb67d52011-06-28 00:00:28 -070010048
Christian Heimesd0764e22007-12-04 15:00:33 +000010049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010050if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010051 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010052else
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010057fi
10058
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10062$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010063if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010065if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010066 ac_cv_have_chflags="yes"
10067else
10068 ac_cv_have_chflags="no"
10069fi
10070
10071fi
10072if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010075
10076fi
10077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10079$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010080if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010082else
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010084 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010085else
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010087/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010088
Christian Heimesd0764e22007-12-04 15:00:33 +000010089#include <sys/stat.h>
10090#include <unistd.h>
10091int main(int argc, char*argv[])
10092{
10093 if(lchflags(argv[0], 0) != 0)
10094 return 1;
10095 return 0;
10096}
Ned Deily3eb67d52011-06-28 00:00:28 -070010097
Christian Heimesd0764e22007-12-04 15:00:33 +000010098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010099if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010100 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010101else
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010106fi
10107
10108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10111$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010112if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010114if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010115 ac_cv_have_lchflags="yes"
10116else
10117 ac_cv_have_lchflags="no"
10118fi
10119
10120fi
10121if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010124
10125fi
10126
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010127case $ac_sys_system/$ac_sys_release in
10128Darwin/*)
10129 _CUR_CFLAGS="${CFLAGS}"
10130 _CUR_LDFLAGS="${LDFLAGS}"
10131 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10132 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10133 ;;
10134esac
10135
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10137$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010138if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010140else
10141 ac_check_lib_save_LIBS=$LIBS
10142LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010144/* end confdefs.h. */
10145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146/* Override any GCC internal prototype to avoid an error.
10147 Use char because int might match the return type of a GCC
10148 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010149#ifdef __cplusplus
10150extern "C"
10151#endif
10152char inflateCopy ();
10153int
10154main ()
10155{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010157 ;
10158 return 0;
10159}
10160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010161if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010162 ac_cv_lib_z_inflateCopy=yes
10163else
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166rm -f core conftest.err conftest.$ac_objext \
10167 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010168LIBS=$ac_check_lib_save_LIBS
10169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10171$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010172if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010173
Matthias Kloseb9621712010-04-24 17:59:49 +000010174$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010175
10176fi
10177
10178
10179case $ac_sys_system/$ac_sys_release in
10180Darwin/*)
10181 CFLAGS="${_CUR_CFLAGS}"
10182 LDFLAGS="${_CUR_LDFLAGS}"
10183 ;;
10184esac
10185
Matthias Kloseb9621712010-04-24 17:59:49 +000010186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10187$as_echo_n "checking for hstrerror... " >&6; }
10188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010189/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010190
Martin v. Löwise9416172003-05-03 10:12:45 +000010191#include <netdb.h>
10192
Martin v. Löwise9416172003-05-03 10:12:45 +000010193int
10194main ()
10195{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010196void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010197 ;
10198 return 0;
10199}
10200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010202
Matthias Kloseb9621712010-04-24 17:59:49 +000010203$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010204
Matthias Kloseb159a552010-04-25 21:00:44 +000010205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010206$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010207else
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10209$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010210
10211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010212rm -f core conftest.err conftest.$ac_objext \
10213 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214
Matthias Kloseb9621712010-04-24 17:59:49 +000010215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10216$as_echo_n "checking for inet_aton... " >&6; }
10217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010218/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010219
Martin v. Löwis86d66262006-02-17 08:40:11 +000010220#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010221#include <sys/socket.h>
10222#include <netinet/in.h>
10223#include <arpa/inet.h>
10224
Martin v. Löwise9416172003-05-03 10:12:45 +000010225int
10226main ()
10227{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010228void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010229 ;
10230 return 0;
10231}
10232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010234
Matthias Kloseb9621712010-04-24 17:59:49 +000010235$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010236
Matthias Kloseb159a552010-04-25 21:00:44 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010238$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010239else
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010242
10243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010244rm -f core conftest.err conftest.$ac_objext \
10245 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246
Matthias Kloseb9621712010-04-24 17:59:49 +000010247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10248$as_echo_n "checking for inet_pton... " >&6; }
10249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010250/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010251
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010252#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010253#include <sys/socket.h>
10254#include <netinet/in.h>
10255#include <arpa/inet.h>
10256
Martin v. Löwise9416172003-05-03 10:12:45 +000010257int
10258main ()
10259{
10260void* p = inet_pton
10261 ;
10262 return 0;
10263}
10264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010266
Matthias Kloseb9621712010-04-24 17:59:49 +000010267$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010268
Matthias Kloseb159a552010-04-25 21:00:44 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010270$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010271else
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010274
10275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010277
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010278# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10280$as_echo_n "checking for setgroups... " >&6; }
10281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010282/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010283
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010284#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010285#ifdef HAVE_GRP_H
10286#include <grp.h>
10287#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010288
Martin v. Löwisd5843682002-11-21 20:41:28 +000010289int
10290main ()
10291{
10292void* p = setgroups
10293 ;
10294 return 0;
10295}
10296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010298
Matthias Kloseb9621712010-04-24 17:59:49 +000010299$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010300
Matthias Kloseb159a552010-04-25 21:00:44 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010302$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010303else
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10305$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010306
10307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010309
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010310# check for openpty and forkpty
10311
10312for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010313do :
10314 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010315if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010318_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010319
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010320else
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10322$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010323if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010325else
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010327LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010331/* Override any GCC internal prototype to avoid an error.
10332 Use char because int might match the return type of a GCC
10333 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334#ifdef __cplusplus
10335extern "C"
10336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010337char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010338int
10339main ()
10340{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ;
10343 return 0;
10344}
10345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010348else
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010351rm -f core conftest.err conftest.$ac_objext \
10352 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010353LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10356$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010357if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010359 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010360else
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10362$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010363if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010365else
10366 ac_check_lib_save_LIBS=$LIBS
10367LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010369/* end confdefs.h. */
10370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010371/* Override any GCC internal prototype to avoid an error.
10372 Use char because int might match the return type of a GCC
10373 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010374#ifdef __cplusplus
10375extern "C"
10376#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010377char openpty ();
10378int
10379main ()
10380{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010381return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010382 ;
10383 return 0;
10384}
10385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010386if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010387 ac_cv_lib_bsd_openpty=yes
10388else
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010391rm -f core conftest.err conftest.$ac_objext \
10392 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010393LIBS=$ac_check_lib_save_LIBS
10394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10396$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010397if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010399 LIBS="$LIBS -lbsd"
10400fi
10401
10402
10403fi
10404
Fred Drake8cef4cf2000-06-28 16:40:38 +000010405
10406fi
10407done
10408
10409for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010410do :
10411 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010412if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010415_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010416
Fred Drake8cef4cf2000-06-28 16:40:38 +000010417else
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10419$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010420if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010422else
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010424LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428/* Override any GCC internal prototype to avoid an error.
10429 Use char because int might match the return type of a GCC
10430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010431#ifdef __cplusplus
10432extern "C"
10433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010434char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010435int
10436main ()
10437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010448rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010450LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10453$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010454if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010456 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010457else
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10459$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010460if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010461 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010462else
10463 ac_check_lib_save_LIBS=$LIBS
10464LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010466/* end confdefs.h. */
10467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468/* Override any GCC internal prototype to avoid an error.
10469 Use char because int might match the return type of a GCC
10470 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010471#ifdef __cplusplus
10472extern "C"
10473#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010474char forkpty ();
10475int
10476main ()
10477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010479 ;
10480 return 0;
10481}
10482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010484 ac_cv_lib_bsd_forkpty=yes
10485else
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010488rm -f core conftest.err conftest.$ac_objext \
10489 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010490LIBS=$ac_check_lib_save_LIBS
10491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10493$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010494if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010495 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010496 LIBS="$LIBS -lbsd"
10497fi
10498
10499
10500fi
10501
Fred Drake8cef4cf2000-06-28 16:40:38 +000010502
10503fi
10504done
10505
Jack Jansendd19cf82001-12-06 22:36:17 +000010506
Christian Heimesb186d002008-03-18 15:15:01 +000010507# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010508for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010509do :
10510 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010511if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010512 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010513#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010514_ACEOF
10515
10516fi
10517done
10518
10519
Michael W. Hudson54241132001-12-07 15:38:26 +000010520# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010521for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010522do :
10523 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10524ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010525if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010527#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010528_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010529
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010530fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010531done
10532
Michael W. Hudson54241132001-12-07 15:38:26 +000010533
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010534ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010535if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010536 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010537
Martin v. Löwis1142de32002-03-29 16:28:31 +000010538else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010540 *" dup2.$ac_objext "* ) ;;
10541 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010543esac
10544
Martin v. Löwis1142de32002-03-29 16:28:31 +000010545fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010546
10547ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010548if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010549 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10550
10551else
10552 case " $LIBOBJS " in
10553 *" getcwd.$ac_objext "* ) ;;
10554 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10555 ;;
10556esac
10557
10558fi
10559
10560ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010561if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010562 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10563
10564else
10565 case " $LIBOBJS " in
10566 *" strdup.$ac_objext "* ) ;;
10567 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10568 ;;
10569esac
10570
10571fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010572
10573
10574for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010575do :
10576 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010577if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010582/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010583#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010584int
10585main ()
10586{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010587getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 ;
10589 return 0;
10590}
10591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010595
Guido van Rossum627b2d71993-12-24 10:39:16 +000010596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010598
Guido van Rossum627b2d71993-12-24 10:39:16 +000010599fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010600done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010601
Jack Jansen150753c2003-03-29 22:07:47 +000010602for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010603do :
10604 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010605if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010606 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010607#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010610/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010611#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010612int
10613main ()
10614{
10615setpgrp(0,0);
10616 ;
10617 return 0;
10618}
10619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010621
Matthias Kloseb9621712010-04-24 17:59:49 +000010622$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010623
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010626
10627fi
10628done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010629
Thomas Wouters3a584202000-08-05 23:28:51 +000010630for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010631do :
10632 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010633if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010635#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010638/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010639#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010640int
10641main ()
10642{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010643gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 ;
10645 return 0;
10646}
10647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010648if ac_fn_c_try_compile "$LINENO"; then :
10649
Guido van Rossum627b2d71993-12-24 10:39:16 +000010650else
Skip Montanaro6dead952003-09-25 14:50:04 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010653
Martin v. Löwis11437992002-04-12 09:54:03 +000010654
Guido van Rossum627b2d71993-12-24 10:39:16 +000010655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010658fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010659done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660
Michael W. Hudson54241132001-12-07 15:38:26 +000010661
Matthias Kloseb9621712010-04-24 17:59:49 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10663$as_echo_n "checking for major... " >&6; }
10664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010666
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010667#if defined(MAJOR_IN_MKDEV)
10668#include <sys/mkdev.h>
10669#elif defined(MAJOR_IN_SYSMACROS)
10670#include <sys/sysmacros.h>
10671#else
10672#include <sys/types.h>
10673#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010674
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010675int
10676main ()
10677{
10678
10679 makedev(major(0),minor(0));
10680
10681 ;
10682 return 0;
10683}
10684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010686
10687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10691$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010692
10693else
Skip Montanaro6dead952003-09-25 14:50:04 +000010694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10696$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010697
10698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010699rm -f core conftest.err conftest.$ac_objext \
10700 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010701
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010702# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010703# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10705$as_echo_n "checking for getaddrinfo... " >&6; }
10706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010707/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010708
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010709#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010710#include <sys/socket.h>
10711#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010712#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010713
Martin v. Löwis11437992002-04-12 09:54:03 +000010714int
10715main ()
10716{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010717getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ;
10719 return 0;
10720}
10721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010723 have_getaddrinfo=yes
10724else
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010727rm -f core conftest.err conftest.$ac_objext \
10728 conftest$ac_exeext conftest.$ac_ext
10729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10730$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010731if test $have_getaddrinfo = yes
10732then
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10734$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010735 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010737else
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010739 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010740else
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010743
10744#include <sys/types.h>
10745#include <netdb.h>
10746#include <string.h>
10747#include <sys/socket.h>
10748#include <netinet/in.h>
10749
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010750int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010751{
10752 int passive, gaierr, inet4 = 0, inet6 = 0;
10753 struct addrinfo hints, *ai, *aitop;
10754 char straddr[INET6_ADDRSTRLEN], strport[16];
10755
10756 for (passive = 0; passive <= 1; passive++) {
10757 memset(&hints, 0, sizeof(hints));
10758 hints.ai_family = AF_UNSPEC;
10759 hints.ai_flags = passive ? AI_PASSIVE : 0;
10760 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010761 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010762 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10763 (void)gai_strerror(gaierr);
10764 goto bad;
10765 }
10766 for (ai = aitop; ai; ai = ai->ai_next) {
10767 if (ai->ai_addr == NULL ||
10768 ai->ai_addrlen == 0 ||
10769 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10770 straddr, sizeof(straddr), strport, sizeof(strport),
10771 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10772 goto bad;
10773 }
10774 switch (ai->ai_family) {
10775 case AF_INET:
10776 if (strcmp(strport, "54321") != 0) {
10777 goto bad;
10778 }
10779 if (passive) {
10780 if (strcmp(straddr, "0.0.0.0") != 0) {
10781 goto bad;
10782 }
10783 } else {
10784 if (strcmp(straddr, "127.0.0.1") != 0) {
10785 goto bad;
10786 }
10787 }
10788 inet4++;
10789 break;
10790 case AF_INET6:
10791 if (strcmp(strport, "54321") != 0) {
10792 goto bad;
10793 }
10794 if (passive) {
10795 if (strcmp(straddr, "::") != 0) {
10796 goto bad;
10797 }
10798 } else {
10799 if (strcmp(straddr, "::1") != 0) {
10800 goto bad;
10801 }
10802 }
10803 inet6++;
10804 break;
10805 case AF_UNSPEC:
10806 goto bad;
10807 break;
10808 default:
10809 /* another family support? */
10810 break;
10811 }
10812 }
10813 }
10814
10815 if (!(inet4 == 0 || inet4 == 2))
10816 goto bad;
10817 if (!(inet6 == 0 || inet6 == 2))
10818 goto bad;
10819
10820 if (aitop)
10821 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010822 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010823
10824 bad:
10825 if (aitop)
10826 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010827 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010828}
10829
Martin v. Löwis11437992002-04-12 09:54:03 +000010830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010831if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010832 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010833else
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010840fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010841
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010843
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10845$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10846
Mark Dickinson2df5d282009-12-31 21:22:50 +000010847if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010848then
10849 if test $ipv6 = yes
10850 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010851 echo 'Fatal: You must get working getaddrinfo() function.'
10852 echo ' or you can specify "--disable-ipv6"'.
10853 exit 1
10854 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010855else
Martin v. Löwis11437992002-04-12 09:54:03 +000010856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010858
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010859fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010860
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010861for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010862do :
10863 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010864if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010865 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010866#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010867_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010868
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010869fi
10870done
10871
Michael W. Hudson54241132001-12-07 15:38:26 +000010872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010873# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10875$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010876if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878else
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010881#include <sys/types.h>
10882#include <sys/time.h>
10883#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010884
Martin v. Löwis11437992002-04-12 09:54:03 +000010885int
10886main ()
10887{
10888if ((struct tm *) 0)
10889return 0;
10890 ;
10891 return 0;
10892}
10893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010894if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010895 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010896else
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10902$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010903if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010904
Matthias Kloseb9621712010-04-24 17:59:49 +000010905$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010906
10907fi
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10910$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010911if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010913else
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010916#include <sys/types.h>
10917#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010918
Martin v. Löwis11437992002-04-12 09:54:03 +000010919int
10920main ()
10921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010922struct tm tm;
10923 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010925 ;
10926 return 0;
10927}
10928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010929if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010930 ac_cv_struct_tm=time.h
10931else
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10937$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010938if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010941
10942fi
10943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944ac_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 +000010945#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947"
Gregory P. Smith69140482012-01-16 02:05:55 -080010948if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
10950cat >>confdefs.h <<_ACEOF
10951#define HAVE_STRUCT_TM_TM_ZONE 1
10952_ACEOF
10953
10954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010955fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010956
Martin v. Löwis11437992002-04-12 09:54:03 +000010957if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010960
10961else
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10963"
Gregory P. Smith69140482012-01-16 02:05:55 -080010964if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966else
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010968fi
10969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010971#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972_ACEOF
10973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10975$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010976if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978else
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010981#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982#if !HAVE_DECL_TZNAME
10983extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010985
Martin v. Löwis11437992002-04-12 09:54:03 +000010986int
10987main ()
10988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 ;
10991 return 0;
10992}
10993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010995 ac_cv_var_tzname=yes
10996else
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010999rm -f core conftest.err conftest.$ac_objext \
11000 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11003$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011004 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011007
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011008 fi
11009fi
11010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011ac_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 -080011012if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011013
11014cat >>confdefs.h <<_ACEOF
11015#define HAVE_STRUCT_STAT_ST_RDEV 1
11016_ACEOF
11017
11018
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011019fi
11020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021ac_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 -080011022if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011023
Martin v. Löwis11437992002-04-12 09:54:03 +000011024cat >>confdefs.h <<_ACEOF
11025#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11026_ACEOF
11027
11028
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011029fi
11030
Matthias Kloseb9621712010-04-24 17:59:49 +000011031ac_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 -080011032if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011033
11034cat >>confdefs.h <<_ACEOF
11035#define HAVE_STRUCT_STAT_ST_FLAGS 1
11036_ACEOF
11037
11038
11039fi
11040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041ac_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 -080011042if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011043
11044cat >>confdefs.h <<_ACEOF
11045#define HAVE_STRUCT_STAT_ST_GEN 1
11046_ACEOF
11047
11048
11049fi
11050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051ac_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 -080011052if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011053
11054cat >>confdefs.h <<_ACEOF
11055#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11056_ACEOF
11057
11058
11059fi
11060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061ac_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 -080011062if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011063
Martin v. Löwis11437992002-04-12 09:54:03 +000011064cat >>confdefs.h <<_ACEOF
11065#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11066_ACEOF
11067
11068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011070
11071else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011072 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011073 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011074 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11075 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011076esac
11077
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011078fi
11079
Michael W. Hudson54241132001-12-07 15:38:26 +000011080
Martin v. Löwis11437992002-04-12 09:54:03 +000011081
Matthias Kloseb9621712010-04-24 17:59:49 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11083$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011084if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011086else
Matthias Kloseb159a552010-04-25 21:00:44 +000011087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011089/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011090#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011091int
11092main ()
11093{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011095 ;
11096 return 0;
11097}
11098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011099if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011100 ac_cv_header_time_altzone=yes
11101else
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011106fi
11107
Matthias Kloseb9621712010-04-24 17:59:49 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11109$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011110if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
Matthias Kloseb9621712010-04-24 17:59:49 +000011112$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011113
11114fi
11115
Guido van Rossumda88dad1995-01-26 00:46:29 +000011116was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11118$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011121
11122#include <sys/types.h>
11123#include <sys/select.h>
11124#include <sys/time.h>
11125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126int
11127main ()
11128{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011129;
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 ;
11131 return 0;
11132}
11133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011135
11136
Matthias Kloseb9621712010-04-24 17:59:49 +000011137$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011138
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011139 was_it_defined=yes
11140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11144$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145
Matthias Kloseb9621712010-04-24 17:59:49 +000011146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11147$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011148if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011150else
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011152/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011153#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011154int
11155main ()
11156{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011157struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ;
11159 return 0;
11160}
11161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011163 ac_cv_struct_addrinfo=yes
11164else
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11168fi
11169
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11171$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011172if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011175
11176fi
11177
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11179$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011180if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011182else
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011185
11186# include <sys/types.h>
11187# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011188int
11189main ()
11190{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011191struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 ;
11193 return 0;
11194}
11195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011197 ac_cv_struct_sockaddr_storage=yes
11198else
Matthias Kloseb9621712010-04-24 17:59:49 +000011199 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11202fi
11203
Matthias Kloseb9621712010-04-24 17:59:49 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11205$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011206if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011207
Matthias Kloseb9621712010-04-24 17:59:49 +000011208$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011209
11210fi
11211
Guido van Rossum627b2d71993-12-24 10:39:16 +000011212# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011213
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11215$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011216if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011218else
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011221$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011222int
11223main ()
11224{
11225static int test_array [1 - 2 * !(((char) -1) < 0)];
11226test_array [0] = 0
11227
11228 ;
11229 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011230}
Martin v. Löwis11437992002-04-12 09:54:03 +000011231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011232if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011233 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011234else
Matthias Kloseb9621712010-04-24 17:59:49 +000011235 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11240$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243
11244fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011245
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11247$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011248if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011249 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011250else
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011252/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011253
Martin v. Löwis11437992002-04-12 09:54:03 +000011254int
11255main ()
11256{
11257/* FIXME: Include the comments suggested by Paul. */
11258#ifndef __cplusplus
11259 /* Ultrix mips cc rejects this. */
11260 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011261 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263 char const *const *pcpcc;
11264 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 /* NEC SVR4.0.2 mips cc rejects this. */
11266 struct point {int x, y;};
11267 static struct point const zero = {0,0};
11268 /* AIX XL C 1.02.0.0 rejects this.
11269 It does not let you subtract one const X* pointer from another in
11270 an arm of an if-expression whose if-part is not a constant
11271 expression */
11272 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011273 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275 ++pcpcc;
11276 ppc = (char**) pcpcc;
11277 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 { /* SCO 3.2v4 cc rejects this. */
11279 char *t;
11280 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011281
Martin v. Löwis11437992002-04-12 09:54:03 +000011282 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011283 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 }
11285 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11286 int x[] = {25, 17};
11287 const int *foo = &x[0];
11288 ++foo;
11289 }
11290 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11291 typedef const int *iptr;
11292 iptr p = 0;
11293 ++p;
11294 }
11295 { /* AIX XL C 1.02.0.0 rejects this saying
11296 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11297 struct s { int j; const int *ap[3]; };
11298 struct s *b; b->j = 5;
11299 }
11300 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11301 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011305#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 ;
11308 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011309}
Martin v. Löwis11437992002-04-12 09:54:03 +000011310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011311if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312 ac_cv_c_const=yes
11313else
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11319$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011320if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011323
11324fi
11325
Michael W. Hudson54241132001-12-07 15:38:26 +000011326
Guido van Rossumda88dad1995-01-26 00:46:29 +000011327works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11329$as_echo_n "checking for working volatile... " >&6; }
11330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011336volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 ;
11338 return 0;
11339}
11340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011341if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011342 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011343else
Skip Montanaro6dead952003-09-25 14:50:04 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011346
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011347
Guido van Rossum627b2d71993-12-24 10:39:16 +000011348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11351$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011352
Guido van Rossumda88dad1995-01-26 00:46:29 +000011353works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11355$as_echo_n "checking for working signed char... " >&6; }
11356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011357/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011358
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011362signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 ;
11364 return 0;
11365}
11366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011367if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011368 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011369else
Skip Montanaro6dead952003-09-25 14:50:04 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011372
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011373
Guido van Rossum7f43da71994-08-01 12:15:30 +000011374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11377$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011378
Guido van Rossumda88dad1995-01-26 00:46:29 +000011379have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11381$as_echo_n "checking for prototypes... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011384int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011385int
11386main ()
11387{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Matthias Kloseb159a552010-04-25 21:00:44 +000011397 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11401$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011402
Guido van Rossumda88dad1995-01-26 00:46:29 +000011403works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11405$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011407/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011408
11409#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011410int foo(int x, ...) {
11411 va_list va;
11412 va_start(va, x);
11413 va_arg(va, int);
11414 va_arg(va, char *);
11415 va_arg(va, double);
11416 return 0;
11417}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011418
Martin v. Löwis11437992002-04-12 09:54:03 +000011419int
11420main ()
11421{
Guido van Rossum90eea071996-08-30 20:58:57 +000011422return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 ;
11424 return 0;
11425}
11426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
11429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011431
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011432 works=yes
11433
Guido van Rossum627b2d71993-12-24 10:39:16 +000011434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11437$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438
Martin v. Löwisd6320502004-08-12 13:45:08 +000011439# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11441$as_echo_n "checking for socketpair... " >&6; }
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011443/* end confdefs.h. */
11444
11445#include <sys/types.h>
11446#include <sys/socket.h>
11447
11448int
11449main ()
11450{
11451void *x=socketpair
11452 ;
11453 return 0;
11454}
11455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011459
Matthias Kloseb159a552010-04-25 21:00:44 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011462else
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011465
11466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011468
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011469# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11471$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011473/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011474#include <sys/types.h>
11475#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011476int
11477main ()
11478{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011479struct sockaddr x;
11480x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_compile "$LINENO"; then :
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11487$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011488
Matthias Kloseb9621712010-04-24 17:59:49 +000011489$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011490
11491else
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011494
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011497
Guido van Rossumda88dad1995-01-26 00:46:29 +000011498va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11500$as_echo_n "checking whether va_list is an array... " >&6; }
11501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011502/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011503
11504#ifdef HAVE_STDARG_PROTOTYPES
11505#include <stdarg.h>
11506#else
11507#include <varargs.h>
11508#endif
11509
Martin v. Löwis11437992002-04-12 09:54:03 +000011510int
11511main ()
11512{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011513va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_compile "$LINENO"; then :
11519
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011520else
Skip Montanaro6dead952003-09-25 14:50:04 +000011521
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Guido van Rossumda88dad1995-01-26 00:46:29 +000011525 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011526
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11530$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011531
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011532# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011533
11534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011536if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011537
Matthias Kloseb9621712010-04-24 17:59:49 +000011538 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11541$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011542 OLD_CFLAGS=$CFLAGS
11543 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011545/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011546
11547# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549int
11550main ()
11551{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011552
11553 char *name;
11554 struct hostent *he, *res;
11555 char buffer[2048];
11556 int buflen = 2048;
11557 int h_errnop;
11558
11559 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011560
11561 ;
11562 return 0;
11563}
11564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011568
Martin v. Löwis11437992002-04-12 09:54:03 +000011569
Matthias Kloseb9621712010-04-24 17:59:49 +000011570$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11573$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011574
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011575else
Skip Montanaro6dead952003-09-25 14:50:04 +000011576
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11578$as_echo "no" >&6; }
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11580$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011582/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011583
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011584# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
Martin v. Löwis11437992002-04-12 09:54:03 +000011586int
11587main ()
11588{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011589
11590 char *name;
11591 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011592 char buffer[2048];
11593 int buflen = 2048;
11594 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011595
Matthias Kloseb159a552010-04-25 21:00:44 +000011596 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011597
11598 ;
11599 return 0;
11600}
11601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011602if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011605
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Matthias Kloseb159a552010-04-25 21:00:44 +000011607$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11610$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011612else
Skip Montanaro6dead952003-09-25 14:50:04 +000011613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11615$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11617$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11619/* end confdefs.h. */
11620
11621# include <netdb.h>
11622
11623int
11624main ()
11625{
11626
11627 char *name;
11628 struct hostent *he;
11629 struct hostent_data data;
11630
11631 (void) gethostbyname_r(name, he, &data);
11632
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637if ac_fn_c_try_compile "$LINENO"; then :
11638
11639 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11640
11641
11642$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11643
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11645$as_echo "yes" >&6; }
11646
11647else
11648
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000011657
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011660 CFLAGS=$OLD_CFLAGS
11661
11662else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 for ac_func in gethostbyname
11665do :
11666 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011667if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011669#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011670_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011671
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011672fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011673done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011674
Michael W. Hudson54241132001-12-07 15:38:26 +000011675
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011676fi
11677
Michael W. Hudson54241132001-12-07 15:38:26 +000011678
11679
11680
11681
11682
11683
Guido van Rossum627b2d71993-12-24 10:39:16 +000011684# checks for system services
11685# (none yet)
11686
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011687# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011688ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011689if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011690
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011691else
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11693$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011694if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011696else
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011698LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011702/* Override any GCC internal prototype to avoid an error.
11703 Use char because int might match the return type of a GCC
11704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011705#ifdef __cplusplus
11706extern "C"
11707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011708char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011709int
11710main ()
11711{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011713 ;
11714 return 0;
11715}
11716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011718 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011722rm -f core conftest.err conftest.$ac_objext \
11723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011724LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11727$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011728if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 cat >>confdefs.h <<_ACEOF
11730#define HAVE_LIBIEEE 1
11731_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011733 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734
Guido van Rossum627b2d71993-12-24 10:39:16 +000011735fi
11736
Michael W. Hudson54241132001-12-07 15:38:26 +000011737
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011738fi
11739
Michael W. Hudson54241132001-12-07 15:38:26 +000011740
Guido van Rossum7f253911997-05-09 02:42:48 +000011741# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11743$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011748if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011749then
11750
Matthias Kloseb9621712010-04-24 17:59:49 +000011751$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011752
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11754$as_echo "yes" >&6; }
11755else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11756$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011757fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11760$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011761fi
11762
Guido van Rossum7f253911997-05-09 02:42:48 +000011763
Guido van Rossum7f43da71994-08-01 12:15:30 +000011764# check for --with-libm=...
11765
Guido van Rossum563e7081996-09-10 18:20:48 +000011766case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011767Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011768*) LIBM=-lm
11769esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11771$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011773# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011774if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011776if test "$withval" = no
11777then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11779$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011780elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011781then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11783$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011784else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011785fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11788$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011789fi
11790
Guido van Rossum7f43da71994-08-01 12:15:30 +000011791
11792# check for --with-libc=...
11793
Matthias Kloseb9621712010-04-24 17:59:49 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11795$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011797# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011798if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011800if test "$withval" = no
11801then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11803$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011804elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011805then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11807$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011808else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011809fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11812$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011813fi
11814
Guido van Rossum7f43da71994-08-01 12:15:30 +000011815
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011816# **************************************************
11817# * Check for various properties of floating point *
11818# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11821$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011822if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011824else
11825
Matthias Kloseb9621712010-04-24 17:59:49 +000011826if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011827 ac_cv_little_endian_double=no
11828else
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830/* end confdefs.h. */
11831
11832#include <string.h>
11833int main() {
11834 double x = 9006104071832581.0;
11835 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11836 return 0;
11837 else
11838 return 1;
11839}
11840
11841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011842if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011843 ac_cv_little_endian_double=yes
11844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011849fi
11850
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011851fi
11852
Matthias Kloseb9621712010-04-24 17:59:49 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11854$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011855if test "$ac_cv_little_endian_double" = yes
11856then
11857
Matthias Kloseb9621712010-04-24 17:59:49 +000011858$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011859
11860fi
11861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11863$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011864if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011865 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011866else
11867
Matthias Kloseb9621712010-04-24 17:59:49 +000011868if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011869 ac_cv_big_endian_double=no
11870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011872/* end confdefs.h. */
11873
11874#include <string.h>
11875int main() {
11876 double x = 9006104071832581.0;
11877 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11878 return 0;
11879 else
11880 return 1;
11881}
11882
11883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011885 ac_cv_big_endian_double=yes
11886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011891fi
11892
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011893fi
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11896$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011897if test "$ac_cv_big_endian_double" = yes
11898then
11899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011901
11902fi
11903
11904# Some ARM platforms use a mixed-endian representation for doubles.
11905# While Python doesn't currently have full support for these platforms
11906# (see e.g., issue 1762561), we can at least make sure that float <-> string
11907# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11909$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011910if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011912else
11913
Matthias Kloseb9621712010-04-24 17:59:49 +000011914if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011915 ac_cv_mixed_endian_double=no
11916else
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011918/* end confdefs.h. */
11919
11920#include <string.h>
11921int main() {
11922 double x = 9006104071832581.0;
11923 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11924 return 0;
11925 else
11926 return 1;
11927}
11928
11929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011930if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011931 ac_cv_mixed_endian_double=yes
11932else
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011937fi
11938
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011939fi
11940
Matthias Kloseb9621712010-04-24 17:59:49 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11942$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011943if test "$ac_cv_mixed_endian_double" = yes
11944then
11945
Matthias Kloseb9621712010-04-24 17:59:49 +000011946$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011947
11948fi
11949
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011950# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011951# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011952# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011953# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011954# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011955# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011956
11957# This inline assembler syntax may also work for suncc and icc,
11958# so we try it on all platforms.
11959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11961$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011963/* end confdefs.h. */
11964
11965int
11966main ()
11967{
11968
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011969 unsigned short cw;
11970 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11971 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011972
11973 ;
11974 return 0;
11975}
11976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011977if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011978 have_gcc_asm_for_x87=yes
11979else
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011981fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11984$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011985if test "$have_gcc_asm_for_x87" = yes
11986then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011989
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011991
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011992# Detect whether system arithmetic is subject to x87-style double
11993# rounding issues. The result of this test has little meaning on non
11994# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11995# mode is round-to-nearest and double rounding issues are present, and
11996# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11998$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011999# $BASECFLAGS may affect the result
12000ac_save_cc="$CC"
12001CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012003 ac_cv_x87_double_rounding=no
12004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012006/* end confdefs.h. */
12007
12008#include <stdlib.h>
12009#include <math.h>
12010int main() {
12011 volatile double x, y, z;
12012 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12013 x = 0.99999999999999989; /* 1-2**-53 */
12014 y = 1./x;
12015 if (y != 1.)
12016 exit(0);
12017 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12018 x = 1e16;
12019 y = 2.99999;
12020 z = x + y;
12021 if (z != 1e16+4.)
12022 exit(0);
12023 /* both tests show evidence of double rounding */
12024 exit(1);
12025}
12026
12027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012029 ac_cv_x87_double_rounding=no
12030else
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12034 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012035fi
12036
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012037CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12039$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012040if test "$ac_cv_x87_double_rounding" = yes
12041then
12042
Matthias Kloseb9621712010-04-24 17:59:49 +000012043$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012044
12045fi
12046
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012047# ************************************
12048# * Check for mathematical functions *
12049# ************************************
12050
12051LIBS_SAVE=$LIBS
12052LIBS="$LIBS $LIBM"
12053
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012054for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12055do :
12056 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12057ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012058if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012059 cat >>confdefs.h <<_ACEOF
12060#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12061_ACEOF
12062
12063fi
12064done
12065
12066for ac_func in hypot lgamma log1p round tgamma
12067do :
12068 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12069ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012070if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012071 cat >>confdefs.h <<_ACEOF
12072#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12073_ACEOF
12074
12075fi
12076done
12077
12078ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12079"
Gregory P. Smith69140482012-01-16 02:05:55 -080012080if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012081 ac_have_decl=1
12082else
12083 ac_have_decl=0
12084fi
12085
12086cat >>confdefs.h <<_ACEOF
12087#define HAVE_DECL_ISINF $ac_have_decl
12088_ACEOF
12089ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12090"
Gregory P. Smith69140482012-01-16 02:05:55 -080012091if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012092 ac_have_decl=1
12093else
12094 ac_have_decl=0
12095fi
12096
12097cat >>confdefs.h <<_ACEOF
12098#define HAVE_DECL_ISNAN $ac_have_decl
12099_ACEOF
12100ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12101"
Gregory P. Smith69140482012-01-16 02:05:55 -080012102if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012103 ac_have_decl=1
12104else
12105 ac_have_decl=0
12106fi
12107
12108cat >>confdefs.h <<_ACEOF
12109#define HAVE_DECL_ISFINITE $ac_have_decl
12110_ACEOF
12111
12112
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012113# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12114# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12116$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012117if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012119else
12120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012122 ac_cv_tanh_preserves_zero_sign=no
12123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012125/* end confdefs.h. */
12126
12127#include <math.h>
12128#include <stdlib.h>
12129int main() {
12130 /* return 0 if either negative zeros don't exist
12131 on this platform or if negative zeros exist
12132 and tanh(-0.) == -0. */
12133 if (atan2(0., -1.) == atan2(-0., -1.) ||
12134 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12135 else exit(1);
12136}
12137
12138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012139if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012140 ac_cv_tanh_preserves_zero_sign=yes
12141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012146fi
12147
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012148fi
12149
Matthias Kloseb9621712010-04-24 17:59:49 +000012150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12151$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012152if test "$ac_cv_tanh_preserves_zero_sign" = yes
12153then
12154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012156
12157fi
12158
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012159if test "$ac_cv_func_log1p" = yes
12160then
12161 # On some versions of AIX, log1p(-0.) returns 0. instead of
12162 # -0. See issue #9920.
12163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12164$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012165 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012166 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012167else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012168
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012169 if test "$cross_compiling" = yes; then :
12170 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012171else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012174
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012175 #include <math.h>
12176 #include <stdlib.h>
12177 int main() {
12178 /* Fail if the signs of log1p(-0.) and -0. can be
12179 distinguished. */
12180 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12181 return 0;
12182 else
12183 return 1;
12184 }
12185
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012186_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012187if ac_fn_c_try_run "$LINENO"; then :
12188 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012189else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012190 ac_cv_log1p_drops_zero_sign=yes
12191fi
12192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12193 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012194fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012195
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012196fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012197
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12199$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12200fi
12201if test "$ac_cv_log1p_drops_zero_sign" = yes
12202then
12203
12204$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12205
12206fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012207
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012208LIBS=$LIBS_SAVE
12209
Mark Dickinsona614f042009-11-28 12:48:43 +000012210# For multiprocessing module, check that sem_open
12211# actually works. For FreeBSD versions <= 7.2,
12212# the kernel module that provides POSIX semaphores
12213# isn't loaded by default, so an attempt to call
12214# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12216$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012217if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012219else
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012221 ac_cv_posix_semaphores_enabled=yes
12222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012224/* end confdefs.h. */
12225
12226#include <unistd.h>
12227#include <fcntl.h>
12228#include <stdio.h>
12229#include <semaphore.h>
12230#include <sys/stat.h>
12231
12232int main(void) {
12233 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12234 if (a == SEM_FAILED) {
12235 perror("sem_open");
12236 return 1;
12237 }
12238 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012239 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012240 return 0;
12241}
12242
12243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012245 ac_cv_posix_semaphores_enabled=yes
12246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12250 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012251fi
12252
12253
Mark Dickinsona614f042009-11-28 12:48:43 +000012254fi
12255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12257$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012258if test $ac_cv_posix_semaphores_enabled = no
12259then
12260
Matthias Kloseb9621712010-04-24 17:59:49 +000012261$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012262
12263fi
12264
Mark Dickinson10683072009-04-18 21:18:19 +000012265# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12267$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012268if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012270else
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012272 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012275/* end confdefs.h. */
12276
12277#include <unistd.h>
12278#include <fcntl.h>
12279#include <stdio.h>
12280#include <semaphore.h>
12281#include <sys/stat.h>
12282
12283int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012284 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012285 int count;
12286 int res;
12287 if(a==SEM_FAILED){
12288 perror("sem_open");
12289 return 1;
12290
12291 }
12292 res = sem_getvalue(a, &count);
12293 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012294 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012295 return res==-1 ? 1 : 0;
12296}
12297
Mark Dickinson10683072009-04-18 21:18:19 +000012298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012299if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012300 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012301else
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012306fi
12307
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012308
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012309fi
12310
Matthias Kloseb9621712010-04-24 17:59:49 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12312$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012313if test $ac_cv_broken_sem_getvalue = yes
12314then
12315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012317
12318fi
12319
Mark Dickinsonbd792642009-03-18 20:06:12 +000012320# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12322$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012323# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012325 enableval=$enable_big_digits; case $enable_big_digits in
12326yes)
12327 enable_big_digits=30 ;;
12328no)
12329 enable_big_digits=15 ;;
1233015|30)
12331 ;;
12332*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012333 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 +000012334esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12336$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012337
12338cat >>confdefs.h <<_ACEOF
12339#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12340_ACEOF
12341
12342
12343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12345$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012346fi
12347
12348
Guido van Rossumef2255b2000-03-10 22:30:29 +000012349# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012350ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012351if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
12353
Matthias Kloseb9621712010-04-24 17:59:49 +000012354$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012355
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012356 wchar_h="yes"
12357
Guido van Rossumef2255b2000-03-10 22:30:29 +000012358else
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012360
12361fi
12362
Michael W. Hudson54241132001-12-07 15:38:26 +000012363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012365# determine wchar_t size
12366if test "$wchar_h" = yes
12367then
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12370# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12371# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12373$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012374if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012376else
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12378"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
Martin v. Löwis11437992002-04-12 09:54:03 +000012380else
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 if test "$ac_cv_type_wchar_t" = yes; then
12382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012384as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012385See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386 else
12387 ac_cv_sizeof_wchar_t=0
12388 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012390
Martin v. Löwis11437992002-04-12 09:54:03 +000012391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12393$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394
12395
12396
Martin v. Löwis11437992002-04-12 09:54:03 +000012397cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012398#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012399_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012400
Michael W. Hudson54241132001-12-07 15:38:26 +000012401
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012402fi
12403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12405$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012406have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012408/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012409
12410#include <tcl.h>
12411#if TCL_UTF_MAX != 6
12412# error "NOT UCS4_TCL"
12413#endif
12414int
12415main ()
12416{
12417
12418 ;
12419 return 0;
12420}
12421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012423
12424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012426
12427 have_ucs4_tcl=yes
12428
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12432$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012433
Skip Montanaro6dead952003-09-25 14:50:04 +000012434# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012435if test "$wchar_h" = yes
12436then
12437 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12439$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012440 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012442else
12443
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012445 ac_cv_wchar_t_signed=yes
12446else
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012448/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012449
12450 #include <wchar.h>
12451 int main()
12452 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012453 /* Success: exit code 0 */
12454 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012455 }
12456
12457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012459 ac_cv_wchar_t_signed=yes
12460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12464 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012465fi
12466
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012467fi
12468
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12470$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471fi
12472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12474$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012475
12476# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012477if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012478 withval=$with_wide_unicode;
12479if test "$withval" != no
12480then unicode_size="4"
12481else unicode_size="2"
12482fi
12483
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012484else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485
Georg Brandl52d168a2008-01-07 18:10:24 +000012486case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012487 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012488 *) unicode_size="2" ;;
12489esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012490
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012491fi
12492
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012493
12494
Georg Brandl52d168a2008-01-07 18:10:24 +000012495case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012496 4)
12497 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12498
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012499 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012500 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012502 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012503esac
12504
Michael W. Hudson54241132001-12-07 15:38:26 +000012505
Martin v. Löwis11437992002-04-12 09:54:03 +000012506
Georg Brandl52d168a2008-01-07 18:10:24 +000012507# wchar_t is only usable if it maps to an unsigned type
12508if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012509 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012510then
12511 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012514
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012516
Georg Brandl52d168a2008-01-07 18:10:24 +000012517elif test "$ac_cv_sizeof_short" = "$unicode_size"
12518then
12519 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012521
Georg Brandl52d168a2008-01-07 18:10:24 +000012522elif test "$ac_cv_sizeof_long" = "$unicode_size"
12523then
12524 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012526
Georg Brandl52d168a2008-01-07 18:10:24 +000012527else
12528 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12531$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012532
12533# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12535$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012536if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012538else
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 ac_cv_c_bigendian=unknown
12540 # See if we're dealing with a universal compiler.
12541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12542/* end confdefs.h. */
12543#ifndef __APPLE_CC__
12544 not a universal capable compiler
12545 #endif
12546 typedef int dummy;
12547
Skip Montanaro6dead952003-09-25 14:50:04 +000012548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_compile "$LINENO"; then :
12550
12551 # Check for potential -arch flags. It is not universal unless
12552 # there are at least two -arch flags with different values.
12553 ac_arch=
12554 ac_prev=
12555 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12556 if test -n "$ac_prev"; then
12557 case $ac_word in
12558 i?86 | x86_64 | ppc | ppc64)
12559 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12560 ac_arch=$ac_word
12561 else
12562 ac_cv_c_bigendian=universal
12563 break
12564 fi
12565 ;;
12566 esac
12567 ac_prev=
12568 elif test "x$ac_word" = "x-arch"; then
12569 ac_prev=arch
12570 fi
12571 done
12572fi
12573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12574 if test $ac_cv_c_bigendian = unknown; then
12575 # See if sys/param.h defines the BYTE_ORDER macro.
12576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012578#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012580
Martin v. Löwis11437992002-04-12 09:54:03 +000012581int
12582main ()
12583{
Matthias Kloseb9621712010-04-24 17:59:49 +000012584#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12585 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12586 && LITTLE_ENDIAN)
12587 bogus endian macros
12588 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012589
12590 ;
12591 return 0;
12592}
12593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012594if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012595 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012597/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012598#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012600
Martin v. Löwis11437992002-04-12 09:54:03 +000012601int
12602main ()
12603{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012604#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 not big endian
12606 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
12608 ;
12609 return 0;
12610}
12611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012612if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012613 ac_cv_c_bigendian=yes
12614else
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012618fi
12619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12620 fi
12621 if test $ac_cv_c_bigendian = unknown; then
12622 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012625#include <limits.h>
12626
Martin v. Löwis11437992002-04-12 09:54:03 +000012627int
12628main ()
12629{
Matthias Kloseb9621712010-04-24 17:59:49 +000012630#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12631 bogus endian macros
12632 #endif
12633
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ;
12635 return 0;
12636}
12637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012638if ac_fn_c_try_compile "$LINENO"; then :
12639 # It does; now see whether it defined to _BIG_ENDIAN or not.
12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12641/* end confdefs.h. */
12642#include <limits.h>
12643
12644int
12645main ()
12646{
12647#ifndef _BIG_ENDIAN
12648 not big endian
12649 #endif
12650
12651 ;
12652 return 0;
12653}
12654_ACEOF
12655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012657else
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12661fi
12662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12663 fi
12664 if test $ac_cv_c_bigendian = unknown; then
12665 # Compile a test program.
12666 if test "$cross_compiling" = yes; then :
12667 # Try to guess by grepping values from an object file.
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669/* end confdefs.h. */
12670short int ascii_mm[] =
12671 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12672 short int ascii_ii[] =
12673 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12674 int use_ascii (int i) {
12675 return ascii_mm[i] + ascii_ii[i];
12676 }
12677 short int ebcdic_ii[] =
12678 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12679 short int ebcdic_mm[] =
12680 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12681 int use_ebcdic (int i) {
12682 return ebcdic_mm[i] + ebcdic_ii[i];
12683 }
12684 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685
Matthias Kloseb9621712010-04-24 17:59:49 +000012686int
12687main ()
12688{
12689return use_ascii (foo) == use_ebcdic (foo);
12690 ;
12691 return 0;
12692}
12693_ACEOF
12694if ac_fn_c_try_compile "$LINENO"; then :
12695 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12696 ac_cv_c_bigendian=yes
12697 fi
12698 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12699 if test "$ac_cv_c_bigendian" = unknown; then
12700 ac_cv_c_bigendian=no
12701 else
12702 # finding both strings is unlikely to happen, but who knows?
12703 ac_cv_c_bigendian=unknown
12704 fi
12705 fi
12706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012712int
12713main ()
12714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 /* Are we little or big endian? From Harbison&Steele. */
12717 union
12718 {
12719 long int l;
12720 char c[sizeof (long int)];
12721 } u;
12722 u.l = 1;
12723 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724
12725 ;
12726 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012727}
Martin v. Löwis11437992002-04-12 09:54:03 +000012728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012729if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012730 ac_cv_c_bigendian=no
12731else
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12741$as_echo "$ac_cv_c_bigendian" >&6; }
12742 case $ac_cv_c_bigendian in #(
12743 yes)
12744 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12745;; #(
12746 no)
12747 ;; #(
12748 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 ;; #(
12753 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012754 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012755 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012757
Michael W. Hudson54241132001-12-07 15:38:26 +000012758
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012759# ABI version string for Python extension modules. This appears between the
12760# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12761# from the following attributes which affect the ABI of this Python build (in
12762# this order):
12763#
12764# * The Python implementation (always 'cpython-' for us)
12765# * The major and minor version numbers
12766# * --with-pydebug (adds a 'd')
12767# * --with-pymalloc (adds a 'm')
12768# * --with-wide-unicode (adds a 'u')
12769#
12770# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012771# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12772# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012773
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12775$as_echo_n "checking ABIFLAGS... " >&6; }
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12777$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12779$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012780SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12782$as_echo "$SOABI" >&6; }
12783
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12785$as_echo_n "checking LDVERSION... " >&6; }
12786LDVERSION='$(VERSION)$(ABIFLAGS)'
12787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12788$as_echo "$LDVERSION" >&6; }
12789
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012790# SO is the extension of shared libraries `(including the dot!)
12791# -- usually .so, .sl on HP-UX, .dll on Cygwin
12792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12793$as_echo_n "checking SO... " >&6; }
12794if test -z "$SO"
12795then
12796 case $ac_sys_system in
12797 hp*|HP*)
12798 case `uname -m` in
12799 ia64) SO=.so;;
12800 *) SO=.sl;;
12801 esac
12802 ;;
12803 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012804 Linux*|GNU*)
12805 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012806 *) SO=.so;;
12807 esac
12808else
12809 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012810 echo
12811 echo '====================================================================='
12812 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012813 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012814 echo '+ Do you really mean to change the extension for shared libraries? +'
12815 echo '+ Continuing in 10 seconds to let you to ponder. +'
12816 echo '+ +'
12817 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012818 sleep 10
12819fi
12820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12821$as_echo "$SO" >&6; }
12822
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012823# Check whether right shifting a negative integer extends the sign bit
12824# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12826$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012827if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012829else
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012832 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012835/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012836
12837int main()
12838{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012839 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012840}
12841
Martin v. Löwis11437992002-04-12 09:54:03 +000012842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012843if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012844 ac_cv_rshift_extends_sign=yes
12845else
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012850fi
12851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852fi
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12855$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012856if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012857then
Martin v. Löwis11437992002-04-12 09:54:03 +000012858
Matthias Kloseb9621712010-04-24 17:59:49 +000012859$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012860
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012861fi
12862
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012863# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12865$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012866if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012868else
Martin v. Löwis11437992002-04-12 09:54:03 +000012869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012873int
12874main ()
12875{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012876
12877 FILE *f = fopen("/dev/null", "r");
12878 flockfile(f);
12879 getc_unlocked(f);
12880 funlockfile(f);
12881
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ;
12883 return 0;
12884}
12885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012887 ac_cv_have_getc_unlocked=yes
12888else
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 ac_cv_have_getc_unlocked=no
12890fi
12891rm -f core conftest.err conftest.$ac_objext \
12892 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12896$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012897if test "$ac_cv_have_getc_unlocked" = yes
12898then
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012901
12902fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012903
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012904# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012905# save the value of LIBS so we don't actually link Python with readline
12906LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012907
Gregory P. Smith18820942008-09-07 06:24:49 +000012908# On some systems we need to link readline to a termcap compatible
12909# library. NOTE: Keep the precedence of listed libraries synchronised
12910# with setup.py.
12911py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12913$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012914for py_libtermcap in "" ncursesw ncurses curses termcap; do
12915 if test -z "$py_libtermcap"; then
12916 READLINE_LIBS="-lreadline"
12917 else
12918 READLINE_LIBS="-lreadline -l$py_libtermcap"
12919 fi
12920 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012922/* end confdefs.h. */
12923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924/* Override any GCC internal prototype to avoid an error.
12925 Use char because int might match the return type of a GCC
12926 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012927#ifdef __cplusplus
12928extern "C"
12929#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012930char readline ();
12931int
12932main ()
12933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012935 ;
12936 return 0;
12937}
12938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012939if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012940 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012942rm -f core conftest.err conftest.$ac_objext \
12943 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012944 if test $py_cv_lib_readline = yes; then
12945 break
12946 fi
12947done
12948# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12949#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012950if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12952$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012953else
Matthias Kloseb9621712010-04-24 17:59:49 +000012954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12955$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012958
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012959fi
12960
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012961# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12963$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012964if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012966else
12967 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012968LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012970/* end confdefs.h. */
12971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972/* Override any GCC internal prototype to avoid an error.
12973 Use char because int might match the return type of a GCC
12974 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012975#ifdef __cplusplus
12976extern "C"
12977#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012978char rl_callback_handler_install ();
12979int
12980main ()
12981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012983 ;
12984 return 0;
12985}
12986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012987if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012988 ac_cv_lib_readline_rl_callback_handler_install=yes
12989else
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012992rm -f core conftest.err conftest.$ac_objext \
12993 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012994LIBS=$ac_check_lib_save_LIBS
12995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12997$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012998if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012999
Matthias Kloseb9621712010-04-24 17:59:49 +000013000$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013001
13002fi
13003
13004
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013005# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013007/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013008#include <readline/readline.h>
13009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013010if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013011 have_readline=yes
13012else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013013 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013014
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013015fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013016rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013017if test $have_readline = yes
13018then
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013021#include <readline/readline.h>
13022
13023_ACEOF
13024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013028
13029fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013030rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013031
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013033/* end confdefs.h. */
13034#include <readline/readline.h>
13035
13036_ACEOF
13037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013041
13042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013043rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013044
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013045fi
13046
Martin v. Löwis0daad592001-09-30 21:09:59 +000013047# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13049$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013050if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013052else
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013054LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058/* Override any GCC internal prototype to avoid an error.
13059 Use char because int might match the return type of a GCC
13060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013061#ifdef __cplusplus
13062extern "C"
13063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013064char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013065int
13066main ()
13067{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ;
13070 return 0;
13071}
13072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013073if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013078rm -f core conftest.err conftest.$ac_objext \
13079 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013080LIBS=$ac_check_lib_save_LIBS
13081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13083$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013084if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013085
Matthias Kloseb9621712010-04-24 17:59:49 +000013086$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013087
Martin v. Löwis0daad592001-09-30 21:09:59 +000013088fi
13089
Michael W. Hudson54241132001-12-07 15:38:26 +000013090
Thomas Wouters89d996e2007-09-08 17:39:28 +000013091# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13093$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013094if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013096else
13097 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013098LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013100/* end confdefs.h. */
13101
13102/* Override any GCC internal prototype to avoid an error.
13103 Use char because int might match the return type of a GCC
13104 builtin and then its argument prototype would still apply. */
13105#ifdef __cplusplus
13106extern "C"
13107#endif
13108char rl_completion_display_matches_hook ();
13109int
13110main ()
13111{
13112return rl_completion_display_matches_hook ();
13113 ;
13114 return 0;
13115}
13116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013117if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013118 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13119else
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013122rm -f core conftest.err conftest.$ac_objext \
13123 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013124LIBS=$ac_check_lib_save_LIBS
13125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13127$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013128if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013131
13132fi
13133
13134
Martin v. Löwis0daad592001-09-30 21:09:59 +000013135# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13137$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013138if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013140else
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013142LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013146/* Override any GCC internal prototype to avoid an error.
13147 Use char because int might match the return type of a GCC
13148 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013149#ifdef __cplusplus
13150extern "C"
13151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013152char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013153int
13154main ()
13155{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013156return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013157 ;
13158 return 0;
13159}
13160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013161if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013163else
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013166rm -f core conftest.err conftest.$ac_objext \
13167 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013168LIBS=$ac_check_lib_save_LIBS
13169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13171$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013172if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013175
Guido van Rossum353ae582001-07-10 16:45:32 +000013176fi
13177
Jack Jansendd19cf82001-12-06 22:36:17 +000013178
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013179# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013181/* end confdefs.h. */
13182#include <readline/readline.h>
13183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013184if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013185 have_readline=yes
13186else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013187 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013188
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013189fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013190rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013191if test $have_readline = yes
13192then
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013194/* end confdefs.h. */
13195#include <readline/readline.h>
13196
13197_ACEOF
13198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013202
13203fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013204rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013205
13206fi
13207
Martin v. Löwis82bca632006-02-10 20:49:30 +000013208# End of readline checks: restore LIBS
13209LIBS=$LIBS_no_readline
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13212$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013213if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013215else
Martin v. Löwis11437992002-04-12 09:54:03 +000013216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013218 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013221/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013222
13223int main()
13224{
13225 int val1 = nice(1);
13226 if (val1 != -1 && val1 == nice(2))
13227 exit(0);
13228 exit(1);
13229}
13230
Martin v. Löwis11437992002-04-12 09:54:03 +000013231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013232if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013233 ac_cv_broken_nice=yes
13234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13238 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013239fi
13240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241fi
13242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13244$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013245if test "$ac_cv_broken_nice" = yes
13246then
Martin v. Löwis11437992002-04-12 09:54:03 +000013247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013249
13250fi
13251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13253$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013254if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013255 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013256else
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013258 ac_cv_broken_poll=no
13259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013261/* end confdefs.h. */
13262
13263#include <poll.h>
13264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265int main()
13266{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013267 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013268 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013269
13270 close (42);
13271
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013272 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013273 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013274 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013275 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013276 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013277 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278 return 1;
13279}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013280
13281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013282if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013283 ac_cv_broken_poll=yes
13284else
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291fi
13292
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13294$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013295if test "$ac_cv_broken_poll" = yes
13296then
13297
Matthias Kloseb9621712010-04-24 17:59:49 +000013298$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013299
13300fi
13301
Brett Cannon43802422005-02-10 20:48:03 +000013302# 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 +000013303# (which is not required by ISO C or UNIX spec) and/or if we support
13304# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013305ac_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 +000013306#include <$ac_cv_struct_tm>
13307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308"
Gregory P. Smith69140482012-01-16 02:05:55 -080013309if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013310
13311cat >>confdefs.h <<_ACEOF
13312#define HAVE_STRUCT_TM_TM_ZONE 1
13313_ACEOF
13314
13315
13316fi
13317
13318if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013321
13322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13324"
Gregory P. Smith69140482012-01-16 02:05:55 -080013325if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329fi
13330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013332#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333_ACEOF
13334
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13336$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013337if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339else
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013341/* end confdefs.h. */
13342#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343#if !HAVE_DECL_TZNAME
13344extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013345#endif
13346
13347int
13348main ()
13349{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013351 ;
13352 return 0;
13353}
13354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013355if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013356 ac_cv_var_tzname=yes
13357else
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013360rm -f core conftest.err conftest.$ac_objext \
13361 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13364$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013365 if test $ac_cv_var_tzname = yes; then
13366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013368
13369 fi
13370fi
13371
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013372
Martin v. Löwis1d459062005-03-14 21:23:33 +000013373# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13375$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013376if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013378else
13379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013381 ac_cv_working_tzset=no
13382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013384/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013385
13386#include <stdlib.h>
13387#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013388#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013389
13390#if HAVE_TZNAME
13391extern char *tzname[];
13392#endif
13393
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013394int main()
13395{
Brett Cannon18367812003-09-19 00:59:16 +000013396 /* Note that we need to ensure that not only does tzset(3)
13397 do 'something' with localtime, but it works as documented
13398 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013399 This includes making sure that tzname is set properly if
13400 tm->tm_zone does not exist since it is the alternative way
13401 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013402
13403 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013404 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013405 */
13406
Martin v. Löwis1d459062005-03-14 21:23:33 +000013407 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013408 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13409
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013410 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013411 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013412 if (localtime(&groundhogday)->tm_hour != 0)
13413 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013414#if HAVE_TZNAME
13415 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13416 if (strcmp(tzname[0], "UTC") ||
13417 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13418 exit(1);
13419#endif
Brett Cannon18367812003-09-19 00:59:16 +000013420
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013421 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013422 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013423 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013424 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013425#if HAVE_TZNAME
13426 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13427 exit(1);
13428#endif
Brett Cannon18367812003-09-19 00:59:16 +000013429
13430 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13431 tzset();
13432 if (localtime(&groundhogday)->tm_hour != 11)
13433 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013434#if HAVE_TZNAME
13435 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13436 exit(1);
13437#endif
13438
13439#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013440 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13441 exit(1);
13442 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13443 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013444#endif
Brett Cannon18367812003-09-19 00:59:16 +000013445
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013446 exit(0);
13447}
13448
13449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013450if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013451 ac_cv_working_tzset=yes
13452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13456 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013457fi
13458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013459fi
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13462$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013463if test "$ac_cv_working_tzset" = yes
13464then
13465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013467
13468fi
13469
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013470# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13472$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013473if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013477/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013478#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013479int
13480main ()
13481{
13482
13483struct stat st;
13484st.st_mtim.tv_nsec = 1;
13485
13486 ;
13487 return 0;
13488}
13489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013490if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013491 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013492else
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13496fi
13497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13499$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013500if test "$ac_cv_stat_tv_nsec" = yes
13501then
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013504
13505fi
13506
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013507# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13509$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013510if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013512else
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013514/* end confdefs.h. */
13515#include <sys/stat.h>
13516int
13517main ()
13518{
13519
13520struct stat st;
13521st.st_mtimespec.tv_nsec = 1;
13522
13523 ;
13524 return 0;
13525}
13526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013528 ac_cv_stat_tv_nsec2=yes
13529else
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13533fi
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13536$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013537if test "$ac_cv_stat_tv_nsec2" = yes
13538then
13539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013541
13542fi
13543
Jack Jansen666b1e72001-10-31 12:11:48 +000013544# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13546$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013547if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013551/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013552#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
Jack Jansen666b1e72001-10-31 12:11:48 +000013556
13557 int rtn;
13558 rtn = mvwdelch(0,0,0);
13559
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ;
13561 return 0;
13562}
13563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013564if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013565 ac_cv_mvwdelch_is_expression=yes
13566else
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13570fi
13571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13573$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013574
13575if test "$ac_cv_mvwdelch_is_expression" = yes
13576then
Martin v. Löwis11437992002-04-12 09:54:03 +000013577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013579
13580fi
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13583$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013584if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013586else
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013588/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013589#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013590int
13591main ()
13592{
Jack Jansen666b1e72001-10-31 12:11:48 +000013593
13594 WINDOW *w;
13595 w->_flags = 0;
13596
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 ;
13598 return 0;
13599}
13600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013601if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013602 ac_cv_window_has_flags=yes
13603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607fi
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13610$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013611
Jack Jansen666b1e72001-10-31 12:11:48 +000013612
13613if test "$ac_cv_window_has_flags" = yes
13614then
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013617
13618fi
13619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13621$as_echo_n "checking for is_term_resized... " >&6; }
13622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013623/* end confdefs.h. */
13624#include <curses.h>
13625int
13626main ()
13627{
13628void *x=is_term_resized
13629 ;
13630 return 0;
13631}
13632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013633if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013636
Matthias Kloseb159a552010-04-25 21:00:44 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013638$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013639else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13641$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013642
13643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13647$as_echo_n "checking for resize_term... " >&6; }
13648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013649/* end confdefs.h. */
13650#include <curses.h>
13651int
13652main ()
13653{
13654void *x=resize_term
13655 ;
13656 return 0;
13657}
13658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013659if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013662
Matthias Kloseb159a552010-04-25 21:00:44 +000013663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013664$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13667$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013668
13669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13673$as_echo_n "checking for resizeterm... " >&6; }
13674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013675/* end confdefs.h. */
13676#include <curses.h>
13677int
13678main ()
13679{
13680void *x=resizeterm
13681 ;
13682 return 0;
13683}
13684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013685if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013688
Matthias Kloseb159a552010-04-25 21:00:44 +000013689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013690$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013691else
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13693$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013694
13695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13697
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13699$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013700
13701if test -r /dev/ptmx
13702then
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13704$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013707
Thomas Wouters89f507f2006-12-13 04:49:30 +000013708else
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13710$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013711fi
13712
Matthias Kloseb9621712010-04-24 17:59:49 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13714$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013715
13716if test -r /dev/ptc
13717then
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13719$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013722
Thomas Wouters89f507f2006-12-13 04:49:30 +000013723else
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13725$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013726fi
13727
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013728if test "$have_long_long" = yes
13729then
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13731$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013732 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013736 ac_cv_have_long_long_format=no
13737else
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013739/* end confdefs.h. */
13740
13741 #include <stdio.h>
13742 #include <stddef.h>
13743 #include <string.h>
13744
13745 #ifdef HAVE_SYS_TYPES_H
13746 #include <sys/types.h>
13747 #endif
13748
13749 int main()
13750 {
13751 char buffer[256];
13752
13753 if (sprintf(buffer, "%lld", (long long)123) < 0)
13754 return 1;
13755 if (strcmp(buffer, "123"))
13756 return 1;
13757
13758 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13759 return 1;
13760 if (strcmp(buffer, "-123"))
13761 return 1;
13762
13763 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13764 return 1;
13765 if (strcmp(buffer, "123"))
13766 return 1;
13767
13768 return 0;
13769 }
13770
13771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013772if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013773 ac_cv_have_long_long_format=yes
13774else
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013779fi
13780
13781
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013782fi
13783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13785$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013786fi
13787
Mark Dickinson89d7d412009-12-31 20:50:59 +000013788if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013789then
13790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013792
13793fi
13794
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013795if test $ac_sys_system = Darwin
13796then
13797 LIBS="$LIBS -framework CoreFoundation"
13798fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013799
Matthias Kloseb9621712010-04-24 17:59:49 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13801$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013802if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013806 ac_cv_have_size_t_format="cross -- assuming yes"
13807
Thomas Wouters477c8d52006-05-27 19:21:47 +000013808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013810/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013811
Thomas Wouters477c8d52006-05-27 19:21:47 +000013812#include <stdio.h>
13813#include <stddef.h>
13814#include <string.h>
13815
Christian Heimes2c181612007-12-17 20:04:13 +000013816#ifdef HAVE_SYS_TYPES_H
13817#include <sys/types.h>
13818#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013819
13820#ifdef HAVE_SSIZE_T
13821typedef ssize_t Py_ssize_t;
13822#elif SIZEOF_VOID_P == SIZEOF_LONG
13823typedef long Py_ssize_t;
13824#else
13825typedef int Py_ssize_t;
13826#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013827
Christian Heimes2c181612007-12-17 20:04:13 +000013828int main()
13829{
13830 char buffer[256];
13831
Thomas Wouters477c8d52006-05-27 19:21:47 +000013832 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13833 return 1;
13834
Thomas Wouters89f507f2006-12-13 04:49:30 +000013835 if (strcmp(buffer, "123"))
13836 return 1;
13837
13838 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13839 return 1;
13840
13841 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013842 return 1;
13843
13844 return 0;
13845}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013846
Thomas Wouters477c8d52006-05-27 19:21:47 +000013847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013848if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013849 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013855fi
13856
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13859$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013860if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013863
13864fi
13865
Matthias Kloseb9621712010-04-24 17:59:49 +000013866ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013867#ifdef HAVE_SYS_TYPES_H
13868#include <sys/types.h>
13869#endif
13870#ifdef HAVE_SYS_SOCKET_H
13871#include <sys/socket.h>
13872#endif
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874"
Gregory P. Smith69140482012-01-16 02:05:55 -080013875if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013876
Martin v. Löwis11437992002-04-12 09:54:03 +000013877else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013880
13881fi
13882
Michael W. Hudson54241132001-12-07 15:38:26 +000013883
Matthias Kloseb9621712010-04-24 17:59:49 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13885$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013886if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013888else
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013890 ac_cv_broken_mbstowcs=no
13891else
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013893/* end confdefs.h. */
13894
13895#include<stdlib.h>
13896int main() {
13897 size_t len = -1;
13898 const char *str = "text";
13899 len = mbstowcs(NULL, str, 0);
13900 return (len != 4);
13901}
13902
13903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013904if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013905 ac_cv_broken_mbstowcs=no
13906else
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013911fi
13912
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013913fi
13914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13916$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013917if test "$ac_cv_broken_mbstowcs" = yes
13918then
13919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013921
13922fi
13923
Antoine Pitrou042b1282010-08-13 21:15:58 +000013924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13925$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013926if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013927 $as_echo_n "(cached) " >&6
13928else
13929 if test "$cross_compiling" = yes; then :
13930 ac_cv_computed_gotos=no
13931else
13932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13933/* end confdefs.h. */
13934
13935int main(int argc, char **argv)
13936{
13937 static void *targets[1] = { &&LABEL1 };
13938 goto LABEL2;
13939LABEL1:
13940 return 0;
13941LABEL2:
13942 goto *targets[0];
13943 return 1;
13944}
13945
13946_ACEOF
13947if ac_fn_c_try_run "$LINENO"; then :
13948 ac_cv_computed_gotos=yes
13949else
13950 ac_cv_computed_gotos=no
13951fi
13952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13953 conftest.$ac_objext conftest.beam conftest.$ac_ext
13954fi
13955
13956fi
13957
13958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13959$as_echo "$ac_cv_computed_gotos" >&6; }
13960if test "$ac_cv_computed_gotos" = yes
13961then
13962
13963$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13964
13965fi
13966
Antoine Pitroub52ec782009-01-25 16:34:23 +000013967# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13969$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013970
13971# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013972if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013973 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013974if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013975then
13976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013978
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13980$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013981fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013982if test "$withval" = no
13983then
13984
13985$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13988$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013989fi
13990
Antoine Pitrou042b1282010-08-13 21:15:58 +000013991else
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13993$as_echo "no value specified" >&6; }
13994fi
13995
Antoine Pitroub52ec782009-01-25 16:34:23 +000013996
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013997case $ac_sys_system in
13998AIX*)
13999
14000$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14001 ;;
14002esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014003
Michael W. Hudson54241132001-12-07 15:38:26 +000014004
Jesus Cea6a792292010-05-03 21:18:48 +000014005case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080014006 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 +000014007esac
14008
Gregory P. Smith138fa432010-12-13 08:00:52 +000014009ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080014010if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000014011
14012$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
14013
14014fi
Jesus Cea6a792292010-05-03 21:18:48 +000014015
14016
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014017
14018
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014019for h in `(cd $srcdir;echo Python/thread_*.h)`
14020do
14021 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14022done
14023
Michael W. Hudson54241132001-12-07 15:38:26 +000014024
Neal Norwitzd24499d2005-12-18 21:36:39 +000014025SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14027$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014028for dir in $SRCDIRS; do
14029 if test ! -d $dir; then
14030 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014031 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014032done
Matthias Kloseb9621712010-04-24 17:59:49 +000014033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14034$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014035
Guido van Rossum627b2d71993-12-24 10:39:16 +000014036# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014037ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014038
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014039ac_config_files="$ac_config_files Modules/ld_so_aix"
14040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014042# This file is a shell script that caches the results of configure
14043# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014044# scripts and configure runs, see configure's option --config-cache.
14045# It is not useful on other systems. If it contains results you don't
14046# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014047#
Martin v. Löwis11437992002-04-12 09:54:03 +000014048# config.status only pays attention to the cache file if you give it
14049# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014050#
Skip Montanaro6dead952003-09-25 14:50:04 +000014051# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014052# loading this file, other *unset* `ac_cv_foo' will be assigned the
14053# following values.
14054
14055_ACEOF
14056
Guido van Rossumf78abae1997-01-21 22:02:36 +000014057# The following way of writing the cache mishandles newlines in values,
14058# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014060# Ultrix sh set writes to stderr and can't be redirected directly,
14061# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062(
14063 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14064 eval ac_val=\$$ac_var
14065 case $ac_val in #(
14066 *${as_nl}*)
14067 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14069$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014070 esac
14071 case $ac_var in #(
14072 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014073 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14074 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075 esac ;;
14076 esac
14077 done
14078
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14081 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 # `set' does not quote correctly, so add quotes: double-quote
14083 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014085 "s/'/'\\\\''/g;
14086 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014088 *)
14089 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014090 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092 esac |
14093 sort
14094) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014096 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14100 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14102 :end' >>confcache
14103if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14104 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014105 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14107$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014108 if test ! -f "$cache_file" || test -h "$cache_file"; then
14109 cat confcache >"$cache_file"
14110 else
14111 case $cache_file in #(
14112 */* | ?:*)
14113 mv -f confcache "$cache_file"$$ &&
14114 mv -f "$cache_file"$$ "$cache_file" ;; #(
14115 *)
14116 mv -f confcache "$cache_file" ;;
14117 esac
14118 fi
14119 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014120 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14122$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014123 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014124fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014125rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014126
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014127test "x$prefix" = xNONE && prefix=$ac_default_prefix
14128# Let make expand exec_prefix.
14129test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014130
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014131DEFS=-DHAVE_CONFIG_H
14132
Skip Montanaro6dead952003-09-25 14:50:04 +000014133ac_libobjs=
14134ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014135U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014136for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14137 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14141 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14143 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014144done
14145LIBOBJS=$ac_libobjs
14146
14147LTLIBOBJS=$ac_ltlibobjs
14148
14149
Martin v. Löwis11437992002-04-12 09:54:03 +000014150
Matthias Kloseb9621712010-04-24 17:59:49 +000014151
Gregory P. Smith69140482012-01-16 02:05:55 -080014152: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014153ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014154ac_clean_files_save=$ac_clean_files
14155ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014156{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14157$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14158as_write_fail=0
14159cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014160#! $SHELL
14161# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014162# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014163# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014164# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014165
Martin v. Löwis11437992002-04-12 09:54:03 +000014166debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014167ac_cs_recheck=false
14168ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170SHELL=\${CONFIG_SHELL-$SHELL}
14171export SHELL
14172_ASEOF
14173cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14174## -------------------- ##
14175## M4sh Initialization. ##
14176## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178# Be more Bourne compatible
14179DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014180if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 emulate sh
14182 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014184 # is contrary to our usage. Disable this feature.
14185 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 case `(set -o) 2>/dev/null` in #(
14189 *posix*) :
14190 set -o posix ;; #(
14191 *) :
14192 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014194fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014195
14196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197as_nl='
14198'
14199export as_nl
14200# Printing a long string crashes Solaris 7 /usr/bin/printf.
14201as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14202as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14203as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14204# Prefer a ksh shell builtin over an external printf program on Solaris,
14205# but without wasting forks for bash or zsh.
14206if test -z "$BASH_VERSION$ZSH_VERSION" \
14207 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14208 as_echo='print -r --'
14209 as_echo_n='print -rn --'
14210elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14211 as_echo='printf %s\n'
14212 as_echo_n='printf %s'
14213else
14214 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14215 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14216 as_echo_n='/usr/ucb/echo -n'
14217 else
14218 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14219 as_echo_n_body='eval
14220 arg=$1;
14221 case $arg in #(
14222 *"$as_nl"*)
14223 expr "X$arg" : "X\\(.*\\)$as_nl";
14224 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14225 esac;
14226 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14227 '
14228 export as_echo_n_body
14229 as_echo_n='sh -c $as_echo_n_body as_echo'
14230 fi
14231 export as_echo_body
14232 as_echo='sh -c $as_echo_body as_echo'
14233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014234
14235# The user is always right.
14236if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 PATH_SEPARATOR=:
14238 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14239 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14240 PATH_SEPARATOR=';'
14241 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244
14245# IFS
14246# We need space, tab and new line, in precisely that order. Quoting is
14247# there to prevent editors from complaining about space-tab.
14248# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14249# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250IFS=" "" $as_nl"
14251
14252# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014253as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014254case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255 *[\\/]* ) as_myself=$0 ;;
14256 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014257for as_dir in $PATH
14258do
14259 IFS=$as_save_IFS
14260 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14262 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265 ;;
14266esac
14267# We did not find ourselves, most probably we were run as `sh COMMAND'
14268# in which case we are not to be found in the path.
14269if test "x$as_myself" = x; then
14270 as_myself=$0
14271fi
14272if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14274 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275fi
14276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277# Unset variables that we do not need and which cause bugs (e.g. in
14278# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14279# suppresses any "Segmentation fault" message there. '((' could
14280# trigger a bug in pdksh 5.2.14.
14281for as_var in BASH_ENV ENV MAIL MAILPATH
14282do eval test x\${$as_var+set} = xset \
14283 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284done
14285PS1='$ '
14286PS2='> '
14287PS4='+ '
14288
14289# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014290LC_ALL=C
14291export LC_ALL
14292LANGUAGE=C
14293export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294
Matthias Kloseb9621712010-04-24 17:59:49 +000014295# CDPATH.
14296(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14297
14298
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014299# as_fn_error STATUS ERROR [LINENO LOG_FD]
14300# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014301# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14302# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014303# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014304as_fn_error ()
14305{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014306 as_status=$1; test $as_status -eq 0 && as_status=1
14307 if test "$4"; then
14308 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14309 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014311 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 as_fn_exit $as_status
14313} # as_fn_error
14314
14315
14316# as_fn_set_status STATUS
14317# -----------------------
14318# Set $? to STATUS, without forking.
14319as_fn_set_status ()
14320{
14321 return $1
14322} # as_fn_set_status
14323
14324# as_fn_exit STATUS
14325# -----------------
14326# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14327as_fn_exit ()
14328{
14329 set +e
14330 as_fn_set_status $1
14331 exit $1
14332} # as_fn_exit
14333
14334# as_fn_unset VAR
14335# ---------------
14336# Portably unset VAR.
14337as_fn_unset ()
14338{
14339 { eval $1=; unset $1;}
14340}
14341as_unset=as_fn_unset
14342# as_fn_append VAR VALUE
14343# ----------------------
14344# Append the text in VALUE to the end of the definition contained in VAR. Take
14345# advantage of any shell optimizations that allow amortized linear growth over
14346# repeated appends, instead of the typical quadratic growth present in naive
14347# implementations.
14348if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14349 eval 'as_fn_append ()
14350 {
14351 eval $1+=\$2
14352 }'
14353else
14354 as_fn_append ()
14355 {
14356 eval $1=\$$1\$2
14357 }
14358fi # as_fn_append
14359
14360# as_fn_arith ARG...
14361# ------------------
14362# Perform arithmetic evaluation on the ARGs, and store the result in the
14363# global $as_val. Take advantage of shells that can avoid forks. The arguments
14364# must be portable across $(()) and expr.
14365if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14366 eval 'as_fn_arith ()
14367 {
14368 as_val=$(( $* ))
14369 }'
14370else
14371 as_fn_arith ()
14372 {
14373 as_val=`expr "$@" || test $? -eq 1`
14374 }
14375fi # as_fn_arith
14376
14377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378if expr a : '\(a\)' >/dev/null 2>&1 &&
14379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14380 as_expr=expr
14381else
14382 as_expr=false
14383fi
14384
14385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14386 as_basename=basename
14387else
14388 as_basename=false
14389fi
14390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14392 as_dirname=dirname
14393else
14394 as_dirname=false
14395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397as_me=`$as_basename -- "$0" ||
14398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14399 X"$0" : 'X\(//\)$' \| \
14400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014401$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014402 sed '/^.*\/\([^/][^/]*\)\/*$/{
14403 s//\1/
14404 q
14405 }
14406 /^X\/\(\/\/\)$/{
14407 s//\1/
14408 q
14409 }
14410 /^X\/\(\/\).*/{
14411 s//\1/
14412 q
14413 }
14414 s/.*/./; q'`
14415
Matthias Kloseb9621712010-04-24 17:59:49 +000014416# Avoid depending upon Character Ranges.
14417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14420as_cr_digits='0123456789'
14421as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422
14423ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014424case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 xy) ECHO_C='\c';;
14429 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14430 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431 esac;;
14432*)
14433 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014435
Martin v. Löwis11437992002-04-12 09:54:03 +000014436rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437if test -d conf$$.dir; then
14438 rm -f conf$$.dir/conf$$.file
14439else
14440 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014443if (echo >conf$$.file) 2>/dev/null; then
14444 if ln -s conf$$.file conf$$ 2>/dev/null; then
14445 as_ln_s='ln -s'
14446 # ... but there are two gotchas:
14447 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14448 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14449 # In both cases, we have to default to `cp -p'.
14450 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14451 as_ln_s='cp -p'
14452 elif ln conf$$.file conf$$ 2>/dev/null; then
14453 as_ln_s=ln
14454 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014457else
14458 as_ln_s='cp -p'
14459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14461rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014462
Matthias Kloseb9621712010-04-24 17:59:49 +000014463
14464# as_fn_mkdir_p
14465# -------------
14466# Create "$as_dir" as a directory, including parents if necessary.
14467as_fn_mkdir_p ()
14468{
14469
14470 case $as_dir in #(
14471 -*) as_dir=./$as_dir;;
14472 esac
14473 test -d "$as_dir" || eval $as_mkdir_p || {
14474 as_dirs=
14475 while :; do
14476 case $as_dir in #(
14477 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14478 *) as_qdir=$as_dir;;
14479 esac
14480 as_dirs="'$as_qdir' $as_dirs"
14481 as_dir=`$as_dirname -- "$as_dir" ||
14482$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14483 X"$as_dir" : 'X\(//\)[^/]' \| \
14484 X"$as_dir" : 'X\(//\)$' \| \
14485 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14486$as_echo X"$as_dir" |
14487 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14488 s//\1/
14489 q
14490 }
14491 /^X\(\/\/\)[^/].*/{
14492 s//\1/
14493 q
14494 }
14495 /^X\(\/\/\)$/{
14496 s//\1/
14497 q
14498 }
14499 /^X\(\/\).*/{
14500 s//\1/
14501 q
14502 }
14503 s/.*/./; q'`
14504 test -d "$as_dir" && break
14505 done
14506 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014507 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014508
14509
14510} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014511if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014513else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014514 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014515 as_mkdir_p=false
14516fi
14517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518if test -x / >/dev/null 2>&1; then
14519 as_test_x='test -x'
14520else
14521 if ls -dL / >/dev/null 2>&1; then
14522 as_ls_L_option=L
14523 else
14524 as_ls_L_option=
14525 fi
14526 as_test_x='
14527 eval sh -c '\''
14528 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 case $1 in #(
14532 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535 ???[sx]*):;;*)false;;esac;fi
14536 '\'' sh
14537 '
14538fi
14539as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
14541# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014542as_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 +000014543
14544# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014545as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014546
14547
Martin v. Löwis11437992002-04-12 09:54:03 +000014548exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014549## ----------------------------------- ##
14550## Main body of $CONFIG_STATUS script. ##
14551## ----------------------------------- ##
14552_ASEOF
14553test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14556# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014557# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558# values after options handling.
14559ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014560This file was extended by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -080014561generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014562
14563 CONFIG_FILES = $CONFIG_FILES
14564 CONFIG_HEADERS = $CONFIG_HEADERS
14565 CONFIG_LINKS = $CONFIG_LINKS
14566 CONFIG_COMMANDS = $CONFIG_COMMANDS
14567 $ $0 $@
14568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569on `(hostname || uname -n) 2>/dev/null | sed 1q`
14570"
14571
Martin v. Löwis11437992002-04-12 09:54:03 +000014572_ACEOF
14573
Matthias Kloseb9621712010-04-24 17:59:49 +000014574case $ac_config_files in *"
14575"*) set x $ac_config_files; shift; ac_config_files=$*;;
14576esac
14577
14578case $ac_config_headers in *"
14579"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14580esac
14581
14582
14583cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014584# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014585config_files="$ac_config_files"
14586config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014591ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014592\`$as_me' instantiates files and other configuration actions
14593from templates according to the current configuration. Unless the files
14594and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014597
14598 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 --config print configuration, then exit
14601 -q, --quiet, --silent
14602 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 -d, --debug don't remove temporary files
14604 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 --file=FILE[:TEMPLATE]
14606 instantiate the configuration file FILE
14607 --header=FILE[:TEMPLATE]
14608 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014609
14610Configuration files:
14611$config_files
14612
14613Configuration headers:
14614$config_headers
14615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14620ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014621ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014622python config.status 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -080014623configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014626Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014627This config.status script is free software; the Free Software Foundation
14628gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629
14630ac_pwd='$ac_pwd'
14631srcdir='$srcdir'
14632INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014633MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014634test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014635_ACEOF
14636
Matthias Kloseb9621712010-04-24 17:59:49 +000014637cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14638# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014639ac_need_defaults=:
14640while test $# != 0
14641do
14642 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014643 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14645 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014646 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014648 --*=)
14649 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14650 ac_optarg=
14651 ac_shift=:
14652 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014654 ac_option=$1
14655 ac_optarg=$2
14656 ac_shift=shift
14657 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014658 esac
14659
Skip Montanaro6dead952003-09-25 14:50:04 +000014660 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014662 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14663 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 $as_echo "$ac_cs_version"; exit ;;
14666 --config | --confi | --conf | --con | --co | --c )
14667 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 debug=: ;;
14670 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014671 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 case $ac_optarg in
14673 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014674 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 esac
14676 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 ac_need_defaults=false;;
14678 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014679 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 case $ac_optarg in
14681 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14682 esac
14683 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014684 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685 --he | --h)
14686 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014687 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014688Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014691 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14692 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14693 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014694
14695 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014696 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014697Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014698
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014701
14702 esac
14703 shift
14704done
14705
Skip Montanaro6dead952003-09-25 14:50:04 +000014706ac_configure_extra_args=
14707
14708if $ac_cs_silent; then
14709 exec 6>/dev/null
14710 ac_configure_extra_args="$ac_configure_extra_args --silent"
14711fi
14712
14713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014714cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014715if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14717 shift
14718 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14719 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014722fi
14723
Martin v. Löwis11437992002-04-12 09:54:03 +000014724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726exec 5>>config.log
14727{
14728 echo
14729 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14730## Running $as_me. ##
14731_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014733} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014736cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740
14741# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014742for ac_config_target in $ac_config_targets
14743do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014744 case $ac_config_target in
14745 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14746 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14747 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014748 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14749 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14751 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014752 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014753 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014754
Gregory P. Smith69140482012-01-16 02:05:55 -080014755 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 esac
14757done
14758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760# If the user did not use the arguments to specify the items to instantiate,
14761# then the envvar interface is used. Set only those that are not.
14762# We use the long form for the default assignment because of an extremely
14763# bizarre bug on SunOS 4.1.3.
14764if $ac_need_defaults; then
14765 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14766 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14767fi
14768
Skip Montanaro6dead952003-09-25 14:50:04 +000014769# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014771# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772# Hook for its removal unless debugging.
14773# Note that there is a small window in which the directory will not be cleaned:
14774# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014775$debug ||
14776{
Gregory P. Smith69140482012-01-16 02:05:55 -080014777 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014779 : "${ac_tmp:=$tmp}"
14780 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014783}
Martin v. Löwis11437992002-04-12 09:54:03 +000014784# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014785
Martin v. Löwis11437992002-04-12 09:54:03 +000014786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014788 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014789} ||
14790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791 tmp=./conf$$-$RANDOM
14792 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014793} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014794ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Matthias Kloseb9621712010-04-24 17:59:49 +000014796# Set up the scripts for CONFIG_FILES section.
14797# No need to generate them if there are no CONFIG_FILES.
14798# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014800
Matthias Kloseb9621712010-04-24 17:59:49 +000014801
14802ac_cr=`echo X | tr X '\015'`
14803# On cygwin, bash can eat \r inside `` if the user requested igncr.
14804# But we know of no other shell where ac_cr would be empty at this
14805# point, so we can use a bashism as a fallback.
14806if test "x$ac_cr" = x; then
14807 eval ac_cr=\$\'\\r\'
14808fi
14809ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14810if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014811 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014812else
14813 ac_cs_awk_cr=$ac_cr
14814fi
14815
Gregory P. Smith69140482012-01-16 02:05:55 -080014816echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014817_ACEOF
14818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820{
14821 echo "cat >conf$$subs.awk <<_ACEOF" &&
14822 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14823 echo "_ACEOF"
14824} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014825 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14826ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827ac_delim='%!_!# '
14828for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014830 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14833 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834 break
14835 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014836 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837 else
14838 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840done
Matthias Kloseb9621712010-04-24 17:59:49 +000014841rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842
Matthias Kloseb9621712010-04-24 17:59:49 +000014843cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014844cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014846sed -n '
14847h
14848s/^/S["/; s/!.*/"]=/
14849p
14850g
14851s/^[^!]*!//
14852:repl
14853t repl
14854s/'"$ac_delim"'$//
14855t delim
14856:nl
14857h
14858s/\(.\{148\}\)..*/\1/
14859t more1
14860s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14861p
14862n
14863b repl
14864:more1
14865s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14866p
14867g
14868s/.\{148\}//
14869t nl
14870:delim
14871h
14872s/\(.\{148\}\)..*/\1/
14873t more2
14874s/["\\]/\\&/g; s/^/"/; s/$/"/
14875p
14876b
14877:more2
14878s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14879p
14880g
14881s/.\{148\}//
14882t delim
14883' <conf$$subs.awk | sed '
14884/^[^""]/{
14885 N
14886 s/\n//
14887}
14888' >>$CONFIG_STATUS || ac_write_fail=1
14889rm -f conf$$subs.awk
14890cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14891_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014892cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014893 for (key in S) S_is_set[key] = 1
14894 FS = ""
14895
14896}
14897{
14898 line = $ 0
14899 nfields = split(line, field, "@")
14900 substed = 0
14901 len = length(field[1])
14902 for (i = 2; i < nfields; i++) {
14903 key = field[i]
14904 keylen = length(key)
14905 if (S_is_set[key]) {
14906 value = S[key]
14907 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14908 len += length(value) + length(field[++i])
14909 substed = 1
14910 } else
14911 len += 1 + keylen
14912 }
14913
14914 print line
14915}
14916
14917_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014919cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14920if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14921 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14922else
14923 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014924fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014925 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014926_ACEOF
14927
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014928# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14929# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930# trailing colons and then remove the whole line if VPATH becomes empty
14931# (actually we leave an empty line to preserve line numbers).
14932if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014933 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14934h
14935s///
14936s/^/:/
14937s/[ ]*$/:/
14938s/:\$(srcdir):/:/g
14939s/:\${srcdir}:/:/g
14940s/:@srcdir@:/:/g
14941s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014943x
14944s/\(=[ ]*\).*/\1/
14945G
14946s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947s/^[^=]*=[ ]*$//
14948}'
14949fi
14950
Matthias Kloseb9621712010-04-24 17:59:49 +000014951cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014952fi # test -n "$CONFIG_FILES"
14953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954# Set up the scripts for CONFIG_HEADERS section.
14955# No need to generate them if there are no CONFIG_HEADERS.
14956# This happens for instance with `./config.status Makefile'.
14957if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014958cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014959BEGIN {
14960_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961
Matthias Kloseb9621712010-04-24 17:59:49 +000014962# Transform confdefs.h into an awk script `defines.awk', embedded as
14963# here-document in config.status, that substitutes the proper values into
14964# config.h.in to produce config.h.
14965
14966# Create a delimiter string that does not exist in confdefs.h, to ease
14967# handling of long lines.
14968ac_delim='%!_!# '
14969for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080014970 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14971 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 break
14973 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014974 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 else
14976 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14977 fi
14978done
14979
14980# For the awk script, D is an array of macro values keyed by name,
14981# likewise P contains macro parameters if any. Preserve backslash
14982# newline sequences.
14983
14984ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14985sed -n '
14986s/.\{148\}/&'"$ac_delim"'/g
14987t rset
14988:rset
14989s/^[ ]*#[ ]*define[ ][ ]*/ /
14990t def
14991d
14992:def
14993s/\\$//
14994t bsnl
14995s/["\\]/\\&/g
14996s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14997D["\1"]=" \3"/p
14998s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14999d
15000:bsnl
15001s/["\\]/\\&/g
15002s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15003D["\1"]=" \3\\\\\\n"\\/p
15004t cont
15005s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15006t cont
15007d
15008:cont
15009n
15010s/.\{148\}/&'"$ac_delim"'/g
15011t clear
15012:clear
15013s/\\$//
15014t bsnlc
15015s/["\\]/\\&/g; s/^/"/; s/$/"/p
15016d
15017:bsnlc
15018s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15019b cont
15020' <confdefs.h | sed '
15021s/'"$ac_delim"'/"\\\
15022"/g' >>$CONFIG_STATUS || ac_write_fail=1
15023
15024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15025 for (key in D) D_is_set[key] = 1
15026 FS = ""
15027}
15028/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15029 line = \$ 0
15030 split(line, arg, " ")
15031 if (arg[1] == "#") {
15032 defundef = arg[2]
15033 mac1 = arg[3]
15034 } else {
15035 defundef = substr(arg[1], 2)
15036 mac1 = arg[2]
15037 }
15038 split(mac1, mac2, "(") #)
15039 macro = mac2[1]
15040 prefix = substr(line, 1, index(line, defundef) - 1)
15041 if (D_is_set[macro]) {
15042 # Preserve the white space surrounding the "#".
15043 print prefix "define", macro P[macro] D[macro]
15044 next
15045 } else {
15046 # Replace #undef with comments. This is necessary, for example,
15047 # in the case of _POSIX_SOURCE, which is predefined and required
15048 # on some systems where configure will not decide to define it.
15049 if (defundef == "undef") {
15050 print "/*", prefix defundef, macro, "*/"
15051 next
15052 }
15053 }
15054}
15055{ print }
15056_ACAWK
15057_ACEOF
15058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015059 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015060fi # test -n "$CONFIG_HEADERS"
15061
15062
15063eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15064shift
15065for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066do
15067 case $ac_tag in
15068 :[FHLC]) ac_mode=$ac_tag; continue;;
15069 esac
15070 case $ac_mode$ac_tag in
15071 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015072 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073 :[FH]-) ac_tag=-:-;;
15074 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15075 esac
15076 ac_save_IFS=$IFS
15077 IFS=:
15078 set x $ac_tag
15079 IFS=$ac_save_IFS
15080 shift
15081 ac_file=$1
15082 shift
15083
15084 case $ac_mode in
15085 :L) ac_source=$1;;
15086 :[FH])
15087 ac_file_inputs=
15088 for ac_f
15089 do
15090 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015091 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 *) # Look for the file first in the build tree, then in the source tree
15093 # (if the path is not absolute). The absolute path cannot be DOS-style,
15094 # because $ac_f cannot contain `:'.
15095 test -f "$ac_f" ||
15096 case $ac_f in
15097 [\\/$]*) false;;
15098 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15099 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015100 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15103 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104 done
15105
15106 # Let's still pretend it is `configure' which instantiates (i.e., don't
15107 # use $as_me), people would be surprised to read:
15108 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 configure_input='Generated from '`
15110 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15111 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112 if test x"$ac_file" != x-; then
15113 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15115$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 # Neutralize special characters interpreted by sed in replacement strings.
15118 case $configure_input in #(
15119 *\&* | *\|* | *\\* )
15120 ac_sed_conf_input=`$as_echo "$configure_input" |
15121 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15122 *) ac_sed_conf_input=$configure_input;;
15123 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124
15125 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015126 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15127 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128 esac
15129 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 esac
15131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015133$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015134 X"$ac_file" : 'X\(//\)[^/]' \| \
15135 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015137$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15139 s//\1/
15140 q
15141 }
15142 /^X\(\/\/\)[^/].*/{
15143 s//\1/
15144 q
15145 }
15146 /^X\(\/\/\)$/{
15147 s//\1/
15148 q
15149 }
15150 /^X\(\/\).*/{
15151 s//\1/
15152 q
15153 }
15154 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 ac_builddir=.
15157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158case "$ac_dir" in
15159.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15160*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164 case $ac_top_builddir_sub in
15165 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15166 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15167 esac ;;
15168esac
15169ac_abs_top_builddir=$ac_pwd
15170ac_abs_builddir=$ac_pwd$ac_dir_suffix
15171# for backward compatibility:
15172ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015173
15174case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177 ac_top_srcdir=$ac_top_builddir_sub
15178 ac_abs_top_srcdir=$ac_pwd ;;
15179 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181 ac_top_srcdir=$srcdir
15182 ac_abs_top_srcdir=$srcdir ;;
15183 *) # Relative name.
15184 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15185 ac_top_srcdir=$ac_top_build_prefix$srcdir
15186 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015187esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015189
Martin v. Löwis11437992002-04-12 09:54:03 +000015190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 case $ac_mode in
15192 :F)
15193 #
15194 # CONFIG_FILE
15195 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015196
15197 case $INSTALL in
15198 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015201 ac_MKDIR_P=$MKDIR_P
15202 case $MKDIR_P in
15203 [\\/$]* | ?:[\\/]* ) ;;
15204 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15205 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015206_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207
Matthias Kloseb9621712010-04-24 17:59:49 +000015208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209# If the template does not know about datarootdir, expand it.
15210# FIXME: This hack should be removed a few years after 2.60.
15211ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015212ac_sed_dataroot='
15213/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214 p
15215 q
15216}
15217/@datadir@/p
15218/@docdir@/p
15219/@infodir@/p
15220/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015221/@mandir@/p'
15222case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223*datarootdir*) ac_datarootdir_seen=yes;;
15224*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15226$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015228cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229 ac_datarootdir_hack='
15230 s&@datadir@&$datadir&g
15231 s&@docdir@&$docdir&g
15232 s&@infodir@&$infodir&g
15233 s&@localedir@&$localedir&g
15234 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015236esac
15237_ACEOF
15238
15239# Neutralize VPATH when `$srcdir' = `.'.
15240# Shell code in configure.ac might set extrasub.
15241# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015242cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15243ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015244$extrasub
15245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015247:t
15248/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015249s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015251s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252s&@srcdir@&$ac_srcdir&;t t
15253s&@abs_srcdir@&$ac_abs_srcdir&;t t
15254s&@top_srcdir@&$ac_top_srcdir&;t t
15255s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15256s&@builddir@&$ac_builddir&;t t
15257s&@abs_builddir@&$ac_abs_builddir&;t t
15258s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15259s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015260s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015262"
Gregory P. Smith69140482012-01-16 02:05:55 -080015263eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15264 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015267 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15268 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15269 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 { $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 +000015271which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015272$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015273which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015274
Gregory P. Smith69140482012-01-16 02:05:55 -080015275 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015277 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15278 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015280 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015281 ;;
15282 :H)
15283 #
15284 # CONFIG_HEADER
15285 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 {
15288 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015289 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15290 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015291 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015292 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15294$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015297 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015298 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 fi
15300 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015302 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015303 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015305 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307
15308 esac
15309
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015310
15311 case $ac_file$ac_mode in
15312 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15313
15314 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315done # for ac_tag
15316
Guido van Rossum627b2d71993-12-24 10:39:16 +000015317
Matthias Kloseb9621712010-04-24 17:59:49 +000015318as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015319_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015320ac_clean_files=$ac_clean_files_save
15321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015323 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015324
Martin v. Löwis11437992002-04-12 09:54:03 +000015325
15326# configure is writing to config.log, and then calls config.status.
15327# config.status does its own redirection, appending to config.log.
15328# Unfortunately, on DOS this fails, as config.log is still kept open
15329# by configure, so config.status won't be able to write to it; its
15330# output is simply discarded. So we exec the FD to /dev/null,
15331# effectively closing config.log, so it can be properly (re)opened and
15332# appended to by config.status. When coming back to configure, we
15333# need to make the FD available again.
15334if test "$no_create" != yes; then
15335 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015336 ac_config_status_args=
15337 test "$silent" = yes &&
15338 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015340 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 exec 5>>config.log
15342 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15343 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015344 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015345fi
15346if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15348$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015349fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015350
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015351
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015352echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015353if test ! -f Modules/Setup
15354then
15355 cp $srcdir/Modules/Setup.dist Modules/Setup
15356fi
15357
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015358echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015359if test ! -f Modules/Setup.local
15360then
15361 echo "# Edit this file for local setup changes" >Modules/Setup.local
15362fi
15363
15364echo "creating Makefile"
15365$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15366 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015367 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015368mv config.c Modules