blob: 5f00c1ecfafbee1545925aa1c72aac6febf89844 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl1ca2e792011-03-05 20:51:24 +01002# From configure.in 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
644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Georg Brandl187c1112011-07-03 09:23:20 +0200647HAS_PYTHON
648DISABLE_ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100649HAS_HG
650HGBRANCH
651HGTAG
652HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000653SVNVERSION
654ARFLAGS
655AR
656RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000657USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000658GNULD
659LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000660LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000661RUNSHARED
662INSTSONAME
663LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000664PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000665BLDLIBRARY
666DLLLIBRARY
667LDLIBRARY
668LIBRARY
669BUILDEXEEXT
670EGREP
671GREP
672CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200673NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000674MAINCC
675CXX
676OBJEXT
677EXEEXT
678ac_ct_CC
679CPPFLAGS
680LDFLAGS
681CFLAGS
682CC
683EXPORT_MACOSX_DEPLOYMENT_TARGET
684CONFIGURE_MACOSX_DEPLOYMENT_TARGET
685SGI_ABI
686MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000687FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000688FRAMEWORKUNIXTOOLSPREFIX
689FRAMEWORKALTINSTALLLAST
690FRAMEWORKALTINSTALLFIRST
691FRAMEWORKINSTALLLAST
692FRAMEWORKINSTALLFIRST
693PYTHONFRAMEWORKINSTALLDIR
694PYTHONFRAMEWORKPREFIX
695PYTHONFRAMEWORKDIR
696PYTHONFRAMEWORKIDENTIFIER
697PYTHONFRAMEWORK
698LIPO_32BIT_FLAGS
699ARCH_RUN_32BIT
700UNIVERSALSDK
701CONFIG_ARGS
702SOVERSION
703VERSION
704target_alias
705host_alias
706build_alias
707LIBS
708ECHO_T
709ECHO_N
710ECHO_C
711DEFS
712mandir
713localedir
714libdir
715psdir
716pdfdir
717dvidir
718htmldir
719infodir
720docdir
721oldincludedir
722includedir
723localstatedir
724sharedstatedir
725sysconfdir
726datadir
727datarootdir
728libexecdir
729sbindir
730bindir
731program_transform_name
732prefix
733exec_prefix
734PACKAGE_URL
735PACKAGE_BUGREPORT
736PACKAGE_STRING
737PACKAGE_VERSION
738PACKAGE_TARNAME
739PACKAGE_NAME
740PATH_SEPARATOR
741SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000742ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000743ac_user_opts='
744enable_option_checking
745enable_universalsdk
746with_universal_archs
747with_framework_name
748enable_framework
749with_gcc
750with_cxx_main
751with_suffix
752enable_shared
753enable_profiling
754with_pydebug
755with_libs
756with_system_expat
757with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000758enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_dbmliborder
760with_signal_module
761with_dec_threads
762with_threads
763with_thread
764enable_ipv6
765with_doc_strings
766with_tsc
767with_pymalloc
768with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000769with_fpectl
770with_libm
771with_libc
772enable_big_digits
773with_wide_unicode
774with_computed_gotos
775'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000776 ac_precious_vars='build_alias
777host_alias
778target_alias
779CC
780CFLAGS
781LDFLAGS
782LIBS
783CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000784CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785
Guido van Rossum627b2d71993-12-24 10:39:16 +0000786
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000788ac_init_help=
789ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000790ac_unrecognized_opts=
791ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792# The variables have the same names as the options, with
793# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000794cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797no_recursion=
798prefix=NONE
799program_prefix=NONE
800program_suffix=NONE
801program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806x_includes=NONE
807x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000808
809# Installation directory options.
810# These are left unexpanded so users can "make install exec_prefix=/foo"
811# and all the variables that are supposed to be based on exec_prefix
812# by default will actually change.
813# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815bindir='${exec_prefix}/bin'
816sbindir='${exec_prefix}/sbin'
817libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818datarootdir='${prefix}/share'
819datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820sysconfdir='${prefix}/etc'
821sharedstatedir='${prefix}/com'
822localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823includedir='${prefix}/include'
824oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
826infodir='${datarootdir}/info'
827htmldir='${docdir}'
828dvidir='${docdir}'
829pdfdir='${docdir}'
830psdir='${docdir}'
831libdir='${exec_prefix}/lib'
832localedir='${datarootdir}/locale'
833mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000838do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 # If the previous option needs an argument, assign it.
840 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842 ac_prev=
843 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000844 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000847 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
848 *=) ac_optarg= ;;
849 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Accept the important Cygnus configure options, so we can diagnose typos.
853
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854 case $ac_dashdash$ac_option in
855 --)
856 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858 -bindir | --bindir | --bindi | --bind | --bin | --bi)
859 ac_prev=bindir ;;
860 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862
863 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 -cache-file | --cache-file | --cache-fil | --cache-fi \
869 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
870 ac_prev=cache_file ;;
871 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
872 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 cache_file=$ac_optarg ;;
874
875 --config-cache | -C)
876 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
884 | --dataroo | --dataro | --datar)
885 ac_prev=datarootdir ;;
886 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
887 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
888 datarootdir=$ac_optarg ;;
889
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000891 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000893 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000894 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000895 ac_useropt_orig=$ac_useropt
896 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
897 case $ac_user_opts in
898 *"
899"enable_$ac_useropt"
900"*) ;;
901 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
902 ac_unrecognized_sep=', ';;
903 esac
904 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905
906 -docdir | --docdir | --docdi | --doc | --do)
907 ac_prev=docdir ;;
908 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
909 docdir=$ac_optarg ;;
910
911 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
912 ac_prev=dvidir ;;
913 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
914 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
916 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000919 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000920 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000921 ac_useropt_orig=$ac_useropt
922 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
923 case $ac_user_opts in
924 *"
925"enable_$ac_useropt"
926"*) ;;
927 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
928 ac_unrecognized_sep=', ';;
929 esac
930 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
933 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
934 | --exec | --exe | --ex)
935 ac_prev=exec_prefix ;;
936 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
937 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
938 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
941 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 # Obsolete; use --with-gas.
943 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 -help | --help | --hel | --he | -h)
946 ac_init_help=long ;;
947 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
948 ac_init_help=recursive ;;
949 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
950 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
958 ac_prev=htmldir ;;
959 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
960 | --ht=*)
961 htmldir=$ac_optarg ;;
962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 -includedir | --includedir | --includedi | --included | --include \
964 | --includ | --inclu | --incl | --inc)
965 ac_prev=includedir ;;
966 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
967 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
970 -infodir | --infodir | --infodi | --infod | --info | --inf)
971 ac_prev=infodir ;;
972 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
975 -libdir | --libdir | --libdi | --libd)
976 ac_prev=libdir ;;
977 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979
980 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
981 | --libexe | --libex | --libe)
982 ac_prev=libexecdir ;;
983 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
984 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000987 -localedir | --localedir | --localedi | --localed | --locale)
988 ac_prev=localedir ;;
989 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
990 localedir=$ac_optarg ;;
991
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994 ac_prev=localstatedir ;;
995 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000996 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
999 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1000 ac_prev=mandir ;;
1001 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 # Obsolete; use --without-fp.
1006 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 no_create=yes ;;
1011
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1013 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1014 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1017 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1018 | --oldin | --oldi | --old | --ol | --o)
1019 ac_prev=oldincludedir ;;
1020 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1021 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1022 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1026 ac_prev=prefix ;;
1027 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1031 | --program-pre | --program-pr | --program-p)
1032 ac_prev=program_prefix ;;
1033 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1034 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
1037 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1038 | --program-suf | --program-su | --program-s)
1039 ac_prev=program_suffix ;;
1040 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1041 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
1044 -program-transform-name | --program-transform-name \
1045 | --program-transform-nam | --program-transform-na \
1046 | --program-transform-n | --program-transform- \
1047 | --program-transform | --program-transfor \
1048 | --program-transfo | --program-transf \
1049 | --program-trans | --program-tran \
1050 | --progr-tra | --program-tr | --program-t)
1051 ac_prev=program_transform_name ;;
1052 -program-transform-name=* | --program-transform-name=* \
1053 | --program-transform-nam=* | --program-transform-na=* \
1054 | --program-transform-n=* | --program-transform-=* \
1055 | --program-transform=* | --program-transfor=* \
1056 | --program-transfo=* | --program-transf=* \
1057 | --program-trans=* | --program-tran=* \
1058 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1062 ac_prev=pdfdir ;;
1063 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1064 pdfdir=$ac_optarg ;;
1065
1066 -psdir | --psdir | --psdi | --psd | --ps)
1067 ac_prev=psdir ;;
1068 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1069 psdir=$ac_optarg ;;
1070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1072 | -silent | --silent | --silen | --sile | --sil)
1073 silent=yes ;;
1074
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1076 ac_prev=sbindir ;;
1077 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1078 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
1081 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1082 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1083 | --sharedst | --shareds | --shared | --share | --shar \
1084 | --sha | --sh)
1085 ac_prev=sharedstatedir ;;
1086 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1087 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1088 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1089 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092 -site | --site | --sit)
1093 ac_prev=site ;;
1094 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1098 ac_prev=srcdir ;;
1099 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1103 | --syscon | --sysco | --sysc | --sys | --sy)
1104 ac_prev=sysconfdir ;;
1105 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1106 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1115 verbose=yes ;;
1116
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 -version | --version | --versio | --versi | --vers | -V)
1118 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001124 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt_orig=$ac_useropt
1126 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1127 case $ac_user_opts in
1128 *"
1129"with_$ac_useropt"
1130"*) ;;
1131 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1132 ac_unrecognized_sep=', ';;
1133 esac
1134 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
1136 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001139 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001140 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001141 ac_useropt_orig=$ac_useropt
1142 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143 case $ac_user_opts in
1144 *"
1145"with_$ac_useropt"
1146"*) ;;
1147 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1148 ac_unrecognized_sep=', ';;
1149 esac
1150 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152 --x)
1153 # Obsolete; use --with-x.
1154 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1157 | --x-incl | --x-inc | --x-in | --x-i)
1158 ac_prev=x_includes ;;
1159 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1160 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
1163 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1164 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1165 ac_prev=x_libraries ;;
1166 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1167 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001170 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1171Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 ;;
1173
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 *=*)
1175 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1176 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 case $ac_envvar in #(
1178 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001179 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001180 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 export $ac_envvar ;;
1183
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Gregory P. Smith69140482012-01-16 02:05:55 -08001189 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 ;;
1191
1192 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001193done
1194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001197 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198fi
1199
Matthias Kloseb9621712010-04-24 17:59:49 +00001200if test -n "$ac_unrecognized_opts"; then
1201 case $enable_option_checking in
1202 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001203 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1205 esac
1206fi
1207
1208# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1210 datadir sysconfdir sharedstatedir localstatedir includedir \
1211 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1212 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001214 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 # Remove trailing slashes.
1216 case $ac_val in
1217 */ )
1218 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1219 eval $ac_var=\$ac_val;;
1220 esac
1221 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223 [\\/$]* | ?:[\\/]* ) continue;;
1224 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001226 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001227done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228
Martin v. Löwis11437992002-04-12 09:54:03 +00001229# There might be people who depend on the old broken behavior: `$host'
1230# used to hold the argument of --host etc.
1231# FIXME: To remove some day.
1232build=$build_alias
1233host=$host_alias
1234target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235
Martin v. Löwis11437992002-04-12 09:54:03 +00001236# FIXME: To remove some day.
1237if test "x$host_alias" != x; then
1238 if test "x$build_alias" = x; then
1239 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001240 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1241 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 elif test "x$build_alias" != "x$host_alias"; then
1243 cross_compiling=yes
1244 fi
1245fi
1246
1247ac_tool_prefix=
1248test -n "$host_alias" && ac_tool_prefix=$host_alias-
1249
1250test "$silent" = yes && exec 6>/dev/null
1251
Guido van Rossum627b2d71993-12-24 10:39:16 +00001252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253ac_pwd=`pwd` && test -n "$ac_pwd" &&
1254ac_ls_di=`ls -di .` &&
1255ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001256 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001258 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259
1260
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261# Find the source files, if location was not specified.
1262if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 ac_confdir=`$as_dirname -- "$as_myself" ||
1266$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1267 X"$as_myself" : 'X\(//\)[^/]' \| \
1268 X"$as_myself" : 'X\(//\)$' \| \
1269 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1270$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)[^/].*/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\/\)$/{
1280 s//\1/
1281 q
1282 }
1283 /^X\(\/\).*/{
1284 s//\1/
1285 q
1286 }
1287 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290 srcdir=..
1291 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292else
1293 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295if test ! -r "$srcdir/$ac_unique_file"; then
1296 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001297 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1300ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001301 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 pwd)`
1303# When building in place, set srcdir=.
1304if test "$ac_abs_confdir" = "$ac_pwd"; then
1305 srcdir=.
1306fi
1307# Remove unnecessary trailing slashes from srcdir.
1308# Double slashes in file names in object file debugging info
1309# mess up M-x gdb in Emacs.
1310case $srcdir in
1311*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1312esac
1313for ac_var in $ac_precious_vars; do
1314 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1315 eval ac_env_${ac_var}_value=\$${ac_var}
1316 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1317 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1318done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320#
1321# Report the --help message.
1322#
1323if test "$ac_init_help" = "long"; then
1324 # Omit some internal or obsolete options to make the list less imposing.
1325 # This message is too long to be a string in the A/UX 3.1 sh.
1326 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001327\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001328
1329Usage: $0 [OPTION]... [VAR=VALUE]...
1330
1331To assign environment variables (e.g., CC, CFLAGS...), specify them as
1332VAR=VALUE. See below for descriptions of some of the useful variables.
1333
1334Defaults for the options are specified in brackets.
1335
1336Configuration:
1337 -h, --help display this help and exit
1338 --help=short display options specific to this package
1339 --help=recursive display the short help of all the included packages
1340 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001341 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001342 --cache-file=FILE cache test results in FILE [disabled]
1343 -C, --config-cache alias for \`--cache-file=config.cache'
1344 -n, --no-create do not create output files
1345 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1346
Martin v. Löwis11437992002-04-12 09:54:03 +00001347Installation directories:
1348 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001350 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001351 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353By default, \`make install' will install all the files in
1354\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1355an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1356for instance \`--prefix=\$HOME'.
1357
1358For better control, use the options below.
1359
1360Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001361 --bindir=DIR user executables [EPREFIX/bin]
1362 --sbindir=DIR system admin executables [EPREFIX/sbin]
1363 --libexecdir=DIR program executables [EPREFIX/libexec]
1364 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1365 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1366 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1367 --libdir=DIR object code libraries [EPREFIX/lib]
1368 --includedir=DIR C header files [PREFIX/include]
1369 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1370 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1371 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1372 --infodir=DIR info documentation [DATAROOTDIR/info]
1373 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1374 --mandir=DIR man documentation [DATAROOTDIR/man]
1375 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1376 --htmldir=DIR html documentation [DOCDIR]
1377 --dvidir=DIR dvi documentation [DOCDIR]
1378 --pdfdir=DIR pdf documentation [DOCDIR]
1379 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001380_ACEOF
1381
1382 cat <<\_ACEOF
1383_ACEOF
1384fi
1385
1386if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001387 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001388 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001389 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 cat <<\_ACEOF
1391
1392Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001393 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1395 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001396 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001397 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --enable-framework[=INSTALLDIR]
1399 Build (MacOSX|Darwin) framework
1400 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001401 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001402 --enable-loadable-sqlite-extensions
1403 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001404 --enable-ipv6 Enable ipv6 (with ipv4) support
1405 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001406 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001407 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409Optional Packages:
1410 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1411 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001412 --with-universal-archs=ARCH
1413 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001414 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001415 --with-framework-name=FRAMEWORK
1416 specify an alternate name of the framework built
1417 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001419 --with-cxx-main=<compiler>
1420 compile main() and link python executable with C++
1421 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with-suffix=.exe set executable suffix
1423 --with-pydebug build with Py_DEBUG defined
1424 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001425 --with-system-expat build pyexpat module using an installed expat
1426 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001427 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001428 --with-dbmliborder=db1:db2:...
1429 order to check db backends for dbm. Valid value is a
1430 colon separated string with the backend names
1431 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with-signal-module disable/enable signal module
1433 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1434 --with(out)-threads[=DIRECTORY]
1435 disable/enable thread support
1436 --with(out)-thread[=DIRECTORY]
1437 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001439 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001441 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --with-fpectl enable SIGFPE catching
1443 --with-libm=STRING math library
1444 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001445 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001446 --with(out)-computed-gotos
1447 Use computed gotos in evaluation loop (enabled by
1448 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001449
1450Some influential environment variables:
1451 CC C compiler command
1452 CFLAGS C compiler flags
1453 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1454 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001455 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 CPP C preprocessor
1459
1460Use these variables to override the choices made by `configure' or to help
1461it to find libraries and programs with nonstandard names/locations.
1462
Georg Brandle2e15612009-05-20 18:25:10 +00001463Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001465ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001466fi
1467
1468if test "$ac_init_help" = "recursive"; then
1469 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 test -d "$ac_dir" ||
1472 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1473 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ac_builddir=.
1475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476case "$ac_dir" in
1477.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1478*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001479 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482 case $ac_top_builddir_sub in
1483 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1484 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1485 esac ;;
1486esac
1487ac_abs_top_builddir=$ac_pwd
1488ac_abs_builddir=$ac_pwd$ac_dir_suffix
1489# for backward compatibility:
1490ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001491
1492case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 ac_top_srcdir=$ac_top_builddir_sub
1496 ac_abs_top_srcdir=$ac_pwd ;;
1497 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499 ac_top_srcdir=$srcdir
1500 ac_abs_top_srcdir=$srcdir ;;
1501 *) # Relative name.
1502 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1503 ac_top_srcdir=$ac_top_build_prefix$srcdir
1504 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001505esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001508 cd "$ac_dir" || { ac_status=$?; continue; }
1509 # Check for guested configure.
1510 if test -f "$ac_srcdir/configure.gnu"; then
1511 echo &&
1512 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1513 elif test -f "$ac_srcdir/configure"; then
1514 echo &&
1515 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 fi || ac_status=$?
1519 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 done
1521fi
1522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001524if $ac_init_version; then
1525 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001526python configure 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -08001527generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001528
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001529Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530This configure script is free software; the Free Software Foundation
1531gives unlimited permission to copy, distribute and modify it.
1532_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001535
1536## ------------------------ ##
1537## Autoconf initialization. ##
1538## ------------------------ ##
1539
1540# ac_fn_c_try_compile LINENO
1541# --------------------------
1542# Try to compile conftest.$ac_ext, and return whether this succeeded.
1543ac_fn_c_try_compile ()
1544{
1545 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1546 rm -f conftest.$ac_objext
1547 if { { ac_try="$ac_compile"
1548case "(($ac_try" in
1549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1550 *) ac_try_echo=$ac_try;;
1551esac
1552eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1553$as_echo "$ac_try_echo"; } >&5
1554 (eval "$ac_compile") 2>conftest.err
1555 ac_status=$?
1556 if test -s conftest.err; then
1557 grep -v '^ *+' conftest.err >conftest.er1
1558 cat conftest.er1 >&5
1559 mv -f conftest.er1 conftest.err
1560 fi
1561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1562 test $ac_status = 0; } && {
1563 test -z "$ac_c_werror_flag" ||
1564 test ! -s conftest.err
1565 } && test -s conftest.$ac_objext; then :
1566 ac_retval=0
1567else
1568 $as_echo "$as_me: failed program was:" >&5
1569sed 's/^/| /' conftest.$ac_ext >&5
1570
1571 ac_retval=1
1572fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001573 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 as_fn_set_status $ac_retval
1575
1576} # ac_fn_c_try_compile
1577
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001578# ac_fn_c_try_link LINENO
1579# -----------------------
1580# Try to link conftest.$ac_ext, and return whether this succeeded.
1581ac_fn_c_try_link ()
1582{
1583 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1584 rm -f conftest.$ac_objext conftest$ac_exeext
1585 if { { ac_try="$ac_link"
1586case "(($ac_try" in
1587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1588 *) ac_try_echo=$ac_try;;
1589esac
1590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1591$as_echo "$ac_try_echo"; } >&5
1592 (eval "$ac_link") 2>conftest.err
1593 ac_status=$?
1594 if test -s conftest.err; then
1595 grep -v '^ *+' conftest.err >conftest.er1
1596 cat conftest.er1 >&5
1597 mv -f conftest.er1 conftest.err
1598 fi
1599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1600 test $ac_status = 0; } && {
1601 test -z "$ac_c_werror_flag" ||
1602 test ! -s conftest.err
1603 } && test -s conftest$ac_exeext && {
1604 test "$cross_compiling" = yes ||
1605 $as_test_x conftest$ac_exeext
1606 }; then :
1607 ac_retval=0
1608else
1609 $as_echo "$as_me: failed program was:" >&5
1610sed 's/^/| /' conftest.$ac_ext >&5
1611
1612 ac_retval=1
1613fi
1614 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1615 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1616 # interfere with the next link command; also delete a directory that is
1617 # left behind by Apple's compiler. We do this before executing the actions.
1618 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001619 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001620 as_fn_set_status $ac_retval
1621
1622} # ac_fn_c_try_link
1623
Matthias Kloseb9621712010-04-24 17:59:49 +00001624# ac_fn_c_try_cpp LINENO
1625# ----------------------
1626# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1627ac_fn_c_try_cpp ()
1628{
1629 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1630 if { { ac_try="$ac_cpp conftest.$ac_ext"
1631case "(($ac_try" in
1632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1633 *) ac_try_echo=$ac_try;;
1634esac
1635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1636$as_echo "$ac_try_echo"; } >&5
1637 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1638 ac_status=$?
1639 if test -s conftest.err; then
1640 grep -v '^ *+' conftest.err >conftest.er1
1641 cat conftest.er1 >&5
1642 mv -f conftest.er1 conftest.err
1643 fi
1644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001645 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001646 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1647 test ! -s conftest.err
1648 }; then :
1649 ac_retval=0
1650else
1651 $as_echo "$as_me: failed program was:" >&5
1652sed 's/^/| /' conftest.$ac_ext >&5
1653
1654 ac_retval=1
1655fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001656 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001657 as_fn_set_status $ac_retval
1658
1659} # ac_fn_c_try_cpp
1660
1661# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1662# -------------------------------------------------------
1663# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1664# the include files in INCLUDES and setting the cache variable VAR
1665# accordingly.
1666ac_fn_c_check_header_mongrel ()
1667{
1668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith69140482012-01-16 02:05:55 -08001669 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001672if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 $as_echo_n "(cached) " >&6
1674fi
1675eval ac_res=\$$3
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1677$as_echo "$ac_res" >&6; }
1678else
1679 # Is the header compilable?
1680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1681$as_echo_n "checking $2 usability... " >&6; }
1682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1683/* end confdefs.h. */
1684$4
1685#include <$2>
1686_ACEOF
1687if ac_fn_c_try_compile "$LINENO"; then :
1688 ac_header_compiler=yes
1689else
1690 ac_header_compiler=no
1691fi
1692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1694$as_echo "$ac_header_compiler" >&6; }
1695
1696# Is the header present?
1697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1698$as_echo_n "checking $2 presence... " >&6; }
1699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1700/* end confdefs.h. */
1701#include <$2>
1702_ACEOF
1703if ac_fn_c_try_cpp "$LINENO"; then :
1704 ac_header_preproc=yes
1705else
1706 ac_header_preproc=no
1707fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001708rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1710$as_echo "$ac_header_preproc" >&6; }
1711
1712# So? What about this header?
1713case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1714 yes:no: )
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1716$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1718$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1719 ;;
1720 no:yes:* )
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1722$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1724$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1726$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1728$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1730$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001731( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001732## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001733## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 ) | sed "s/^/$as_me: WARNING: /" >&2
1735 ;;
1736esac
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1738$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001739if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 $as_echo_n "(cached) " >&6
1741else
1742 eval "$3=\$ac_header_compiler"
1743fi
1744eval ac_res=\$$3
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1746$as_echo "$ac_res" >&6; }
1747fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001748 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001749
1750} # ac_fn_c_check_header_mongrel
1751
1752# ac_fn_c_try_run LINENO
1753# ----------------------
1754# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1755# that executables *can* be run.
1756ac_fn_c_try_run ()
1757{
1758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759 if { { ac_try="$ac_link"
1760case "(($ac_try" in
1761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762 *) ac_try_echo=$ac_try;;
1763esac
1764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765$as_echo "$ac_try_echo"; } >&5
1766 (eval "$ac_link") 2>&5
1767 ac_status=$?
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1770 { { case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_try") 2>&5
1777 ac_status=$?
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; }; }; then :
1780 ac_retval=0
1781else
1782 $as_echo "$as_me: program exited with status $ac_status" >&5
1783 $as_echo "$as_me: failed program was:" >&5
1784sed 's/^/| /' conftest.$ac_ext >&5
1785
1786 ac_retval=$ac_status
1787fi
1788 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001789 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 as_fn_set_status $ac_retval
1791
1792} # ac_fn_c_try_run
1793
1794# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1795# -------------------------------------------------------
1796# Tests whether HEADER exists and can be compiled using the include files in
1797# INCLUDES, setting the cache variable VAR accordingly.
1798ac_fn_c_check_header_compile ()
1799{
1800 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1802$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001803if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001804 $as_echo_n "(cached) " >&6
1805else
1806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808$4
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_compile "$LINENO"; then :
1812 eval "$3=yes"
1813else
1814 eval "$3=no"
1815fi
1816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1817fi
1818eval ac_res=\$$3
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1820$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001821 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001822
1823} # ac_fn_c_check_header_compile
1824
Matthias Kloseb9621712010-04-24 17:59:49 +00001825# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1826# -------------------------------------------
1827# Tests whether TYPE exists after having included INCLUDES, setting cache
1828# variable VAR accordingly.
1829ac_fn_c_check_type ()
1830{
1831 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1833$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001834if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001835 $as_echo_n "(cached) " >&6
1836else
1837 eval "$3=no"
1838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840$4
1841int
1842main ()
1843{
1844if (sizeof ($2))
1845 return 0;
1846 ;
1847 return 0;
1848}
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1852/* end confdefs.h. */
1853$4
1854int
1855main ()
1856{
1857if (sizeof (($2)))
1858 return 0;
1859 ;
1860 return 0;
1861}
1862_ACEOF
1863if ac_fn_c_try_compile "$LINENO"; then :
1864
1865else
1866 eval "$3=yes"
1867fi
1868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1869fi
1870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1871fi
1872eval ac_res=\$$3
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1874$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001876
1877} # ac_fn_c_check_type
1878
1879# ac_fn_c_find_uintX_t LINENO BITS VAR
1880# ------------------------------------
1881# Finds an unsigned integer type with width BITS, setting cache variable VAR
1882# accordingly.
1883ac_fn_c_find_uintX_t ()
1884{
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1887$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001888if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001889 $as_echo_n "(cached) " >&6
1890else
1891 eval "$3=no"
1892 # Order is important - never check a type that is potentially smaller
1893 # than half of the expected target width.
1894 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1895 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$ac_includes_default
1899int
1900main ()
1901{
1902static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1903test_array [0] = 0
1904
1905 ;
1906 return 0;
1907}
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 case $ac_type in #(
1911 uint$2_t) :
1912 eval "$3=yes" ;; #(
1913 *) :
1914 eval "$3=\$ac_type" ;;
1915esac
1916fi
1917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001918 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920else
1921 break
1922fi
1923 done
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930} # ac_fn_c_find_uintX_t
1931
1932# ac_fn_c_find_intX_t LINENO BITS VAR
1933# -----------------------------------
1934# Finds a signed integer type with width BITS, setting cache variable VAR
1935# accordingly.
1936ac_fn_c_find_intX_t ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1940$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001941if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942 $as_echo_n "(cached) " >&6
1943else
1944 eval "$3=no"
1945 # Order is important - never check a type that is potentially smaller
1946 # than half of the expected target width.
1947 for ac_type in int$2_t 'int' 'long int' \
1948 'long long int' 'short int' 'signed char'; do
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001952 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001953int
1954main ()
1955{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001956static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001957test_array [0] = 0
1958
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963if ac_fn_c_try_compile "$LINENO"; then :
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001967 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001968int
1969main ()
1970{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001971static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001972 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1973test_array [0] = 0
1974
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980
1981else
1982 case $ac_type in #(
1983 int$2_t) :
1984 eval "$3=yes" ;; #(
1985 *) :
1986 eval "$3=\$ac_type" ;;
1987esac
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001992 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994else
1995 break
1996fi
1997 done
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004} # ac_fn_c_find_intX_t
2005
2006# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2007# --------------------------------------------
2008# Tries to find the compile-time value of EXPR in a program that includes
2009# INCLUDES, setting VAR accordingly. Returns whether the value could be
2010# computed
2011ac_fn_c_compute_int ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 if test "$cross_compiling" = yes; then
2015 # Depending upon the size, compute the lo and hi bounds.
2016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) >= 0)];
2023test_array [0] = 0
2024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_lo=0 ac_mid=0
2031 while :; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$4
2035int
2036main ()
2037{
2038static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2039test_array [0] = 0
2040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=$ac_mid; break
2047else
2048 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2049 if test $ac_lo -le $ac_mid; then
2050 ac_lo= ac_hi=
2051 break
2052 fi
2053 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2054fi
2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2056 done
2057else
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) < 0)];
2065test_array [0] = 0
2066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_hi=-1 ac_mid=-1
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2081test_array [0] = 0
2082
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087if ac_fn_c_try_compile "$LINENO"; then :
2088 ac_lo=$ac_mid; break
2089else
2090 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2091 if test $ac_mid -le $ac_hi; then
2092 ac_lo= ac_hi=
2093 break
2094 fi
2095 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098 done
2099else
2100 ac_lo= ac_hi=
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103fi
2104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105# Binary search between lo and hi bounds.
2106while test "x$ac_lo" != "x$ac_hi"; do
2107 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2115test_array [0] = 0
2116
2117 ;
2118 return 0;
2119}
2120_ACEOF
2121if ac_fn_c_try_compile "$LINENO"; then :
2122 ac_hi=$ac_mid
2123else
2124 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127done
2128case $ac_lo in #((
2129?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2130'') ac_retval=1 ;;
2131esac
2132 else
2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134/* end confdefs.h. */
2135$4
2136static long int longval () { return $2; }
2137static unsigned long int ulongval () { return $2; }
2138#include <stdio.h>
2139#include <stdlib.h>
2140int
2141main ()
2142{
2143
2144 FILE *f = fopen ("conftest.val", "w");
2145 if (! f)
2146 return 1;
2147 if (($2) < 0)
2148 {
2149 long int i = longval ();
2150 if (i != ($2))
2151 return 1;
2152 fprintf (f, "%ld", i);
2153 }
2154 else
2155 {
2156 unsigned long int i = ulongval ();
2157 if (i != ($2))
2158 return 1;
2159 fprintf (f, "%lu", i);
2160 }
2161 /* Do not output a trailing newline, as this causes \r\n confusion
2162 on some platforms. */
2163 return ferror (f) || fclose (f) != 0;
2164
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_run "$LINENO"; then :
2170 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2171else
2172 ac_retval=1
2173fi
2174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2175 conftest.$ac_objext conftest.beam conftest.$ac_ext
2176rm -f conftest.val
2177
2178 fi
Gregory P. Smith69140482012-01-16 02:05:55 -08002179 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 as_fn_set_status $ac_retval
2181
2182} # ac_fn_c_compute_int
2183
2184# ac_fn_c_check_func LINENO FUNC VAR
2185# ----------------------------------
2186# Tests whether FUNC exists, setting the cache variable VAR accordingly
2187ac_fn_c_check_func ()
2188{
2189 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2191$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002192if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002193 $as_echo_n "(cached) " >&6
2194else
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196/* end confdefs.h. */
2197/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2198 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2199#define $2 innocuous_$2
2200
2201/* System header to define __stub macros and hopefully few prototypes,
2202 which can conflict with char $2 (); below.
2203 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2204 <limits.h> exists even on freestanding compilers. */
2205
2206#ifdef __STDC__
2207# include <limits.h>
2208#else
2209# include <assert.h>
2210#endif
2211
2212#undef $2
2213
2214/* Override any GCC internal prototype to avoid an error.
2215 Use char because int might match the return type of a GCC
2216 builtin and then its argument prototype would still apply. */
2217#ifdef __cplusplus
2218extern "C"
2219#endif
2220char $2 ();
2221/* The GNU C library defines this for functions which it implements
2222 to always fail with ENOSYS. Some functions are actually named
2223 something starting with __ and the normal name is an alias. */
2224#if defined __stub_$2 || defined __stub___$2
2225choke me
2226#endif
2227
2228int
2229main ()
2230{
2231return $2 ();
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236if ac_fn_c_try_link "$LINENO"; then :
2237 eval "$3=yes"
2238else
2239 eval "$3=no"
2240fi
2241rm -f core conftest.err conftest.$ac_objext \
2242 conftest$ac_exeext conftest.$ac_ext
2243fi
2244eval ac_res=\$$3
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2246$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002247 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002248
2249} # ac_fn_c_check_func
2250
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002251# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2252# ---------------------------------------------
2253# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2254# accordingly.
2255ac_fn_c_check_decl ()
2256{
2257 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258 as_decl_name=`echo $2|sed 's/ *(.*//'`
2259 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2261$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2262if eval \${$3+:} false; then :
2263 $as_echo_n "(cached) " >&6
2264else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
2267$4
2268int
2269main ()
2270{
2271#ifndef $as_decl_name
2272#ifdef __cplusplus
2273 (void) $as_decl_use;
2274#else
2275 (void) $as_decl_name;
2276#endif
2277#endif
2278
2279 ;
2280 return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_compile "$LINENO"; then :
2284 eval "$3=yes"
2285else
2286 eval "$3=no"
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289fi
2290eval ac_res=\$$3
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292$as_echo "$ac_res" >&6; }
2293 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2294
2295} # ac_fn_c_check_decl
2296
Matthias Kloseb9621712010-04-24 17:59:49 +00002297# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2298# ----------------------------------------------------
2299# Tries to find if the field MEMBER exists in type AGGR, after including
2300# INCLUDES, setting cache variable VAR accordingly.
2301ac_fn_c_check_member ()
2302{
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2305$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002306if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$5
2312int
2313main ()
2314{
2315static $2 ac_aggr;
2316if (ac_aggr.$3)
2317return 0;
2318 ;
2319 return 0;
2320}
2321_ACEOF
2322if ac_fn_c_try_compile "$LINENO"; then :
2323 eval "$4=yes"
2324else
2325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h. */
2327$5
2328int
2329main ()
2330{
2331static $2 ac_aggr;
2332if (sizeof ac_aggr.$3)
2333return 0;
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$4=yes"
2340else
2341 eval "$4=no"
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347eval ac_res=\$$4
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002351
2352} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002353cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002354This file contains any messages produced by compilers while
2355running configure, to aid debugging if configure makes a mistake.
2356
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002357It was created by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -08002358generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002359
2360 $ $0 $@
2361
2362_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002364{
2365cat <<_ASUNAME
2366## --------- ##
2367## Platform. ##
2368## --------- ##
2369
2370hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2371uname -m = `(uname -m) 2>/dev/null || echo unknown`
2372uname -r = `(uname -r) 2>/dev/null || echo unknown`
2373uname -s = `(uname -s) 2>/dev/null || echo unknown`
2374uname -v = `(uname -v) 2>/dev/null || echo unknown`
2375
2376/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2377/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2378
2379/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2380/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2381/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002383/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2384/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2385/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2386
2387_ASUNAME
2388
2389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2390for as_dir in $PATH
2391do
2392 IFS=$as_save_IFS
2393 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002394 $as_echo "PATH: $as_dir"
2395 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002397
2398} >&5
2399
2400cat >&5 <<_ACEOF
2401
2402
2403## ----------- ##
2404## Core tests. ##
2405## ----------- ##
2406
2407_ACEOF
2408
2409
2410# Keep a trace of the command line.
2411# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002413# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002414# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002415ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002416ac_configure_args0=
2417ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002418ac_must_keep_next=false
2419for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002420do
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 for ac_arg
2422 do
2423 case $ac_arg in
2424 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2425 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2426 | -silent | --silent | --silen | --sile | --sil)
2427 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 esac
2431 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002434 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002436 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002438 case $ac_arg in
2439 *=* | --config-cache | -C | -disable-* | --disable-* \
2440 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2441 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2442 | -with-* | --with-* | -without-* | --without-* | --x)
2443 case "$ac_configure_args0 " in
2444 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2445 esac
2446 ;;
2447 -* ) ac_must_keep_next=true ;;
2448 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002450 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 ;;
2452 esac
2453 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002454done
Matthias Kloseb9621712010-04-24 17:59:49 +00002455{ ac_configure_args0=; unset ac_configure_args0;}
2456{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002457
2458# When interrupted or exit'd, cleanup temporary files, and complete
2459# config.log. We remove comments because anyway the quotes in there
2460# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461# WARNING: Use '\'' to represent an apostrophe within the trap.
2462# 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 +00002463trap 'exit_status=$?
2464 # Save into config.log some information that might help in debugging.
2465 {
2466 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002467
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002468 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002469## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002470## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 echo
2472 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473(
2474 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2475 eval ac_val=\$$ac_var
2476 case $ac_val in #(
2477 *${as_nl}*)
2478 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2480$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac
2482 case $ac_var in #(
2483 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002484 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2485 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac ;;
2487 esac
2488 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2491 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 "s/'\''/'\''\\\\'\'''\''/g;
2494 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2495 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002496 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002498 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac |
2500 sort
2501)
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002503
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002504 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002505## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002506## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 echo
2508 for ac_var in $ac_subst_vars
2509 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517
2518 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002519 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002521## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002522 echo
2523 for ac_var in $ac_subst_files
2524 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 eval ac_val=\$$ac_var
2526 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 done | sort
2531 echo
2532 fi
2533
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002535 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002536## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002537## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 echo
2541 fi
2542 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 $as_echo "$as_me: caught signal $ac_signal"
2544 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 rm -f core *.core core.conftest.* &&
2547 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002550for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002551 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002552done
2553ac_signal=0
2554
2555# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558$as_echo "/* confdefs.h */" > confdefs.h
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560# Predefined preprocessor variables.
2561
2562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_NAME "$PACKAGE_NAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_VERSION "$PACKAGE_VERSION"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_STRING "$PACKAGE_STRING"
2576_ACEOF
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2580_ACEOF
2581
Matthias Kloseb9621712010-04-24 17:59:49 +00002582cat >>confdefs.h <<_ACEOF
2583#define PACKAGE_URL "$PACKAGE_URL"
2584_ACEOF
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586
2587# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002588# Prefer an explicitly selected file to automatically selected ones.
2589ac_site_file1=NONE
2590ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002592 # We do not want a PATH search for config.site.
2593 case $CONFIG_SITE in #((
2594 -*) ac_site_file1=./$CONFIG_SITE;;
2595 */*) ac_site_file1=$CONFIG_SITE;;
2596 *) ac_site_file1=./$CONFIG_SITE;;
2597 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 ac_site_file1=$prefix/share/config.site
2600 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601else
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 ac_site_file1=$ac_default_prefix/share/config.site
2603 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002605for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606do
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 test "x$ac_site_file" = xNONE && continue
2608 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2610$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002612 . "$ac_site_file" \
2613 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2615as_fn_error $? "failed to load site script $ac_site_file
Gregory P. Smith69140482012-01-16 02:05:55 -08002616See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617 fi
2618done
2619
2620if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 # Some versions of bash will fail to source /dev/null (special files
2622 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2623 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2625$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2628 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 esac
2630 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002631else
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2633$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 >$cache_file
2635fi
2636
2637# Check that the precious variables saved in the cache have kept the same
2638# value.
2639ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2642 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2644 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 case $ac_old_set,$ac_new_set in
2646 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2648$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 +00002649 ac_cache_corrupted=: ;;
2650 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2652$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 ac_cache_corrupted=: ;;
2654 ,);;
2655 *)
2656 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 # differences in whitespace do not lead to failure.
2658 ac_old_val_w=`echo x $ac_old_val`
2659 ac_new_val_w=`echo x $ac_new_val`
2660 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2662$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2663 ac_cache_corrupted=:
2664 else
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2666$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2667 eval $ac_var=\$ac_old_val
2668 fi
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2670$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2672$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 fi;;
2674 esac
2675 # Pass precious variables to config.status.
2676 if test "$ac_new_set" = set; then
2677 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 *) ac_arg=$ac_var=$ac_new_val ;;
2680 esac
2681 case " $ac_configure_args " in
2682 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 esac
2685 fi
2686done
2687if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002688 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2691$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002692 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002694## -------------------- ##
2695## Main body of script. ##
2696## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697
Guido van Rossum7f43da71994-08-01 12:15:30 +00002698ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2702ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002703
Guido van Rossum627b2d71993-12-24 10:39:16 +00002704
Michael W. Hudson54241132001-12-07 15:38:26 +00002705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002707
2708
Martin v. Löwis11437992002-04-12 09:54:03 +00002709
Benjamin Petersond23f8222009-04-05 19:13:16 +00002710if test "$prefix" != "/"; then
2711 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2712fi
2713
2714
Martin v. Löwis11437992002-04-12 09:54:03 +00002715
2716
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002717# We don't use PACKAGE_ variables, and they cause conflicts
2718# with other autoconf-based packages that include Python.h
2719grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2720rm confdefs.h
2721mv confdefs.h.new confdefs.h
2722
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002723
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002724VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002725
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002726# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002727
2728SOVERSION=1.0
2729
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002730# The later defininition of _XOPEN_SOURCE disables certain features
2731# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2732
Matthias Kloseb9621712010-04-24 17:59:49 +00002733$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002734
2735
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2738# them.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002741
2742
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002743# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2744# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2745# them.
2746
Matthias Kloseb9621712010-04-24 17:59:49 +00002747$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002748
2749
Martin v. Löwisd6320502004-08-12 13:45:08 +00002750# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2751# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2752
Matthias Kloseb9621712010-04-24 17:59:49 +00002753$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002754
2755
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002756# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2757# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2758# them.
2759
Matthias Kloseb9621712010-04-24 17:59:49 +00002760$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002761
2762
2763
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002764define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002765
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002766# Arguments passed to configure.
2767
2768CONFIG_ARGS="$ac_configure_args"
2769
Matthias Kloseb9621712010-04-24 17:59:49 +00002770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2771$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002772# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002773if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775 case $enableval in
2776 yes)
2777 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778 if test ! -d "${enableval}"
2779 then
2780 enableval=/
2781 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002782 ;;
2783 esac
2784 case $enableval in
2785 no)
2786 UNIVERSALSDK=
2787 enable_universalsdk=
2788 ;;
2789 *)
2790 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791 if test ! -d "${UNIVERSALSDK}"
2792 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002793 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002795 ;;
2796 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002797
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002798
Thomas Wouters477c8d52006-05-27 19:21:47 +00002799else
2800
2801 UNIVERSALSDK=
2802 enable_universalsdk=
2803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002804fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002805
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002806if test -n "${UNIVERSALSDK}"
2807then
Matthias Kloseb9621712010-04-24 17:59:49 +00002808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2809$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002810else
Matthias Kloseb9621712010-04-24 17:59:49 +00002811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2812$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002813fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002815
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002816
2817
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002818UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002819
Matthias Kloseb9621712010-04-24 17:59:49 +00002820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2821$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002822
2823# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002824if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002825 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2827$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002828 UNIVERSAL_ARCHS="$withval"
2829
2830else
2831
Matthias Kloseb9621712010-04-24 17:59:49 +00002832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2833$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002834
2835fi
2836
2837
2838
2839
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002840
2841# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002842if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002843 withval=$with_framework_name;
2844 PYTHONFRAMEWORK=${withval}
2845 PYTHONFRAMEWORKDIR=${withval}.framework
2846 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2847
2848else
2849
2850 PYTHONFRAMEWORK=Python
2851 PYTHONFRAMEWORKDIR=Python.framework
2852 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2853
2854fi
2855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002856# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002857if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002858 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002859 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002861 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 esac
2863 case $enableval in
2864 no)
2865 PYTHONFRAMEWORK=
2866 PYTHONFRAMEWORKDIR=no-framework
2867 PYTHONFRAMEWORKPREFIX=
2868 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869 FRAMEWORKINSTALLFIRST=
2870 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002871 FRAMEWORKALTINSTALLFIRST=
2872 FRAMEWORKALTINSTALLLAST=
2873 if test "x${prefix}" = "xNONE"; then
2874 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2875 else
2876 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2877 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002878 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002879 ;;
2880 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002881 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002882 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002883 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002884 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002885 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2886 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002887 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002888
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002889 if test "x${prefix}" = "xNONE" ; then
2890 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002891
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002892 else
2893 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2894 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002895
2896 case "${enableval}" in
2897 /System*)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 if test "${prefix}" = "NONE" ; then
2900 # See below
2901 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2902 fi
2903 ;;
2904
2905 /Library*)
2906 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2907 ;;
2908
2909 */Library/Frameworks)
2910 MDIR="`dirname "${enableval}"`"
2911 MDIR="`dirname "${MDIR}"`"
2912 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2913
2914 if test "${prefix}" = "NONE"; then
2915 # User hasn't specified the
2916 # --prefix option, but wants to install
2917 # the framework in a non-default location,
2918 # ensure that the compatibility links get
2919 # installed relative to that prefix as well
2920 # instead of in /usr/local.
2921 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2922 fi
2923 ;;
2924
2925 *)
2926 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2927 ;;
2928 esac
2929
Jack Jansen127e56e2001-09-11 14:41:54 +00002930 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002932 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002933 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002934 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002938 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2939
2940 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2941
Jack Jansene578a632001-08-15 01:27:14 +00002942 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Guido van Rossum563e7081996-09-10 18:20:48 +00002944else
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Jack Jansene578a632001-08-15 01:27:14 +00002946 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002947 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002948 PYTHONFRAMEWORKPREFIX=
2949 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002950 FRAMEWORKINSTALLFIRST=
2951 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002952 FRAMEWORKALTINSTALLFIRST=
2953 FRAMEWORKALTINSTALLLAST=
2954 if test "x${prefix}" = "xNONE" ; then
2955 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2956 else
2957 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2958 fi
Jack Jansene578a632001-08-15 01:27:14 +00002959 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962fi
2963
Thomas Wouters477c8d52006-05-27 19:21:47 +00002964
2965
Michael W. Hudson54241132001-12-07 15:38:26 +00002966
2967
2968
2969
Jack Jansene578a632001-08-15 01:27:14 +00002970
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002971
2972
2973
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002974
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002975
Jack Jansene578a632001-08-15 01:27:14 +00002976##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002977## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002978## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002979##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002980# Set name for machine-dependent library files
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2983$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002984if test -z "$MACHDEP"
2985then
Guido van Rossum563e7081996-09-10 18:20:48 +00002986 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002987 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002988 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002989 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002990 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002991 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002992 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002993 ac_md_system=`echo $ac_sys_system |
2994 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2995 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002996 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002997 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002998
Guido van Rossum07397971997-04-29 21:49:50 +00002999 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02003000 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003001 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003002 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003003 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003004 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003005 esac
3006fi
Guido van Rossum91922671997-10-09 20:24:13 +00003007
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003008# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3009# disable features if it is defined, without any means to access these
3010# features as extensions. For these systems, we skip the definition of
3011# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3012# some feature, make sure there is no alternative way to access this
3013# feature. Also, when using wildcards, make sure you have verified the
3014# need for not defining _XOPEN_SOURCE on all systems matching the
3015# wildcard, and that the wildcard does not include future systems
3016# (which may remove their limitations).
3017case $ac_sys_system/$ac_sys_release in
3018 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3019 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003020 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003021 # In addition, Stefan Krah confirms that issue #1244610 exists through
3022 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003023 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003024 define_xopen_source=no
3025 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3026 # also defined. This can be overridden by defining _BSD_SOURCE
3027 # As this has a different meaning on Linux, only define it on OpenBSD
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003030
3031 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003032 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003033 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3034 # also defined. This can be overridden by defining _BSD_SOURCE
3035 # As this has a different meaning on Linux, only define it on OpenBSD
3036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003038
3039 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003040 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3041 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3042 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003043 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 +00003044 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003045 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3046 # request to enable features supported by the standard as a request
3047 # to disable features not supported by the standard. The best way
3048 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3049 # entirely and define __EXTENSIONS__ instead.
3050 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003051 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003052 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3053 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003054 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003055 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003056 define_xopen_source=no;;
3057 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003058 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003059 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003060 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003061 # On FreeBSD 4, the math functions C89 does not cover are never defined
3062 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3063 FreeBSD/4.*)
3064 define_xopen_source=no;;
3065 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3066 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3067 # identifies itself as Darwin/7.*
3068 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3069 # disables platform specific features beyond repair.
3070 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3071 # has no effect, don't bother defining them
3072 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003073 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003074 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003075 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003076 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3077 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3078 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003079 AIX/4)
3080 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003081 AIX/5)
3082 if test `uname -r` -eq 1; then
3083 define_xopen_source=no
3084 fi
3085 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003086 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3087 # defining NI_NUMERICHOST.
3088 QNX/6.3.2)
3089 define_xopen_source=no
3090 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003091
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003092esac
3093
3094if test $define_xopen_source = yes
3095then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
Matthias Kloseb9621712010-04-24 17:59:49 +00003097$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003098
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003099
3100 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3101 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3102 # several APIs are not declared. Since this is also needed in some
3103 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003104
Matthias Kloseb9621712010-04-24 17:59:49 +00003105$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
3107
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003108
Matthias Kloseb9621712010-04-24 17:59:49 +00003109$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003110
3111
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003112fi
3113
Guido van Rossum91922671997-10-09 20:24:13 +00003114#
3115# SGI compilers allow the specification of the both the ABI and the
3116# ISA on the command line. Depending on the values of these switches,
3117# different and often incompatable code will be generated.
3118#
3119# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3120# thus supply support for various ABI/ISA combinations. The MACHDEP
3121# variable is also adjusted.
3122#
3123
3124if test ! -z "$SGI_ABI"
3125then
3126 CC="cc $SGI_ABI"
3127 LDFLAGS="$SGI_ABI $LDFLAGS"
3128 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3131$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003132
Jack Jansen6b08a402004-06-03 12:41:45 +00003133# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3134# it may influence the way we can build extensions, so distutils
3135# needs to check it
3136
Thomas Wouters477c8d52006-05-27 19:21:47 +00003137
Jack Jansen6b08a402004-06-03 12:41:45 +00003138CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003139EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003140
Matthias Kloseb9621712010-04-24 17:59:49 +00003141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3142$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003143ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3145$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003146
Guido van Rossum627b2d71993-12-24 10:39:16 +00003147# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003148
3149# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3150# for debug/optimization stuff. BASECFLAGS is for flags that are required
3151# just to get things to compile and link. Users are free to override OPT
3152# when running configure or make. The build should not break if they do.
3153# BASECFLAGS should generally not be messed with, however.
3154
3155# XXX shouldn't some/most/all of this code be merged with the stuff later
3156# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3158$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003161if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003163 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003164 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003165 without_gcc=yes;;
3166 yes) CC=gcc
3167 without_gcc=no;;
3168 *) CC=$withval
3169 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003170 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003171else
Martin v. Löwis11437992002-04-12 09:54:03 +00003172
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003173 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003174 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003175 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003176 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178fi
3179
Matthias Kloseb9621712010-04-24 17:59:49 +00003180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3181$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003182
Guido van Rossum8b131c51995-03-09 14:10:13 +00003183# If the user switches compilers, we can't believe the cache
3184if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3185then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003186 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003187(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003188fi
3189
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003190# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3191# when the compiler supports them, but we don't always want -O2, and
3192# we set -g later.
3193if test -z "$CFLAGS"; then
3194 CFLAGS=
3195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003196ac_ext=c
3197ac_cpp='$CPP $CPPFLAGS'
3198ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3199ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3200ac_compiler_gnu=$ac_cv_c_compiler_gnu
3201if test -n "$ac_tool_prefix"; then
3202 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3203set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3205$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003206if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003207 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003208else
3209 if test -n "$CC"; then
3210 ac_cv_prog_CC="$CC" # Let the user override the test.
3211else
Martin v. Löwis11437992002-04-12 09:54:03 +00003212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3213for as_dir in $PATH
3214do
3215 IFS=$as_save_IFS
3216 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218 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 +00003219 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003220 $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 +00003221 break 2
3222 fi
3223done
Matthias Kloseb9621712010-04-24 17:59:49 +00003224 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003226
Jack Jansendd19cf82001-12-06 22:36:17 +00003227fi
3228fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003229CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003230if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3232$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003233else
Matthias Kloseb9621712010-04-24 17:59:49 +00003234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3235$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003236fi
3237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238
Martin v. Löwis11437992002-04-12 09:54:03 +00003239fi
3240if test -z "$ac_cv_prog_CC"; then
3241 ac_ct_CC=$CC
3242 # Extract the first word of "gcc", so it can be a program name with args.
3243set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3245$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003246if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003248else
3249 if test -n "$ac_ct_CC"; then
3250 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3251else
3252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3253for as_dir in $PATH
3254do
3255 IFS=$as_save_IFS
3256 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258 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 +00003259 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 $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 +00003261 break 2
3262 fi
3263done
Matthias Kloseb9621712010-04-24 17:59:49 +00003264 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003266
3267fi
3268fi
3269ac_ct_CC=$ac_cv_prog_ac_ct_CC
3270if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3272$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003273else
Matthias Kloseb9621712010-04-24 17:59:49 +00003274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3275$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003276fi
3277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278 if test "x$ac_ct_CC" = x; then
3279 CC=""
3280 else
3281 case $cross_compiling:$ac_tool_warned in
3282yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285ac_tool_warned=yes ;;
3286esac
3287 CC=$ac_ct_CC
3288 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003289else
3290 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003291fi
3292
Jack Jansendd19cf82001-12-06 22:36:17 +00003293if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003294 if test -n "$ac_tool_prefix"; then
3295 # 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 +00003296set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3298$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003299if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003301else
3302 if test -n "$CC"; then
3303 ac_cv_prog_CC="$CC" # Let the user override the test.
3304else
Martin v. Löwis11437992002-04-12 09:54:03 +00003305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3306for as_dir in $PATH
3307do
3308 IFS=$as_save_IFS
3309 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311 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 +00003312 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 $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 +00003314 break 2
3315 fi
3316done
Matthias Kloseb9621712010-04-24 17:59:49 +00003317 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003318IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003319
3320fi
3321fi
3322CC=$ac_cv_prog_CC
3323if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3325$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003326else
Matthias Kloseb9621712010-04-24 17:59:49 +00003327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3328$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003329fi
3330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331
Martin v. Löwis11437992002-04-12 09:54:03 +00003332 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003333fi
3334if test -z "$CC"; then
3335 # Extract the first word of "cc", so it can be a program name with args.
3336set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3338$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003339if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003340 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003341else
3342 if test -n "$CC"; then
3343 ac_cv_prog_CC="$CC" # Let the user override the test.
3344else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003345 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3347for as_dir in $PATH
3348do
3349 IFS=$as_save_IFS
3350 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003351 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003352 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 +00003353 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3354 ac_prog_rejected=yes
3355 continue
3356 fi
3357 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003358 $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 +00003359 break 2
3360 fi
3361done
Matthias Kloseb9621712010-04-24 17:59:49 +00003362 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003363IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003364
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003365if test $ac_prog_rejected = yes; then
3366 # We found a bogon in the path, so make sure we never use it.
3367 set dummy $ac_cv_prog_CC
3368 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003369 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003370 # We chose a different compiler from the bogus one.
3371 # However, it has the same basename, so the bogon will be chosen
3372 # first if we set CC to just the basename; use the full file name.
3373 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003374 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375 fi
3376fi
3377fi
3378fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003379CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003380if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3382$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003383else
Matthias Kloseb9621712010-04-24 17:59:49 +00003384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3385$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003386fi
3387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388
Martin v. Löwis11437992002-04-12 09:54:03 +00003389fi
3390if test -z "$CC"; then
3391 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003392 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 do
3394 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3395set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3397$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003398if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003400else
3401 if test -n "$CC"; then
3402 ac_cv_prog_CC="$CC" # Let the user override the test.
3403else
Martin v. Löwis11437992002-04-12 09:54:03 +00003404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3405for as_dir in $PATH
3406do
3407 IFS=$as_save_IFS
3408 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410 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 +00003411 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003413 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003415done
Matthias Kloseb9621712010-04-24 17:59:49 +00003416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003418
3419fi
3420fi
3421CC=$ac_cv_prog_CC
3422if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3424$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003425else
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003428fi
3429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 test -n "$CC" && break
3432 done
3433fi
3434if test -z "$CC"; then
3435 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003437do
3438 # Extract the first word of "$ac_prog", so it can be a program name with args.
3439set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3441$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003442if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003443 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003444else
3445 if test -n "$ac_ct_CC"; then
3446 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3447else
3448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449for as_dir in $PATH
3450do
3451 IFS=$as_save_IFS
3452 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454 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 +00003455 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 $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 +00003457 break 2
3458 fi
3459done
Matthias Kloseb9621712010-04-24 17:59:49 +00003460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003462
Martin v. Löwis11437992002-04-12 09:54:03 +00003463fi
3464fi
3465ac_ct_CC=$ac_cv_prog_ac_ct_CC
3466if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3468$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003469else
Matthias Kloseb9621712010-04-24 17:59:49 +00003470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3471$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 test -n "$ac_ct_CC" && break
3476done
Michael W. Hudson54241132001-12-07 15:38:26 +00003477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 if test "x$ac_ct_CC" = x; then
3479 CC=""
3480 else
3481 case $cross_compiling:$ac_tool_warned in
3482yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3484$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485ac_tool_warned=yes ;;
3486esac
3487 CC=$ac_ct_CC
3488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003489fi
3490
3491fi
3492
3493
Matthias Kloseb9621712010-04-24 17:59:49 +00003494test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003496as_fn_error $? "no acceptable C compiler found in \$PATH
Gregory P. Smith69140482012-01-16 02:05:55 -08003497See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003498
3499# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003500$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3501set X $ac_compile
3502ac_compiler=$2
3503for ac_option in --version -v -V -qversion; do
3504 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003505case "(($ac_try" in
3506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3507 *) ac_try_echo=$ac_try;;
3508esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003509eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3510$as_echo "$ac_try_echo"; } >&5
3511 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003513 if test -s conftest.err; then
3514 sed '10a\
3515... rest of stderr output deleted ...
3516 10q' conftest.err >conftest.er1
3517 cat conftest.er1 >&5
3518 fi
3519 rm -f conftest.er1 conftest.err
3520 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3521 test $ac_status = 0; }
3522done
Martin v. Löwis11437992002-04-12 09:54:03 +00003523
Matthias Kloseb9621712010-04-24 17:59:49 +00003524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003525/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003526
Martin v. Löwis11437992002-04-12 09:54:03 +00003527int
3528main ()
3529{
3530
3531 ;
3532 return 0;
3533}
3534_ACEOF
3535ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003536ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003537# Try to create an executable without -o first, disregard a.out.
3538# It will help us diagnose broken compilers, and finding out an intuition
3539# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3541$as_echo_n "checking whether the C compiler works... " >&6; }
3542ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3543
3544# The possible output files:
3545ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547ac_rmfiles=
3548for ac_file in $ac_files
3549do
3550 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003551 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3553 esac
3554done
3555rm -f $ac_rmfiles
3556
Matthias Kloseb9621712010-04-24 17:59:49 +00003557if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558case "(($ac_try" in
3559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3560 *) ac_try_echo=$ac_try;;
3561esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003562eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3563$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3567 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3569# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3570# in a Makefile. We should not override ac_cv_exeext if it was cached,
3571# so that the user can short-circuit this test for compilers unknown to
3572# Autoconf.
3573for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003574do
3575 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003578 ;;
3579 [ab].out )
3580 # We found the default executable, but exeext='' is most
3581 # certainly right.
3582 break;;
3583 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585 then :; else
3586 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3587 fi
3588 # We set ac_cv_exeext here because the later test for it is not
3589 # safe: cross compilers may not add the suffix if given an `-o'
3590 # argument, so we may need to know it at that point already.
3591 # Even if this section looks crufty: it has the advantage of
3592 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003593 break;;
3594 * )
3595 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 esac
3597done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598test "$ac_cv_exeext" = no && ac_cv_exeext=
3599
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003600else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601 ac_file=''
3602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003603if test -z "$ac_file"; then :
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605$as_echo "no" >&6; }
3606$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003607sed 's/^/| /' conftest.$ac_ext >&5
3608
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003611as_fn_error 77 "C compiler cannot create executables
Gregory P. Smith69140482012-01-16 02:05:55 -08003612See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003613else
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3615$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3618$as_echo_n "checking for C compiler default output file name... " >&6; }
3619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3620$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003621ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622
Matthias Kloseb9621712010-04-24 17:59:49 +00003623rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3626$as_echo_n "checking for suffix of executables... " >&6; }
3627if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628case "(($ac_try" in
3629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3630 *) ac_try_echo=$ac_try;;
3631esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3633$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3637 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003638 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3639# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3640# work properly (i.e., refer to `conftest.exe'), while it won't with
3641# `rm'.
3642for ac_file in conftest.exe conftest conftest.*; do
3643 test -f "$ac_file" || continue
3644 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003646 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3647 break;;
3648 * ) break;;
3649 esac
3650done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003651else
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003654as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Gregory P. Smith69140482012-01-16 02:05:55 -08003655See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003657rm -f conftest conftest$ac_cv_exeext
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3659$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003660
3661rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003662EXEEXT=$ac_cv_exeext
3663ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3665/* end confdefs.h. */
3666#include <stdio.h>
3667int
3668main ()
3669{
3670FILE *f = fopen ("conftest.out", "w");
3671 return ferror (f) || fclose (f) != 0;
3672
3673 ;
3674 return 0;
3675}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003677ac_clean_files="$ac_clean_files conftest.out"
3678# Check that the compiler produces executables we can run. If not, either
3679# the compiler is broken, or we cross compile.
3680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3681$as_echo_n "checking whether we are cross compiling... " >&6; }
3682if test "$cross_compiling" != yes; then
3683 { { ac_try="$ac_link"
3684case "(($ac_try" in
3685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3686 *) ac_try_echo=$ac_try;;
3687esac
3688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3689$as_echo "$ac_try_echo"; } >&5
3690 (eval "$ac_link") 2>&5
3691 ac_status=$?
3692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3693 test $ac_status = 0; }
3694 if { ac_try='./conftest$ac_cv_exeext'
3695 { { case "(($ac_try" in
3696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3697 *) ac_try_echo=$ac_try;;
3698esac
3699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3700$as_echo "$ac_try_echo"; } >&5
3701 (eval "$ac_try") 2>&5
3702 ac_status=$?
3703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3704 test $ac_status = 0; }; }; then
3705 cross_compiling=no
3706 else
3707 if test "$cross_compiling" = maybe; then
3708 cross_compiling=yes
3709 else
3710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003712as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003713If you meant to cross compile, use \`--host'.
Gregory P. Smith69140482012-01-16 02:05:55 -08003714See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 fi
3716 fi
3717fi
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3719$as_echo "$cross_compiling" >&6; }
3720
3721rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3722ac_clean_files=$ac_clean_files_save
3723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3724$as_echo_n "checking for suffix of object files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003725if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 $as_echo_n "(cached) " >&6
3727else
3728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003729/* end confdefs.h. */
3730
3731int
3732main ()
3733{
3734
3735 ;
3736 return 0;
3737}
3738_ACEOF
3739rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003740if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741case "(($ac_try" in
3742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743 *) ac_try_echo=$ac_try;;
3744esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3746$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3750 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 for ac_file in conftest.o conftest.obj conftest.*; do
3752 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3756 break;;
3757 esac
3758done
3759else
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003761sed 's/^/| /' conftest.$ac_ext >&5
3762
Matthias Kloseb9621712010-04-24 17:59:49 +00003763{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003765as_fn_error $? "cannot compute suffix of object files: cannot compile
Gregory P. Smith69140482012-01-16 02:05:55 -08003766See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003767fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003768rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3771$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003772OBJEXT=$ac_cv_objext
3773ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3775$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003776if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003778else
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003781
Martin v. Löwis11437992002-04-12 09:54:03 +00003782int
3783main ()
3784{
3785#ifndef __GNUC__
3786 choke me
3787#endif
3788
3789 ;
3790 return 0;
3791}
3792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003793if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 ac_compiler_gnu=yes
3795else
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003799ac_cv_c_compiler_gnu=$ac_compiler_gnu
3800
3801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3803$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3804if test $ac_compiler_gnu = yes; then
3805 GCC=yes
3806else
3807 GCC=
3808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809ac_test_CFLAGS=${CFLAGS+set}
3810ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3812$as_echo_n "checking whether $CC accepts -g... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003813if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003815else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816 ac_save_c_werror_flag=$ac_c_werror_flag
3817 ac_c_werror_flag=yes
3818 ac_cv_prog_cc_g=no
3819 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823int
3824main ()
3825{
3826
3827 ;
3828 return 0;
3829}
3830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003831if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003832 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003833else
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 CFLAGS=""
3835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836/* end confdefs.h. */
3837
3838int
3839main ()
3840{
3841
3842 ;
3843 return 0;
3844}
3845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003846if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847
Matthias Kloseb9621712010-04-24 17:59:49 +00003848else
3849 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852/* end confdefs.h. */
3853
3854int
3855main ()
3856{
3857
3858 ;
3859 return 0;
3860}
3861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003862if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3870 ac_c_werror_flag=$ac_save_c_werror_flag
3871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3873$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003874if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003876elif test $ac_cv_prog_cc_g = yes; then
3877 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003878 CFLAGS="-g -O2"
3879 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003880 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881 fi
3882else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003883 if test "$GCC" = yes; then
3884 CFLAGS="-O2"
3885 else
3886 CFLAGS=
3887 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3890$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003891if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003893else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003895ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003897/* end confdefs.h. */
3898#include <stdarg.h>
3899#include <stdio.h>
3900#include <sys/types.h>
3901#include <sys/stat.h>
3902/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3903struct buf { int x; };
3904FILE * (*rcsopen) (struct buf *, struct stat *, int);
3905static char *e (p, i)
3906 char **p;
3907 int i;
3908{
3909 return p[i];
3910}
3911static char *f (char * (*g) (char **, int), char **p, ...)
3912{
3913 char *s;
3914 va_list v;
3915 va_start (v,p);
3916 s = g (p, va_arg (v,int));
3917 va_end (v);
3918 return s;
3919}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003920
3921/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3922 function prototypes and stuff, but not '\xHH' hex character constants.
3923 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003925 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3926 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003928int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3931 inside strings and character constants. */
3932#define FOO(x) 'x'
3933int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3934
Skip Montanaro6dead952003-09-25 14:50:04 +00003935int test (int i, double x);
3936struct s1 {int (*f) (int a);};
3937struct s2 {int (*f) (double a);};
3938int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3939int argc;
3940char **argv;
3941int
3942main ()
3943{
3944return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3945 ;
3946 return 0;
3947}
3948_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3950 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003951do
3952 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956rm -f core conftest.err conftest.$ac_objext
3957 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003958done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003960CC=$ac_save_CC
3961
3962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963# AC_CACHE_VAL
3964case "x$ac_cv_prog_cc_c89" in
3965 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3967$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3970$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003971 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3974$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003975esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003976if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003977
Matthias Kloseb9621712010-04-24 17:59:49 +00003978fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003979
Martin v. Löwis11437992002-04-12 09:54:03 +00003980ac_ext=c
3981ac_cpp='$CPP $CPPFLAGS'
3982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3984ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003985
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003986
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003987
3988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3990$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003993if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003995
3996 case $withval in
3997 no) with_cxx_main=no
3998 MAINCC='$(CC)';;
3999 yes) with_cxx_main=yes
4000 MAINCC='$(CXX)';;
4001 *) with_cxx_main=yes
4002 MAINCC=$withval
4003 if test -z "$CXX"
4004 then
4005 CXX=$withval
4006 fi;;
4007 esac
4008else
4009
4010 with_cxx_main=no
4011 MAINCC='$(CC)'
4012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013fi
4014
Matthias Kloseb9621712010-04-24 17:59:49 +00004015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4016$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004017
4018preset_cxx="$CXX"
4019if test -z "$CXX"
4020then
4021 case "$CC" in
4022 gcc) # Extract the first word of "g++", so it can be a program name with args.
4023set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4025$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004026if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004028else
4029 case $CXX in
4030 [\\/]* | ?:[\\/]*)
4031 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4032 ;;
4033 *)
4034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4035for as_dir in notfound
4036do
4037 IFS=$as_save_IFS
4038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040 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 +00004041 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043 break 2
4044 fi
4045done
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004048
4049 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4050 ;;
4051esac
4052fi
4053CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004054if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4056$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004057else
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4059$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062 ;;
4063 cc) # Extract the first word of "c++", so it can be a program name with args.
4064set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004067if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004069else
4070 case $CXX in
4071 [\\/]* | ?:[\\/]*)
4072 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4073 ;;
4074 *)
4075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in notfound
4077do
4078 IFS=$as_save_IFS
4079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081 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 +00004082 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004084 break 2
4085 fi
4086done
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089
4090 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4091 ;;
4092esac
4093fi
4094CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004095if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4097$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004098else
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4100$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004103 ;;
4104 esac
4105 if test "$CXX" = "notfound"
4106 then
4107 CXX=""
4108 fi
4109fi
4110if test -z "$CXX"
4111then
4112 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4113do
4114 # Extract the first word of "$ac_prog", so it can be a program name with args.
4115set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004118if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004120else
4121 if test -n "$CXX"; then
4122 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4123else
4124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125for as_dir in $PATH
4126do
4127 IFS=$as_save_IFS
4128 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130 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 +00004131 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004133 break 2
4134 fi
4135done
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004138
4139fi
4140fi
4141CXX=$ac_cv_prog_CXX
4142if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4144$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4147$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148fi
4149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004151 test -n "$CXX" && break
4152done
4153test -n "$CXX" || CXX="notfound"
4154
4155 if test "$CXX" = "notfound"
4156 then
4157 CXX=""
4158 fi
4159fi
4160if test "$preset_cxx" != "$CXX"
4161then
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004163
4164 By default, distutils will build C++ extension modules with \"$CXX\".
4165 If this is not intended, then set CXX on the configure command line.
4166 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004167$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004168
4169 By default, distutils will build C++ extension modules with \"$CXX\".
4170 If this is not intended, then set CXX on the configure command line.
4171 " >&2;}
4172fi
4173
4174
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4176$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4177save_LDFLAGS="$LDFLAGS"
4178LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004179
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4181/* end confdefs.h. */
4182
4183int
4184main ()
4185{
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
4191if ac_fn_c_try_link "$LINENO"; then :
4192 NO_AS_NEEDED="-Wl,--no-as-needed"
4193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4194$as_echo "yes" >&6; }
4195else
4196 NO_AS_NEEDED=""
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4198$as_echo "no" >&6; }
4199fi
4200rm -f core conftest.err conftest.$ac_objext \
4201 conftest$ac_exeext conftest.$ac_ext
4202LDFLAGS="$save_LDFLAGS"
4203
4204
4205
4206# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004207ac_ext=c
4208ac_cpp='$CPP $CPPFLAGS'
4209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4211ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4213$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004214# On Suns, sometimes $CPP names a directory.
4215if test -n "$CPP" && test -d "$CPP"; then
4216 CPP=
4217fi
4218if test -z "$CPP"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08004219 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004221else
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 # Double quotes because CPP needs to be expanded
4223 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4224 do
4225 ac_preproc_ok=false
4226for ac_c_preproc_warn_flag in '' yes
4227do
4228 # Use a header file that comes with gcc, so configuring glibc
4229 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004230 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4231 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004232 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004235/* end confdefs.h. */
4236#ifdef __STDC__
4237# include <limits.h>
4238#else
4239# include <assert.h>
4240#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004241 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004243if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004244
Matthias Kloseb9621712010-04-24 17:59:49 +00004245else
Martin v. Löwis11437992002-04-12 09:54:03 +00004246 # Broken: fails on valid input.
4247continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004248fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004249rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004255#include <ac_nonexistent.h>
4256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004257if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004258 # Broken: success on invalid input.
4259continue
4260else
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Passes both tests.
4262ac_preproc_ok=:
4263break
4264fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004265rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004266
4267done
4268# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004269rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004270if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 break
4272fi
4273
4274 done
4275 ac_cv_prog_CPP=$CPP
4276
4277fi
4278 CPP=$ac_cv_prog_CPP
4279else
4280 ac_cv_prog_CPP=$CPP
4281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4283$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004284ac_preproc_ok=false
4285for ac_c_preproc_warn_flag in '' yes
4286do
4287 # Use a header file that comes with gcc, so configuring glibc
4288 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004289 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4290 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 # On the NeXT, cc -E runs the code through the compiler's parser,
4292 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* end confdefs.h. */
4295#ifdef __STDC__
4296# include <limits.h>
4297#else
4298# include <assert.h>
4299#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004302if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004303
Matthias Kloseb9621712010-04-24 17:59:49 +00004304else
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 # Broken: fails on valid input.
4306continue
4307fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004308rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004314#include <ac_nonexistent.h>
4315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004316if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 # Broken: success on invalid input.
4318continue
4319else
Martin v. Löwis11437992002-04-12 09:54:03 +00004320 # Passes both tests.
4321ac_preproc_ok=:
4322break
4323fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004324rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004325
4326done
4327# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004328rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004329if $ac_preproc_ok; then :
4330
Martin v. Löwis11437992002-04-12 09:54:03 +00004331else
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004334as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Gregory P. Smith69140482012-01-16 02:05:55 -08004335See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004336fi
4337
4338ac_ext=c
4339ac_cpp='$CPP $CPPFLAGS'
4340ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4341ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4342ac_compiler_gnu=$ac_cv_c_compiler_gnu
4343
4344
Matthias Kloseb9621712010-04-24 17:59:49 +00004345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4346$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004347if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004349else
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 # Loop through the user's path and test for each of PROGNAME-LIST
4353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4355do
4356 IFS=$as_save_IFS
4357 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 for ac_prog in grep ggrep; do
4359 for ac_exec_ext in '' $ac_executable_extensions; do
4360 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4361 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4362# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 # Check for GNU $ac_path_GREP
4364case `"$ac_path_GREP" --version 2>&1` in
4365*GNU*)
4366 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4367*)
4368 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 while :
4371 do
4372 cat "conftest.in" "conftest.in" >"conftest.tmp"
4373 mv "conftest.tmp" "conftest.in"
4374 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4377 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4380 # Best one so far, save it but keep looking for a better one
4381 ac_cv_path_GREP="$ac_path_GREP"
4382 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004383 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 # 10*(2^10) chars as input seems more than enough
4385 test $ac_count -gt 10 && break
4386 done
4387 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4388esac
4389
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 $ac_path_GREP_found && break 3
4391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004396 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 +00004397 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398else
4399 ac_cv_path_GREP=$GREP
4400fi
4401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4404$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 GREP="$ac_cv_path_GREP"
4406
4407
Matthias Kloseb9621712010-04-24 17:59:49 +00004408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4409$as_echo_n "checking for egrep... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004410if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412else
4413 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4414 then ac_cv_path_EGREP="$GREP -E"
4415 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004416 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 # Loop through the user's path and test for each of PROGNAME-LIST
4419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4421do
4422 IFS=$as_save_IFS
4423 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 for ac_prog in egrep; do
4425 for ac_exec_ext in '' $ac_executable_extensions; do
4426 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4427 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4428# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429 # Check for GNU $ac_path_EGREP
4430case `"$ac_path_EGREP" --version 2>&1` in
4431*GNU*)
4432 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4433*)
4434 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004435 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436 while :
4437 do
4438 cat "conftest.in" "conftest.in" >"conftest.tmp"
4439 mv "conftest.tmp" "conftest.in"
4440 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4443 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004445 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4446 # Best one so far, save it but keep looking for a better one
4447 ac_cv_path_EGREP="$ac_path_EGREP"
4448 ac_path_EGREP_max=$ac_count
4449 fi
4450 # 10*(2^10) chars as input seems more than enough
4451 test $ac_count -gt 10 && break
4452 done
4453 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4454esac
4455
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 $ac_path_EGREP_found && break 3
4457 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004459 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004462 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 +00004463 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004464else
4465 ac_cv_path_EGREP=$EGREP
4466fi
4467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004468 fi
4469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4471$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004473
4474
Matthias Kloseb9621712010-04-24 17:59:49 +00004475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4476$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004477if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004478 $as_echo_n "(cached) " >&6
4479else
4480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004481/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004482#include <stdlib.h>
4483#include <stdarg.h>
4484#include <string.h>
4485#include <float.h>
4486
4487int
4488main ()
4489{
4490
4491 ;
4492 return 0;
4493}
4494_ACEOF
4495if ac_fn_c_try_compile "$LINENO"; then :
4496 ac_cv_header_stdc=yes
4497else
4498 ac_cv_header_stdc=no
4499fi
4500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4501
4502if test $ac_cv_header_stdc = yes; then
4503 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505/* end confdefs.h. */
4506#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004507
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004508_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004511
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004512else
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004514fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004515rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004516
Matthias Kloseb9621712010-04-24 17:59:49 +00004517fi
4518
4519if test $ac_cv_header_stdc = yes; then
4520 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4522/* end confdefs.h. */
4523#include <stdlib.h>
4524
4525_ACEOF
4526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4527 $EGREP "free" >/dev/null 2>&1; then :
4528
4529else
4530 ac_cv_header_stdc=no
4531fi
4532rm -f conftest*
4533
4534fi
4535
4536if test $ac_cv_header_stdc = yes; then
4537 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4538 if test "$cross_compiling" = yes; then :
4539 :
4540else
4541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4542/* end confdefs.h. */
4543#include <ctype.h>
4544#include <stdlib.h>
4545#if ((' ' & 0x0FF) == 0x020)
4546# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4547# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4548#else
4549# define ISLOWER(c) \
4550 (('a' <= (c) && (c) <= 'i') \
4551 || ('j' <= (c) && (c) <= 'r') \
4552 || ('s' <= (c) && (c) <= 'z'))
4553# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4554#endif
4555
4556#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4557int
4558main ()
4559{
4560 int i;
4561 for (i = 0; i < 256; i++)
4562 if (XOR (islower (i), ISLOWER (i))
4563 || toupper (i) != TOUPPER (i))
4564 return 2;
4565 return 0;
4566}
4567_ACEOF
4568if ac_fn_c_try_run "$LINENO"; then :
4569
4570else
4571 ac_cv_header_stdc=no
4572fi
4573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4574 conftest.$ac_objext conftest.beam conftest.$ac_ext
4575fi
4576
4577fi
4578fi
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4580$as_echo "$ac_cv_header_stdc" >&6; }
4581if test $ac_cv_header_stdc = yes; then
4582
4583$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4584
4585fi
4586
4587# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4588for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4589 inttypes.h stdint.h unistd.h
4590do :
4591 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4592ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4593"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004594if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004595 cat >>confdefs.h <<_ACEOF
4596#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4597_ACEOF
4598
4599fi
4600
4601done
4602
4603
4604
4605 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 -08004606if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004607 MINIX=yes
4608else
4609 MINIX=
4610fi
4611
4612
4613 if test "$MINIX" = yes; then
4614
4615$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4616
4617
4618$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4619
4620
4621$as_echo "#define _MINIX 1" >>confdefs.h
4622
4623 fi
4624
4625
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4627$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004628if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004629 $as_echo_n "(cached) " >&6
4630else
4631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4632/* end confdefs.h. */
4633
4634# define __EXTENSIONS__ 1
4635 $ac_includes_default
4636int
4637main ()
4638{
4639
4640 ;
4641 return 0;
4642}
4643_ACEOF
4644if ac_fn_c_try_compile "$LINENO"; then :
4645 ac_cv_safe_to_define___extensions__=yes
4646else
4647 ac_cv_safe_to_define___extensions__=no
4648fi
4649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4650fi
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4652$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4653 test $ac_cv_safe_to_define___extensions__ = yes &&
4654 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4655
4656 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4657
4658 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4659
4660 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4661
4662 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4663
4664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004666# Check for unsupported systems
4667case $ac_sys_system/$ac_sys_release in
4668atheos*|Linux*/1*)
4669 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4670 echo See README for details.
4671 exit 1;;
4672esac
4673
4674
Matthias Kloseb9621712010-04-24 17:59:49 +00004675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4676$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004677
4678# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004679if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680 withval=$with_suffix;
4681 case $withval in
4682 no) EXEEXT=;;
4683 yes) EXEEXT=.exe;;
4684 *) EXEEXT=$withval;;
4685 esac
4686fi
4687
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4689$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690
4691# Test whether we're running on a non-case-sensitive system, in which
4692# case we give a warning if no ext is given
4693
Matthias Kloseb9621712010-04-24 17:59:49 +00004694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4695$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004696if test ! -d CaseSensitiveTestDir; then
4697mkdir CaseSensitiveTestDir
4698fi
4699
4700if test -d casesensitivetestdir
4701then
Matthias Kloseb9621712010-04-24 17:59:49 +00004702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4703$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704 BUILDEXEEXT=.exe
4705else
Matthias Kloseb9621712010-04-24 17:59:49 +00004706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004708 BUILDEXEEXT=$EXEEXT
4709fi
4710rmdir CaseSensitiveTestDir
4711
4712case $MACHDEP in
4713bsdos*)
4714 case $CC in
4715 gcc) CC="$CC -D_HAVE_BSDI";;
4716 esac;;
4717esac
4718
4719case $ac_sys_system in
4720hp*|HP*)
4721 case $CC in
4722 cc|*/cc) CC="$CC -Ae";;
4723 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724esac
4725
4726
4727
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4729$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730if test -z "$LIBRARY"
4731then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004732 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4735$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736
4737# LDLIBRARY is the name of the library to link against (as opposed to the
4738# name of the library into which to insert object files). BLDLIBRARY is also
4739# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4740# is blank as the main program is not linked directly against LDLIBRARY.
4741# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4742# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4743# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4744# DLLLIBRARY is the shared (i.e., DLL) library.
4745#
4746# RUNSHARED is used to run shared python without installed libraries
4747#
4748# INSTSONAME is the name of the shared library that will be use to install
4749# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004750#
4751# LDVERSION is the shared library version number, normally the Python version
4752# with the ABI build flags appended.
4753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754
4755
4756
4757
4758
4759
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761LDLIBRARY="$LIBRARY"
4762BLDLIBRARY='$(LDLIBRARY)'
4763INSTSONAME='$(LDLIBRARY)'
4764DLLLIBRARY=''
4765LDLIBRARYDIR=''
4766RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004767LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768
4769# LINKCC is the command that links the python executable -- default is $(CC).
4770# If CXX is set, and if it is needed to link a main function that was
4771# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4772# python might then depend on the C++ runtime
4773# This is altered for AIX in order to build the export list before
4774# linking.
4775
Matthias Kloseb9621712010-04-24 17:59:49 +00004776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4777$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778if test -z "$LINKCC"
4779then
4780 LINKCC='$(PURIFY) $(MAINCC)'
4781 case $ac_sys_system in
4782 AIX*)
4783 exp_extra="\"\""
4784 if test $ac_sys_release -ge 5 -o \
4785 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4786 exp_extra="."
4787 fi
4788 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789 QNX*)
4790 # qcc must be used because the other compilers do not
4791 # support -N.
4792 LINKCC=qcc;;
4793 esac
4794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4796$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797
4798# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4799# make sure we default having it set to "no": this is used by
4800# distutils.unixccompiler to know if it should add --enable-new-dtags
4801# to linker command lines, and failing to detect GNU ld simply results
4802# in the same bahaviour as before.
4803
Matthias Kloseb9621712010-04-24 17:59:49 +00004804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4805$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806ac_prog=ld
4807if test "$GCC" = yes; then
4808 ac_prog=`$CC -print-prog-name=ld`
4809fi
4810case `"$ac_prog" -V 2>&1 < /dev/null` in
4811 *GNU*)
4812 GNULD=yes;;
4813 *)
4814 GNULD=no;;
4815esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4817$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004818
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4820$as_echo_n "checking for inline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004821if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004822 $as_echo_n "(cached) " >&6
4823else
4824 ac_cv_c_inline=no
4825for ac_kw in inline __inline__ __inline; do
4826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827/* end confdefs.h. */
4828#ifndef __cplusplus
4829typedef int foo_t;
4830static $ac_kw foo_t static_foo () {return 0; }
4831$ac_kw foo_t foo () {return 0; }
4832#endif
4833
4834_ACEOF
4835if ac_fn_c_try_compile "$LINENO"; then :
4836 ac_cv_c_inline=$ac_kw
4837fi
4838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4839 test "$ac_cv_c_inline" != no && break
4840done
4841
4842fi
4843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4844$as_echo "$ac_cv_c_inline" >&6; }
4845
4846case $ac_cv_c_inline in
4847 inline | yes) ;;
4848 *)
4849 case $ac_cv_c_inline in
4850 no) ac_val=;;
4851 *) ac_val=$ac_cv_c_inline;;
4852 esac
4853 cat >>confdefs.h <<_ACEOF
4854#ifndef __cplusplus
4855#define inline $ac_val
4856#endif
4857_ACEOF
4858 ;;
4859esac
4860
4861if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004862
4863$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004864
4865
4866fi
4867
4868
Matthias Kloseb9621712010-04-24 17:59:49 +00004869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4870$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004872if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873 enableval=$enable_shared;
4874fi
4875
4876
4877if test -z "$enable_shared"
4878then
4879 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004880 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004881 enable_shared="yes";;
4882 *)
4883 enable_shared="no";;
4884 esac
4885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4887$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4890$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004892if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893 enableval=$enable_profiling; ac_save_cc="$CC"
4894 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896 ac_enable_profiling="no"
4897else
Matthias Kloseb9621712010-04-24 17:59:49 +00004898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899/* end confdefs.h. */
4900int main() { return 0; }
4901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004902if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903 ac_enable_profiling="yes"
4904else
Matthias Kloseb9621712010-04-24 17:59:49 +00004905 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909fi
4910
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004911 CC="$ac_save_cc"
4912fi
4913
Matthias Kloseb9621712010-04-24 17:59:49 +00004914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4915$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916
4917case "$ac_enable_profiling" in
4918 "yes")
4919 BASECFLAGS="-pg $BASECFLAGS"
4920 LDFLAGS="-pg $LDFLAGS"
4921 ;;
4922esac
4923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4925$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926
4927# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4928# library that we build, but we do not want to link against it (we
4929# will find it with a -framework option). For this reason there is an
4930# extra variable BLDLIBRARY against which Python and the extension
4931# modules are linked, BLDLIBRARY. This is normally the same as
4932# LDLIBRARY, but empty for MacOSX framework builds.
4933if test "$enable_framework"
4934then
4935 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4936 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4937 BLDLIBRARY=''
4938else
4939 BLDLIBRARY='$(LDLIBRARY)'
4940fi
4941
4942# Other platforms follow
4943if test $enable_shared = "yes"; then
4944
Matthias Kloseb9621712010-04-24 17:59:49 +00004945$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946
4947 case $ac_sys_system in
4948 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004949 LDLIBRARY='libpython$(LDVERSION).dll.a'
4950 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ;;
4952 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004953 LDLIBRARY='libpython$(LDVERSION).so'
4954 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4956 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004957 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004958 then
4959 PY3LIBRARY=libpython3.so
4960 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004962 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004963 LDLIBRARY='libpython$(LDVERSION).so'
4964 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4966 case $ac_sys_system in
4967 FreeBSD*)
4968 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4969 ;;
4970 esac
4971 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004972 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004973 then
4974 PY3LIBRARY=libpython3.so
4975 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004976 ;;
4977 hp*|HP*)
4978 case `uname -m` in
4979 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004980 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 ;;
4982 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004983 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984 ;;
4985 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004986 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4988 ;;
4989 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004990 LDLIBRARY='libpython$(LDVERSION).so'
4991 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4993 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004995 LDLIBRARY='libpython$(LDVERSION).dylib'
4996 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4998 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004999 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005000 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005001 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5002 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003
5004 esac
5005else # shared is disabled
5006 case $ac_sys_system in
5007 CYGWIN*)
5008 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005009 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010 ;;
5011 esac
5012fi
5013
Matthias Kloseb9621712010-04-24 17:59:49 +00005014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5015$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016
5017if test -n "$ac_tool_prefix"; then
5018 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5019set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005022if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024else
5025 if test -n "$RANLIB"; then
5026 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5027else
5028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5035 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 break 2
5038 fi
5039done
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041IFS=$as_save_IFS
5042
5043fi
5044fi
5045RANLIB=$ac_cv_prog_RANLIB
5046if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5048$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049else
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052fi
5053
5054
5055fi
5056if test -z "$ac_cv_prog_RANLIB"; then
5057 ac_ct_RANLIB=$RANLIB
5058 # Extract the first word of "ranlib", so it can be a program name with args.
5059set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005062if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064else
5065 if test -n "$ac_ct_RANLIB"; then
5066 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5067else
5068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071 IFS=$as_save_IFS
5072 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5075 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 break 2
5078 fi
5079done
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081IFS=$as_save_IFS
5082
5083fi
5084fi
5085ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5086if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5088$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005089else
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092fi
5093
5094 if test "x$ac_ct_RANLIB" = x; then
5095 RANLIB=":"
5096 else
5097 case $cross_compiling:$ac_tool_warned in
5098yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101ac_tool_warned=yes ;;
5102esac
5103 RANLIB=$ac_ct_RANLIB
5104 fi
5105else
5106 RANLIB="$ac_cv_prog_RANLIB"
5107fi
5108
5109
5110for ac_prog in ar aal
5111do
5112 # Extract the first word of "$ac_prog", so it can be a program name with args.
5113set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5115$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005116if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118else
5119 if test -n "$AR"; then
5120 ac_cv_prog_AR="$AR" # Let the user override the test.
5121else
5122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125 IFS=$as_save_IFS
5126 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005127 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5129 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131 break 2
5132 fi
5133done
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135IFS=$as_save_IFS
5136
5137fi
5138fi
5139AR=$ac_cv_prog_AR
5140if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5142$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143else
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146fi
5147
5148
5149 test -n "$AR" && break
5150done
5151test -n "$AR" || AR="ar"
5152
5153
5154# tweak ARFLAGS only if the user didn't set it on the command line
5155
5156if test -z "$ARFLAGS"
5157then
5158 ARFLAGS="rc"
5159fi
5160
5161
5162# Extract the first word of "svnversion", so it can be a program name with args.
5163set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005166if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168else
5169 if test -n "$SVNVERSION"; then
5170 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5171else
5172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175 IFS=$as_save_IFS
5176 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5179 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181 break 2
5182 fi
5183done
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185IFS=$as_save_IFS
5186
5187 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5188fi
5189fi
5190SVNVERSION=$ac_cv_prog_SVNVERSION
5191if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5193$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194else
Matthias Kloseb9621712010-04-24 17:59:49 +00005195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197fi
5198
5199
5200if test $SVNVERSION = found
5201then
5202 SVNVERSION="svnversion \$(srcdir)"
5203else
5204 SVNVERSION="echo Unversioned directory"
5205fi
5206
Georg Brandl1ca2e792011-03-05 20:51:24 +01005207
5208
5209
Georg Brandl187c1112011-07-03 09:23:20 +02005210
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005211if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005212then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005213# Extract the first word of "hg", so it can be a program name with args.
5214set dummy hg; ac_word=$2
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005217if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005218 $as_echo_n "(cached) " >&6
5219else
5220 if test -n "$HAS_HG"; then
5221 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5222else
5223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226 IFS=$as_save_IFS
5227 test -z "$as_dir" && as_dir=.
5228 for ac_exec_ext in '' $ac_executable_extensions; do
5229 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5230 ac_cv_prog_HAS_HG="found"
5231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232 break 2
5233 fi
5234done
5235 done
5236IFS=$as_save_IFS
5237
5238 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5239fi
5240fi
5241HAS_HG=$ac_cv_prog_HAS_HG
5242if test -n "$HAS_HG"; then
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5244$as_echo "$HAS_HG" >&6; }
5245else
5246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
Georg Brandl187c1112011-07-03 09:23:20 +02005251else
5252HAS_HG=no-repository
5253fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005254if test $HAS_HG = found
5255then
5256 HGVERSION="hg id -i \$(srcdir)"
5257 HGTAG="hg id -t \$(srcdir)"
5258 HGBRANCH="hg id -b \$(srcdir)"
5259else
5260 HGVERSION=""
5261 HGTAG=""
5262 HGBRANCH=""
5263fi
5264
Georg Brandl187c1112011-07-03 09:23:20 +02005265
5266DISABLE_ASDLGEN=""
5267# Extract the first word of "python", so it can be a program name with args.
5268set dummy python; ac_word=$2
5269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5270$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005271if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005272 $as_echo_n "(cached) " >&6
5273else
5274 if test -n "$HAS_PYTHON"; then
5275 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5276else
5277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278for as_dir in $PATH
5279do
5280 IFS=$as_save_IFS
5281 test -z "$as_dir" && as_dir=.
5282 for ac_exec_ext in '' $ac_executable_extensions; do
5283 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5284 ac_cv_prog_HAS_PYTHON="found"
5285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286 break 2
5287 fi
5288done
5289 done
5290IFS=$as_save_IFS
5291
5292 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5293fi
5294fi
5295HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5296if test -n "$HAS_PYTHON"; then
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5298$as_echo "$HAS_PYTHON" >&6; }
5299else
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301$as_echo "no" >&6; }
5302fi
5303
5304
5305if test $HAS_HG != found -o $HAS_PYTHON != found
5306then
5307 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5308fi
5309
5310
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311case $MACHDEP in
5312bsdos*|hp*|HP*)
5313 # install -d does not work on BSDI or HP-UX
5314 if test -z "$INSTALL"
5315 then
5316 INSTALL="${srcdir}/install-sh -c"
5317 fi
5318esac
5319ac_aux_dir=
5320for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005321 if test -f "$ac_dir/install-sh"; then
5322 ac_aux_dir=$ac_dir
5323 ac_install_sh="$ac_aux_dir/install-sh -c"
5324 break
5325 elif test -f "$ac_dir/install.sh"; then
5326 ac_aux_dir=$ac_dir
5327 ac_install_sh="$ac_aux_dir/install.sh -c"
5328 break
5329 elif test -f "$ac_dir/shtool"; then
5330 ac_aux_dir=$ac_dir
5331 ac_install_sh="$ac_aux_dir/shtool install -c"
5332 break
5333 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334done
5335if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005336 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337fi
5338
5339# These three variables are undocumented and unsupported,
5340# and are intended to be withdrawn in a future Autoconf release.
5341# They can cause serious problems if a builder's source tree is in a directory
5342# whose full name contains unusual characters.
5343ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5344ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5345ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5346
5347
5348# Find a good install program. We prefer a C program (faster),
5349# so one script is as good as another. But avoid the broken or
5350# incompatible versions:
5351# SysV /etc/install, /usr/sbin/install
5352# SunOS /usr/etc/install
5353# IRIX /sbin/install
5354# AIX /bin/install
5355# AmigaOS /C/install, which installs bootblocks on floppy discs
5356# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5357# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5358# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5359# OS/2's system install, which has a completely different semantic
5360# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005361# Reject install programs that cannot install multiple files.
5362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5363$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005365if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005367else
5368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5369for as_dir in $PATH
5370do
5371 IFS=$as_save_IFS
5372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 # Account for people who put trailing slashes in PATH elements.
5374case $as_dir/ in #((
5375 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378 /usr/ucb/* ) ;;
5379 *)
5380 # OSF1 and SCO ODT 3.0 have their own names for install.
5381 # Don't use installbsd from OSF since it installs stuff as root
5382 # by default.
5383 for ac_prog in ginstall scoinst install; do
5384 for ac_exec_ext in '' $ac_executable_extensions; do
5385 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5386 if test $ac_prog = install &&
5387 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5388 # AIX install. It has an incompatible calling convention.
5389 :
5390 elif test $ac_prog = install &&
5391 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5392 # program-specific install script used by HP pwplus--don't use.
5393 :
5394 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 rm -rf conftest.one conftest.two conftest.dir
5396 echo one > conftest.one
5397 echo two > conftest.two
5398 mkdir conftest.dir
5399 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5400 test -s conftest.one && test -s conftest.two &&
5401 test -s conftest.dir/conftest.one &&
5402 test -s conftest.dir/conftest.two
5403 then
5404 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5405 break 3
5406 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 fi
5408 fi
5409 done
5410 done
5411 ;;
5412esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005413
5414 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415IFS=$as_save_IFS
5416
Matthias Kloseb9621712010-04-24 17:59:49 +00005417rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419fi
5420 if test "${ac_cv_path_install+set}" = set; then
5421 INSTALL=$ac_cv_path_install
5422 else
5423 # As a last resort, use the slow shell script. Don't cache a
5424 # value for INSTALL within a source directory, because that will
5425 # break other packages using the cache if that directory is
5426 # removed, or if the value is a relative name.
5427 INSTALL=$ac_install_sh
5428 fi
5429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5431$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
5433# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5434# It thinks the first close brace ends the variable substitution.
5435test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5436
5437test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5438
5439test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5440
5441
5442# Not every filesystem supports hard links
5443
5444if test -z "$LN" ; then
5445 case $ac_sys_system in
5446 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447 *) LN=ln;;
5448 esac
5449fi
5450
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005451# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005452
5453ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005454
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5457$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
5459# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005460if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461 withval=$with_pydebug;
5462if test "$withval" != no
5463then
5464
Matthias Kloseb9621712010-04-24 17:59:49 +00005465$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5468$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005469 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005470 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005471else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473fi
5474else
Matthias Kloseb9621712010-04-24 17:59:49 +00005475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477fi
5478
5479
5480# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5481# merged with this chunk of code?
5482
5483# Optimizer/debugger flags
5484# ------------------------
5485# (The following bit of code is complicated enough - please keep things
5486# indented properly. Just pretend you're editing Python code. ;-)
5487
5488# There are two parallel sets of case statements below, one that checks to
5489# see if OPT was set and one that does BASECFLAGS setting based upon
5490# compiler and platform. BASECFLAGS tweaks need to be made even if the
5491# user set OPT.
5492
5493# tweak OPT based on compiler and platform, only if the user didn't set
5494# it on the command line
5495
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005496if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497then
5498 case $GCC in
5499 yes)
5500 if test "$CC" != 'g++' ; then
5501 STRICT_PROTO="-Wstrict-prototypes"
5502 fi
5503 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5504 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5505 WRAP="-fwrapv"
5506 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005507
5508 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005509 case $CC in
5510 *clang*) WRAP="-fwrapv"
5511 ;;
5512 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005513
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514 case $ac_cv_prog_cc_g in
5515 yes)
5516 if test "$Py_DEBUG" = 'true' ; then
5517 # Optimization messes up debuggers, so turn it off for
5518 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005519 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520 else
5521 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5522 fi
5523 ;;
5524 *)
5525 OPT="-O3 -Wall $STRICT_PROTO"
5526 ;;
5527 esac
5528 case $ac_sys_system in
5529 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5530 ;;
5531 esac
5532 ;;
5533
5534 *)
5535 OPT="-O"
5536 ;;
5537 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538fi
5539
5540
5541
5542# The -arch flags for universal builds on OSX
5543UNIVERSAL_ARCH_FLAGS=
5544
5545
5546# tweak BASECFLAGS based on compiler and platform
5547case $GCC in
5548yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005549 # Python doesn't violate C99 aliasing rules, but older versions of
5550 # GCC produce warnings for legal Python code. Enable
5551 # -fno-strict-aliasing on versions of GCC that support but produce
5552 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5554$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 ac_save_cc="$CC"
5556 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005557 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005558 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005560else
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005563
Matthias Kloseb159a552010-04-25 21:00:44 +00005564
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005565int
5566main ()
5567{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005568
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005569 ;
5570 return 0;
5571}
Matthias Kloseb159a552010-04-25 21:00:44 +00005572
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005574if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005575
5576 CC="$ac_save_cc -fstrict-aliasing"
5577 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005579/* end confdefs.h. */
5580
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005581 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005582int
5583main ()
5584{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005585double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005586 ;
5587 return 0;
5588}
Matthias Kloseb159a552010-04-25 21:00:44 +00005589
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005591if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005592
5593 ac_cv_no_strict_aliasing=no
5594
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595else
Matthias Kloseb159a552010-04-25 21:00:44 +00005596
5597 ac_cv_no_strict_aliasing=yes
5598
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005599fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005601
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005602else
Matthias Kloseb159a552010-04-25 21:00:44 +00005603
5604 ac_cv_no_strict_aliasing=no
5605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005608fi
5609
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005610 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5613$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005614 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615 then
5616 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5617 fi
5618
5619 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5620 # support. Without this, treatment of subnormals doesn't follow
5621 # the standard.
5622 case $ac_sys_machine in
5623 alpha*)
5624 BASECFLAGS="$BASECFLAGS -mieee"
5625 ;;
5626 esac
5627
5628 case $ac_sys_system in
5629 SCO_SV*)
5630 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5631 ;;
5632 # is there any other compiler on Darwin besides gcc?
5633 Darwin*)
5634 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5635 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005636 if test "${CC}" = gcc
5637 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5639$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005640 case "${UNIVERSALSDK}" in
5641 */MacOSX10.4u.sdk)
5642 # Build using 10.4 SDK, force usage of gcc when the
5643 # compiler is gcc, otherwise the user will get very
5644 # confusing error messages when building on OSX 10.6
5645 CC=gcc-4.0
5646 CPP=cpp-4.0
5647 ;;
5648 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5650$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005651 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
5653
5654 if test "${enable_universalsdk}"; then
5655 UNIVERSAL_ARCH_FLAGS=""
5656 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5657 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5658 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005659 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5661 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005662 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005663 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664
5665 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5666 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005667 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005668 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005670 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5671 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005672 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005673 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005674
5675 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5676 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005677 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005678 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005681 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 +00005682
5683 fi
5684
5685
Ronald Oussoren666028b2010-04-18 19:07:43 +00005686 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5687 if test "${UNIVERSALSDK}" != "/"
5688 then
5689 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5690 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005691 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 fi
5693 fi
5694
5695 # Calculate the right deployment target for this build.
5696 #
5697 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5698 if test ${cur_target} '>' 10.2; then
5699 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005700 if test ${enable_universalsdk}; then
5701 if test "${UNIVERSAL_ARCHS}" = "all"; then
5702 # Ensure that the default platform for a
5703 # 4-way universal build is OSX 10.5,
5704 # that's the first OS release where
5705 # 4-way builds make sense.
5706 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005707
5708 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5709 cur_target='10.5'
5710
5711 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5712 cur_target='10.5'
5713
5714 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5715 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005716 fi
5717 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005718 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005719 # On Intel macs default to a deployment
5720 # target of 10.4, that's the first OSX
5721 # release with Intel support.
5722 cur_target="10.4"
5723 fi
5724 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 fi
5726 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5727
5728 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5729 # environment with a value that is the same as what we'll use
5730 # in the Makefile to ensure that we'll get the same compiler
5731 # environment during configure and build time.
5732 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5733 export MACOSX_DEPLOYMENT_TARGET
5734 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5735
5736 ;;
5737 OSF*)
5738 BASECFLAGS="$BASECFLAGS -mieee"
5739 ;;
5740 esac
5741 ;;
5742
5743*)
5744 case $ac_sys_system in
5745 OpenUNIX*|UnixWare*)
5746 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5747 ;;
5748 OSF*)
5749 BASECFLAGS="$BASECFLAGS -ieee -std"
5750 ;;
5751 SCO_SV*)
5752 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5753 ;;
5754 esac
5755 ;;
5756esac
5757
5758if test "$Py_DEBUG" = 'true'; then
5759 :
5760else
5761 OPT="-DNDEBUG $OPT"
5762fi
5763
5764if test "$ac_arch_flags"
5765then
5766 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5767fi
5768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769# Check whether GCC supports PyArg_ParseTuple format
5770if test "$GCC" = "yes"
5771then
Matthias Kloseb9621712010-04-24 17:59:49 +00005772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5773$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 save_CFLAGS=$CFLAGS
5775 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777/* end confdefs.h. */
5778
5779 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780int
5781main ()
5782{
5783
5784 ;
5785 return 0;
5786}
Matthias Kloseb159a552010-04-25 21:00:44 +00005787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005789if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
Matthias Kloseb159a552010-04-25 21:00:44 +00005791
Matthias Kloseb9621712010-04-24 17:59:49 +00005792$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793
Matthias Kloseb159a552010-04-25 21:00:44 +00005794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005795$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797else
Matthias Kloseb159a552010-04-25 21:00:44 +00005798
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005800$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801
5802fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 CFLAGS=$save_CFLAGS
5805fi
5806
5807# On some compilers, pthreads are available without further options
5808# (e.g. MacOS X). On some of these systems, the compiler will not
5809# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5810# So we have to see first whether pthreads are available without
5811# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5813$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005814if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816else
Matthias Kloseb9621712010-04-24 17:59:49 +00005817 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 ac_cv_pthread_is_default=no
5819else
Matthias Kloseb9621712010-04-24 17:59:49 +00005820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821/* end confdefs.h. */
5822
5823#include <pthread.h>
5824
5825void* routine(void* p){return NULL;}
5826
5827int main(){
5828 pthread_t p;
5829 if(pthread_create(&p,NULL,routine,NULL)!=0)
5830 return 1;
5831 (void)pthread_detach(p);
5832 return 0;
5833}
5834
5835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837
5838 ac_cv_pthread_is_default=yes
5839 ac_cv_kthread=no
5840 ac_cv_pthread=no
5841
5842else
Matthias Kloseb9621712010-04-24 17:59:49 +00005843 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
5848
5849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850fi
5851
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5853$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854
5855
5856if test $ac_cv_pthread_is_default = yes
5857then
5858 ac_cv_kpthread=no
5859else
5860# -Kpthread, if available, provides the right #defines
5861# and linker options to make pthread_create available
5862# Some compilers won't report that they do not support -Kpthread,
5863# so we need to run a program to see whether it really made the
5864# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5866$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005867if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005868 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869else
5870 ac_save_cc="$CC"
5871CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005872if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 ac_cv_kpthread=no
5874else
Matthias Kloseb9621712010-04-24 17:59:49 +00005875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876/* end confdefs.h. */
5877
5878#include <pthread.h>
5879
5880void* routine(void* p){return NULL;}
5881
5882int main(){
5883 pthread_t p;
5884 if(pthread_create(&p,NULL,routine,NULL)!=0)
5885 return 1;
5886 (void)pthread_detach(p);
5887 return 0;
5888}
5889
5890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 ac_cv_kpthread=yes
5893else
Matthias Kloseb9621712010-04-24 17:59:49 +00005894 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898fi
5899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900CC="$ac_save_cc"
5901fi
5902
Matthias Kloseb9621712010-04-24 17:59:49 +00005903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5904$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905fi
5906
5907if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5908then
5909# -Kthread, if available, provides the right #defines
5910# and linker options to make pthread_create available
5911# Some compilers won't report that they do not support -Kthread,
5912# so we need to run a program to see whether it really made the
5913# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5915$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005916if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005917 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918else
5919 ac_save_cc="$CC"
5920CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005921if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ac_cv_kthread=no
5923else
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925/* end confdefs.h. */
5926
5927#include <pthread.h>
5928
5929void* routine(void* p){return NULL;}
5930
5931int main(){
5932 pthread_t p;
5933 if(pthread_create(&p,NULL,routine,NULL)!=0)
5934 return 1;
5935 (void)pthread_detach(p);
5936 return 0;
5937}
5938
5939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005940if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ac_cv_kthread=yes
5942else
Matthias Kloseb9621712010-04-24 17:59:49 +00005943 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947fi
5948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949CC="$ac_save_cc"
5950fi
5951
Matthias Kloseb9621712010-04-24 17:59:49 +00005952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5953$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954fi
5955
5956if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5957then
5958# -pthread, if available, provides the right #defines
5959# and linker options to make pthread_create available
5960# Some compilers won't report that they do not support -pthread,
5961# so we need to run a program to see whether it really made the
5962# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5964$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005965if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967else
5968 ac_save_cc="$CC"
5969CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005970if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ac_cv_pthread=no
5972else
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974/* end confdefs.h. */
5975
5976#include <pthread.h>
5977
5978void* routine(void* p){return NULL;}
5979
5980int main(){
5981 pthread_t p;
5982 if(pthread_create(&p,NULL,routine,NULL)!=0)
5983 return 1;
5984 (void)pthread_detach(p);
5985 return 0;
5986}
5987
5988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005989if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ac_cv_pthread=yes
5991else
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996fi
5997
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998CC="$ac_save_cc"
5999fi
6000
Matthias Kloseb9621712010-04-24 17:59:49 +00006001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6002$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003fi
6004
6005# If we have set a CC compiler flag for thread support then
6006# check if it works for CXX, too.
6007ac_cv_cxx_thread=no
6008if test ! -z "$CXX"
6009then
Matthias Kloseb9621712010-04-24 17:59:49 +00006010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6011$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012ac_save_cxx="$CXX"
6013
6014if test "$ac_cv_kpthread" = "yes"
6015then
6016 CXX="$CXX -Kpthread"
6017 ac_cv_cxx_thread=yes
6018elif test "$ac_cv_kthread" = "yes"
6019then
6020 CXX="$CXX -Kthread"
6021 ac_cv_cxx_thread=yes
6022elif test "$ac_cv_pthread" = "yes"
6023then
6024 CXX="$CXX -pthread"
6025 ac_cv_cxx_thread=yes
6026fi
6027
6028if test $ac_cv_cxx_thread = yes
6029then
6030 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6031 $CXX -c conftest.$ac_ext 2>&5
6032 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6033 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6034 then
6035 ac_cv_cxx_thread=yes
6036 else
6037 ac_cv_cxx_thread=no
6038 fi
6039 rm -fr conftest*
6040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6042$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043fi
6044CXX="$ac_save_cxx"
6045
6046
6047# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6049$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006050if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052else
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054/* end confdefs.h. */
6055#include <stdlib.h>
6056#include <stdarg.h>
6057#include <string.h>
6058#include <float.h>
6059
6060int
6061main ()
6062{
6063
6064 ;
6065 return 0;
6066}
6067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006068if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069 ac_cv_header_stdc=yes
6070else
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6074
6075if test $ac_cv_header_stdc = yes; then
6076 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078/* end confdefs.h. */
6079#include <string.h>
6080
6081_ACEOF
6082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 $EGREP "memchr" >/dev/null 2>&1; then :
6084
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085else
6086 ac_cv_header_stdc=no
6087fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006088rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089
6090fi
6091
6092if test $ac_cv_header_stdc = yes; then
6093 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095/* end confdefs.h. */
6096#include <stdlib.h>
6097
6098_ACEOF
6099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 $EGREP "free" >/dev/null 2>&1; then :
6101
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102else
6103 ac_cv_header_stdc=no
6104fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006105rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106
6107fi
6108
6109if test $ac_cv_header_stdc = yes; then
6110 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112 :
6113else
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115/* end confdefs.h. */
6116#include <ctype.h>
6117#include <stdlib.h>
6118#if ((' ' & 0x0FF) == 0x020)
6119# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6120# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6121#else
6122# define ISLOWER(c) \
6123 (('a' <= (c) && (c) <= 'i') \
6124 || ('j' <= (c) && (c) <= 'r') \
6125 || ('s' <= (c) && (c) <= 'z'))
6126# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6127#endif
6128
6129#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6130int
6131main ()
6132{
6133 int i;
6134 for (i = 0; i < 256; i++)
6135 if (XOR (islower (i), ISLOWER (i))
6136 || toupper (i) != TOUPPER (i))
6137 return 2;
6138 return 0;
6139}
6140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006141if ac_fn_c_try_run "$LINENO"; then :
6142
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143else
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148fi
6149
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150fi
6151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6153$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154if test $ac_cv_header_stdc = yes; then
6155
Matthias Kloseb9621712010-04-24 17:59:49 +00006156$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157
6158fi
6159
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006160for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6161fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006162ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006163shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006164unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006165sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6166sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006167sys/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 -08006168sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006169sys/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 +00006170sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006171bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006172do :
6173 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6174ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006175if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006176 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006177#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006178_ACEOF
6179
6180fi
6181
Guido van Rossum627b2d71993-12-24 10:39:16 +00006182done
6183
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006184ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006185for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6188$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006189if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006191else
Matthias Kloseb9621712010-04-24 17:59:49 +00006192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006193/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006194#include <sys/types.h>
6195#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006196
Martin v. Löwis11437992002-04-12 09:54:03 +00006197int
6198main ()
6199{
6200if ((DIR *) 0)
6201return 0;
6202 ;
6203 return 0;
6204}
6205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006207 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006208else
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006213eval ac_res=\$$as_ac_Header
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6215$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006216if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006217 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006218#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006219_ACEOF
6220
6221ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006223
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006224done
6225# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6226if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6228$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006229if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006230 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006231else
Martin v. Löwis11437992002-04-12 09:54:03 +00006232 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236/* Override any GCC internal prototype to avoid an error.
6237 Use char because int might match the return type of a GCC
6238 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006239#ifdef __cplusplus
6240extern "C"
6241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006242char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006243int
6244main ()
6245{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006247 ;
6248 return 0;
6249}
6250_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251for ac_lib in '' dir; do
6252 if test -z "$ac_lib"; then
6253 ac_res="none required"
6254 else
6255 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006256 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006257 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006258 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006261rm -f core conftest.err conftest.$ac_objext \
6262 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006263 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006264 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006266done
Gregory P. Smith69140482012-01-16 02:05:55 -08006267if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006268
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006269else
6270 ac_cv_search_opendir=no
6271fi
6272rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006273LIBS=$ac_func_search_save_LIBS
6274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6276$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006277ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006278if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006279 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006280
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006281fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006282
Michael W. Hudson54241132001-12-07 15:38:26 +00006283else
Matthias Kloseb9621712010-04-24 17:59:49 +00006284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6285$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006286if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006288else
6289 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006293/* Override any GCC internal prototype to avoid an error.
6294 Use char because int might match the return type of a GCC
6295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006296#ifdef __cplusplus
6297extern "C"
6298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006299char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006300int
6301main ()
6302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006303return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006304 ;
6305 return 0;
6306}
6307_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006308for ac_lib in '' x; do
6309 if test -z "$ac_lib"; then
6310 ac_res="none required"
6311 else
6312 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006313 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006314 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006315 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006316 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006318rm -f core conftest.err conftest.$ac_objext \
6319 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006320 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006321 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006323done
Gregory P. Smith69140482012-01-16 02:05:55 -08006324if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006326else
6327 ac_cv_search_opendir=no
6328fi
6329rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006330LIBS=$ac_func_search_save_LIBS
6331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6333$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006334ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006335if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006337
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006338fi
6339
6340fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006341
Matthias Kloseb9621712010-04-24 17:59:49 +00006342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6343$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006344if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006345 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006346else
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006348/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006350int
6351main ()
6352{
6353return makedev(0, 0);
6354 ;
6355 return 0;
6356}
6357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006358if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359 ac_cv_header_sys_types_h_makedev=yes
6360else
Matthias Kloseb9621712010-04-24 17:59:49 +00006361 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006363rm -f core conftest.err conftest.$ac_objext \
6364 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006365
6366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6368$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369
6370if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006371ac_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 -08006372if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006373
Matthias Kloseb9621712010-04-24 17:59:49 +00006374$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006375
6376fi
6377
6378
6379
6380 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006381 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 -08006382if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006383
Matthias Kloseb9621712010-04-24 17:59:49 +00006384$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006385
6386fi
6387
6388
6389 fi
6390fi
6391
Michael W. Hudson54241132001-12-07 15:38:26 +00006392
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006393# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006394for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006395do :
6396 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006397#ifdef HAVE_CURSES_H
6398#include <curses.h>
6399#endif
6400
Matthias Kloseb9621712010-04-24 17:59:49 +00006401"
Gregory P. Smith69140482012-01-16 02:05:55 -08006402if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006403 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006404#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006405_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006406
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006407fi
6408
6409done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006410
6411
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006413for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006414do :
6415 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 +00006416#ifdef HAVE_ASM_TYPES_H
6417#include <asm/types.h>
6418#endif
6419#ifdef HAVE_SYS_SOCKET_H
6420#include <sys/socket.h>
6421#endif
6422
Matthias Kloseb9621712010-04-24 17:59:49 +00006423"
Gregory P. Smith69140482012-01-16 02:05:55 -08006424if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006426#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427_ACEOF
6428
6429fi
6430
6431done
6432
6433
Guido van Rossum627b2d71993-12-24 10:39:16 +00006434# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006435was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6437$as_echo_n "checking for clock_t in time.h... " >&6; }
6438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006439/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006440#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006441
6442_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006444 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006445 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006446else
Martin v. Löwis11437992002-04-12 09:54:03 +00006447
6448
Matthias Kloseb9621712010-04-24 17:59:49 +00006449$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006450
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006451
Guido van Rossum627b2d71993-12-24 10:39:16 +00006452fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006453rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006454
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6456$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006457
Neal Norwitz11690112002-07-30 01:08:28 +00006458# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6460$as_echo_n "checking for makedev... " >&6; }
6461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006462/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006463
Jesus Cea740f53a2010-04-28 11:35:30 +00006464#if defined(MAJOR_IN_MKDEV)
6465#include <sys/mkdev.h>
6466#elif defined(MAJOR_IN_SYSMACROS)
6467#include <sys/sysmacros.h>
6468#else
6469#include <sys/types.h>
6470#endif
6471
Neal Norwitz11690112002-07-30 01:08:28 +00006472int
6473main ()
6474{
Jesus Cea740f53a2010-04-28 11:35:30 +00006475
6476 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006477 ;
6478 return 0;
6479}
Matthias Kloseb159a552010-04-25 21:00:44 +00006480
Neal Norwitz11690112002-07-30 01:08:28 +00006481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006482if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006483 ac_cv_has_makedev=yes
6484else
Matthias Kloseb9621712010-04-24 17:59:49 +00006485 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006487rm -f core conftest.err conftest.$ac_objext \
6488 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006489if test "$ac_cv_has_makedev" = "no"; then
6490 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006492/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006493
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006494#define _OSF_SOURCE 1
6495#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006496
Neal Norwitz11690112002-07-30 01:08:28 +00006497int
6498main ()
6499{
6500 makedev(0, 0)
6501 ;
6502 return 0;
6503}
6504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006505if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006506 ac_cv_has_makedev=yes
6507else
Matthias Kloseb9621712010-04-24 17:59:49 +00006508 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006510rm -f core conftest.err conftest.$ac_objext \
6511 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006512 if test "$ac_cv_has_makedev" = "yes"; then
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006515
6516 fi
6517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6519$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006520if test "$ac_cv_has_makedev" = "yes"; then
6521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006523
6524fi
6525
Martin v. Löwis399a6892002-10-04 10:22:02 +00006526# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6527# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6528# defined, but the compiler does not support pragma redefine_extname,
6529# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6530# structures (such as rlimit64) without declaring them. As a
6531# work-around, disable LFS on such configurations
6532
6533use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6535$as_echo_n "checking Solaris LFS bug... " >&6; }
6536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006537/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006538
6539#define _LARGEFILE_SOURCE 1
6540#define _FILE_OFFSET_BITS 64
6541#include <sys/resource.h>
6542
Martin v. Löwis399a6892002-10-04 10:22:02 +00006543int
6544main ()
6545{
6546struct rlimit foo;
6547 ;
6548 return 0;
6549}
6550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006552 sol_lfs_bug=no
6553else
Matthias Kloseb9621712010-04-24 17:59:49 +00006554 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6558$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006559if test "$sol_lfs_bug" = "yes"; then
6560 use_lfs=no
6561fi
6562
6563if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006564# Two defines needed to enable largefile support on various platforms
6565# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006566case $ac_sys_system/$ac_sys_release in
6567AIX*)
6568
6569$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6570
6571 ;;
6572esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006573
Matthias Kloseb9621712010-04-24 17:59:49 +00006574$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006575
6576
Matthias Kloseb9621712010-04-24 17:59:49 +00006577$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006578
Martin v. Löwis399a6892002-10-04 10:22:02 +00006579fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006580
Guido van Rossum84e7b241996-08-19 21:59:00 +00006581# Add some code to confdefs.h so that the test for off_t works on SCO
6582cat >> confdefs.h <<\EOF
6583#if defined(SCO_DS)
6584#undef _OFF_T
6585#endif
6586EOF
6587
Guido van Rossumef2255b2000-03-10 22:30:29 +00006588# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006589ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006590if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006591
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006592else
Martin v. Löwis11437992002-04-12 09:54:03 +00006593
6594cat >>confdefs.h <<_ACEOF
6595#define mode_t int
6596_ACEOF
6597
6598fi
6599
Matthias Kloseb9621712010-04-24 17:59:49 +00006600ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006601if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006602
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006603else
Martin v. Löwis11437992002-04-12 09:54:03 +00006604
6605cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006606#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006607_ACEOF
6608
6609fi
6610
Matthias Kloseb9621712010-04-24 17:59:49 +00006611ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006612if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614else
Martin v. Löwis11437992002-04-12 09:54:03 +00006615
6616cat >>confdefs.h <<_ACEOF
6617#define pid_t int
6618_ACEOF
6619
6620fi
6621
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006624#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006625_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006626
Matthias Kloseb9621712010-04-24 17:59:49 +00006627ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006628if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006630else
Martin v. Löwis11437992002-04-12 09:54:03 +00006631
6632cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006634_ACEOF
6635
6636fi
6637
Matthias Kloseb9621712010-04-24 17:59:49 +00006638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6639$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006640if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006642else
Matthias Kloseb9621712010-04-24 17:59:49 +00006643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006644/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006645#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006646
6647_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006650 ac_cv_type_uid_t=yes
6651else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006652 ac_cv_type_uid_t=no
6653fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006654rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006655
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6658$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006659if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006660
Matthias Kloseb9621712010-04-24 17:59:49 +00006661$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006662
6663
Matthias Kloseb9621712010-04-24 17:59:49 +00006664$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006665
6666fi
6667
Matthias Kloseb9621712010-04-24 17:59:49 +00006668ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6669case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006670 no|yes) ;; #(
6671 *)
6672
Matthias Kloseb9621712010-04-24 17:59:49 +00006673$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006674
6675
6676cat >>confdefs.h <<_ACEOF
6677#define uint32_t $ac_cv_c_uint32_t
6678_ACEOF
6679;;
6680 esac
6681
Matthias Kloseb9621712010-04-24 17:59:49 +00006682ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6683case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006684 no|yes) ;; #(
6685 *)
6686
Matthias Kloseb9621712010-04-24 17:59:49 +00006687$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006688
6689
6690cat >>confdefs.h <<_ACEOF
6691#define uint64_t $ac_cv_c_uint64_t
6692_ACEOF
6693;;
6694 esac
6695
Matthias Kloseb9621712010-04-24 17:59:49 +00006696ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6697case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006698 no|yes) ;; #(
6699 *)
6700
6701cat >>confdefs.h <<_ACEOF
6702#define int32_t $ac_cv_c_int32_t
6703_ACEOF
6704;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006705esac
6706
Matthias Kloseb9621712010-04-24 17:59:49 +00006707ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6708case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006709 no|yes) ;; #(
6710 *)
6711
6712cat >>confdefs.h <<_ACEOF
6713#define int64_t $ac_cv_c_int64_t
6714_ACEOF
6715;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006716esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006717
Matthias Kloseb9621712010-04-24 17:59:49 +00006718ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006719if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720
Matthias Kloseb9621712010-04-24 17:59:49 +00006721$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006722
6723fi
6724
Jack Jansendd19cf82001-12-06 22:36:17 +00006725
Michael W. Hudson54241132001-12-07 15:38:26 +00006726# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006727# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728# The cast to long int works around a bug in the HP C Compiler
6729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6733$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006734if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 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 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 if test "$ac_cv_type_int" = yes; then
6741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006743as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006744See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745 else
6746 ac_cv_sizeof_int=0
6747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6752$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006753
6754
6755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006757#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006758_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006759
6760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761# The cast to long int works around a bug in the HP C Compiler
6762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6766$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006767if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 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 +00006771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772else
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 if test "$ac_cv_type_long" = yes; then
6774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006776as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006777See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778 else
6779 ac_cv_sizeof_long=0
6780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006782
Martin v. Löwis11437992002-04-12 09:54:03 +00006783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6785$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786
6787
6788
Martin v. Löwis11437992002-04-12 09:54:03 +00006789cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006790#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006791_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006792
6793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794# The cast to long int works around a bug in the HP C Compiler
6795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6797# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6799$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006800if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 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 +00006804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 if test "$ac_cv_type_void_p" = yes; then
6807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006809as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006810See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811 else
6812 ac_cv_sizeof_void_p=0
6813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006815
Martin v. Löwis11437992002-04-12 09:54:03 +00006816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6818$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006819
6820
6821
Martin v. Löwis11437992002-04-12 09:54:03 +00006822cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006823#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006824_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006825
6826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006827# The cast to long int works around a bug in the HP C Compiler
6828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6832$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006833if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 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 +00006837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 if test "$ac_cv_type_short" = yes; then
6840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006842as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006843See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844 else
6845 ac_cv_sizeof_short=0
6846 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006848
Martin v. Löwis11437992002-04-12 09:54:03 +00006849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6851$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852
6853
6854
Martin v. Löwis11437992002-04-12 09:54:03 +00006855cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006856#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006857_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006858
6859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006860# The cast to long int works around a bug in the HP C Compiler
6861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6863# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6865$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006866if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006867 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 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 +00006870
Martin v. Löwis11437992002-04-12 09:54:03 +00006871else
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 if test "$ac_cv_type_float" = yes; then
6873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006875as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08006876See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006877 else
6878 ac_cv_sizeof_float=0
6879 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881
Martin v. Löwis11437992002-04-12 09:54:03 +00006882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6884$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885
6886
6887
Martin v. Löwis11437992002-04-12 09:54:03 +00006888cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006889#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006890_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006891
6892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893# The cast to long int works around a bug in the HP C Compiler
6894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6896# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6898$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006899if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 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 +00006903
Martin v. Löwis11437992002-04-12 09:54:03 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 if test "$ac_cv_type_double" = yes; then
6906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006908as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08006909See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910 else
6911 ac_cv_sizeof_double=0
6912 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006914
Martin v. Löwis11437992002-04-12 09:54:03 +00006915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6917$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918
6919
6920
Martin v. Löwis11437992002-04-12 09:54:03 +00006921cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006922#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006923_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006924
6925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006926# The cast to long int works around a bug in the HP C Compiler
6927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6929# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6931$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006932if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006934else
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 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 +00006936
Martin v. Löwis11437992002-04-12 09:54:03 +00006937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 if test "$ac_cv_type_fpos_t" = yes; then
6939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006941as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08006942See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943 else
6944 ac_cv_sizeof_fpos_t=0
6945 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006947
Martin v. Löwis11437992002-04-12 09:54:03 +00006948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6950$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006951
6952
6953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006955#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006956_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006957
Michael W. Hudson54241132001-12-07 15:38:26 +00006958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006959# The cast to long int works around a bug in the HP C Compiler
6960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6962# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6964$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006965if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 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 +00006969
Martin v. Löwis18e16552006-02-15 17:27:45 +00006970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 if test "$ac_cv_type_size_t" = yes; then
6972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006974as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08006975See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976 else
6977 ac_cv_sizeof_size_t=0
6978 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980
Martin v. Löwis18e16552006-02-15 17:27:45 +00006981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6983$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984
6985
6986
Martin v. Löwis18e16552006-02-15 17:27:45 +00006987cat >>confdefs.h <<_ACEOF
6988#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6989_ACEOF
6990
6991
Christian Heimes400adb02008-02-01 08:12:03 +00006992# The cast to long int works around a bug in the HP C Compiler
6993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6995# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6997$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006998if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007000else
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 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 +00007002
Christian Heimes400adb02008-02-01 08:12:03 +00007003else
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 if test "$ac_cv_type_pid_t" = yes; then
7005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007007as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007008See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007009 else
7010 ac_cv_sizeof_pid_t=0
7011 fi
7012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013
Christian Heimes400adb02008-02-01 08:12:03 +00007014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7016$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007017
7018
7019
7020cat >>confdefs.h <<_ACEOF
7021#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7022_ACEOF
7023
7024
Michael W. Hudson54241132001-12-07 15:38:26 +00007025
Matthias Kloseb9621712010-04-24 17:59:49 +00007026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7027$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007028have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007030/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007031
Martin v. Löwis11437992002-04-12 09:54:03 +00007032int
7033main ()
7034{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007035long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 ;
7037 return 0;
7038}
7039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007041
7042
Matthias Kloseb9621712010-04-24 17:59:49 +00007043$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007044
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007045 have_long_long=yes
7046
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7050$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007051if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007052# The cast to long int works around a bug in the HP C Compiler
7053# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7054# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7055# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7057$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007058if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007059 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007060else
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 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 +00007062
Martin v. Löwis11437992002-04-12 09:54:03 +00007063else
Matthias Kloseb9621712010-04-24 17:59:49 +00007064 if test "$ac_cv_type_long_long" = yes; then
7065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007067as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007068See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069 else
7070 ac_cv_sizeof_long_long=0
7071 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007073
Martin v. Löwis11437992002-04-12 09:54:03 +00007074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7076$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077
7078
7079
Martin v. Löwis11437992002-04-12 09:54:03 +00007080cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007081#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007082_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007083
Michael W. Hudson54241132001-12-07 15:38:26 +00007084
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007085fi
7086
Matthias Kloseb9621712010-04-24 17:59:49 +00007087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7088$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007089have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007091/* end confdefs.h. */
7092
7093int
7094main ()
7095{
7096long double x; x = (long double)0;
7097 ;
7098 return 0;
7099}
7100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007101if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007102
7103
Matthias Kloseb9621712010-04-24 17:59:49 +00007104$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007105
7106 have_long_double=yes
7107
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007108fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7111$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007112if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007113# The cast to long int works around a bug in the HP C Compiler
7114# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7115# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7116# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7118$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007119if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007120 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007121else
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 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 +00007123
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007124else
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 if test "$ac_cv_type_long_double" = yes; then
7126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007128as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007129See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007130 else
7131 ac_cv_sizeof_long_double=0
7132 fi
7133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007134
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7137$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007138
7139
7140
7141cat >>confdefs.h <<_ACEOF
7142#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7143_ACEOF
7144
7145
7146fi
7147
7148
Matthias Kloseb9621712010-04-24 17:59:49 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7150$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007151have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007153/* end confdefs.h. */
7154
7155int
7156main ()
7157{
7158_Bool x; x = (_Bool)0;
7159 ;
7160 return 0;
7161}
7162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007163if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007164
7165
Matthias Kloseb9621712010-04-24 17:59:49 +00007166$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007167
7168 have_c99_bool=yes
7169
Thomas Woutersb2137042007-02-01 18:02:27 +00007170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7173$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007174if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007175# The cast to long int works around a bug in the HP C Compiler
7176# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7177# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7178# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7180$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007181if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007183else
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 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 +00007185
Thomas Woutersb2137042007-02-01 18:02:27 +00007186else
Matthias Kloseb9621712010-04-24 17:59:49 +00007187 if test "$ac_cv_type__Bool" = yes; then
7188 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7189$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007190as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007191See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192 else
7193 ac_cv_sizeof__Bool=0
7194 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007196
Thomas Woutersb2137042007-02-01 18:02:27 +00007197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7199$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007200
7201
7202
Thomas Woutersb2137042007-02-01 18:02:27 +00007203cat >>confdefs.h <<_ACEOF
7204#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7205_ACEOF
7206
7207
7208fi
7209
Matthias Kloseb9621712010-04-24 17:59:49 +00007210ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007211 #include <stdint.h>
7212 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007213 #ifdef HAVE_INTTYPES_H
7214 #include <inttypes.h>
7215 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007216"
Gregory P. Smith69140482012-01-16 02:05:55 -08007217if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007218
7219cat >>confdefs.h <<_ACEOF
7220#define HAVE_UINTPTR_T 1
7221_ACEOF
7222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007223# The cast to long int works around a bug in the HP C Compiler
7224# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7225# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7226# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7228$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007229if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007231else
Matthias Kloseb9621712010-04-24 17:59:49 +00007232 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 +00007233
Martin v. Löwis11437992002-04-12 09:54:03 +00007234else
Matthias Kloseb9621712010-04-24 17:59:49 +00007235 if test "$ac_cv_type_uintptr_t" = yes; then
7236 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007238as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007239See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240 else
7241 ac_cv_sizeof_uintptr_t=0
7242 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007244
Martin v. Löwis11437992002-04-12 09:54:03 +00007245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7247$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007248
7249
7250
Martin v. Löwis11437992002-04-12 09:54:03 +00007251cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007252#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007253_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007254
Michael W. Hudson54241132001-12-07 15:38:26 +00007255
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007256fi
7257
Thomas Wouters89f507f2006-12-13 04:49:30 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259# The cast to long int works around a bug in the HP C Compiler
7260# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7261# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7262# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7264$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007265if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267else
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007269#ifdef HAVE_SYS_TYPES_H
7270#include <sys/types.h>
7271#endif
7272
Matthias Kloseb9621712010-04-24 17:59:49 +00007273"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275else
Matthias Kloseb9621712010-04-24 17:59:49 +00007276 if test "$ac_cv_type_off_t" = yes; then
7277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007279as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007280See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007281 else
7282 ac_cv_sizeof_off_t=0
7283 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007285
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7288$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007290
7291
Martin v. Löwis11437992002-04-12 09:54:03 +00007292cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007293#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007294_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007295
Michael W. Hudson54241132001-12-07 15:38:26 +00007296
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007297
Matthias Kloseb9621712010-04-24 17:59:49 +00007298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7299$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007300if test "$have_long_long" = yes
7301then
7302if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007303 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007304
Matthias Kloseb9621712010-04-24 17:59:49 +00007305$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7308$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007309else
Matthias Kloseb9621712010-04-24 17:59:49 +00007310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007312fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7315$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007316fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007318# The cast to long int works around a bug in the HP C Compiler
7319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7321# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7323$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007324if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007326else
Matthias Kloseb9621712010-04-24 17:59:49 +00007327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007328#ifdef HAVE_SYS_TYPES_H
7329#include <sys/types.h>
7330#endif
7331#ifdef HAVE_TIME_H
7332#include <time.h>
7333#endif
7334
Matthias Kloseb9621712010-04-24 17:59:49 +00007335"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007337else
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 if test "$ac_cv_type_time_t" = yes; then
7339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007341as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007342See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007343 else
7344 ac_cv_sizeof_time_t=0
7345 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007347
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7350$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007351
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007352
7353
Martin v. Löwis11437992002-04-12 09:54:03 +00007354cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007355#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007356_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007357
Michael W. Hudson54241132001-12-07 15:38:26 +00007358
7359
Trent Mick635f6fb2000-08-23 21:33:05 +00007360# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007361ac_save_cc="$CC"
7362if test "$ac_cv_kpthread" = "yes"
7363then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007364elif test "$ac_cv_kthread" = "yes"
7365then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007366elif test "$ac_cv_pthread" = "yes"
7367then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007368fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7371$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007372have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007374/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007375
7376 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007377int
7378main ()
7379{
Guido van Rossum12580492000-09-24 16:47:19 +00007380pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007381 ;
7382 return 0;
7383}
Matthias Kloseb159a552010-04-25 21:00:44 +00007384
Martin v. Löwis11437992002-04-12 09:54:03 +00007385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007386if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007387 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7391$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007392if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7396# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7398$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007399if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007400 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007403#ifdef HAVE_PTHREAD_H
7404#include <pthread.h>
7405#endif
7406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007409else
Matthias Kloseb9621712010-04-24 17:59:49 +00007410 if test "$ac_cv_type_pthread_t" = yes; then
7411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007413as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007414See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007415 else
7416 ac_cv_sizeof_pthread_t=0
7417 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007419
Trent Mick635f6fb2000-08-23 21:33:05 +00007420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7422$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007423
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007424
7425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007427#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007428_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007429
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007430
Trent Mick635f6fb2000-08-23 21:33:05 +00007431fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007432CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007433
Michael W. Hudson54241132001-12-07 15:38:26 +00007434
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007435case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007436 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007437 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7438 ;;
7439 Darwin/*)
7440 OTHER_LIBTOOL_OPT=""
7441 ;;
7442esac
7443
7444
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007445ARCH_RUN_32BIT=""
7446
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007447case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007448 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007449 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7450 if test "${enable_universalsdk}"; then
7451 :
7452 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007453 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007454 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007455 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007456 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007457 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007458 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007459 if test ${gcc_version} '<' 4.0
7460 then
7461 LIBTOOL_CRUFT="-lcc_dynamic"
7462 else
7463 LIBTOOL_CRUFT=""
7464 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007466 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007467else
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007469/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007470
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007471 #include <unistd.h>
7472 int main(int argc, char*argv[])
7473 {
7474 if (sizeof(long) == 4) {
7475 return 0;
7476 } else {
7477 return 1;
7478 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007479 }
7480
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007482if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007483 ac_osx_32bit=yes
7484else
Matthias Kloseb9621712010-04-24 17:59:49 +00007485 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7488 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007489fi
7490
7491
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007492 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007493 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007494 i386)
7495 MACOSX_DEFAULT_ARCH="i386"
7496 ;;
7497 ppc)
7498 MACOSX_DEFAULT_ARCH="ppc"
7499 ;;
7500 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007501 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007502 ;;
7503 esac
7504 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007505 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007506 i386)
7507 MACOSX_DEFAULT_ARCH="x86_64"
7508 ;;
7509 ppc)
7510 MACOSX_DEFAULT_ARCH="ppc64"
7511 ;;
7512 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007513 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007514 ;;
7515 esac
7516
7517 #ARCH_RUN_32BIT="true"
7518 fi
7519
7520 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007521 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007522 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007523esac
7524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7526$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007527if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007528then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007529 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007530 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007531 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007532
Matthias Kloseb9621712010-04-24 17:59:49 +00007533$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007534
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7536$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007537 if test $enable_shared = "yes"
7538 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007539 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 +00007540 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007541else
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7543$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007544fi
7545
Matthias Kloseb9621712010-04-24 17:59:49 +00007546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7547$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007548case $ac_sys_system/$ac_sys_release in
7549 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007550
Matthias Kloseb9621712010-04-24 17:59:49 +00007551$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007552
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7554$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007555 ;;
7556 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7558$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007559 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007560esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007561
Guido van Rossum0a516c91994-09-12 10:58:40 +00007562# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007563
Michael W. Hudson54241132001-12-07 15:38:26 +00007564
7565
7566
7567
Benjamin Peterson99f03762010-04-11 22:15:28 +00007568
Thomas Wouters477c8d52006-05-27 19:21:47 +00007569
Georg Brandlb1441c72009-01-03 22:33:39 +00007570
Thomas Wouters477c8d52006-05-27 19:21:47 +00007571cat >>confdefs.h <<_ACEOF
7572#define SHLIB_EXT "$SO"
7573_ACEOF
7574
Guido van Rossum0a516c91994-09-12 10:58:40 +00007575# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007576# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007577# (Shared libraries in this instance are shared modules to be loaded into
7578# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7580$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007581if test -z "$LDSHARED"
7582then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007583 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007584 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007585 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007586 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007587 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007588 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007589 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 if test "$GCC" = "yes" ; then
7592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared'
7594 else
7595 LDSHARED='$(CC) -G'
7596 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007597 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007598 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007599 if test "$GCC" = "yes" ; then
7600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared'
7602 else
7603 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007604 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007605 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007606 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007607 LDSHARED='$(CC) -bundle'
7608 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007609 if test "$enable_framework" ; then
7610 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007611 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7612 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007613 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007614 else
7615 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007616 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007617 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007618 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007619 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007620 LDSHARED='$(CC) -bundle'
7621 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007622 if test "$enable_framework" ; then
7623 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007624 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7625 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007626 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007627 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007628 # No framework, use the Python app as bundle-loader
7629 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007630 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007631 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007632 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007633 Darwin/*)
7634 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7635 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007636
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007637 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007638 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007639 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007640 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007641 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007642 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7643 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007644 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007645 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007646 LDSHARED='$(CC) -bundle'
7647 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007648 if test "$enable_framework" ; then
7649 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007650 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7651 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007652 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007653 else
7654 # No framework, use the Python app as bundle-loader
7655 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7656 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007657 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007658 fi
7659 fi
7660 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007661 Linux*|GNU*|QNX*)
7662 LDSHARED='$(CC) -shared'
7663 LDCXXSHARED='$(CXX) -shared';;
7664 BSD/OS*/4*)
7665 LDSHARED="gcc -shared"
7666 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007667 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007668 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007669 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007670 LDSHARED='$(CC) -shared'
7671 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007672 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007673 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007674 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007675 OpenBSD*)
7676 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7677 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007678 LDSHARED='$(CC) -shared $(CCSHARED)'
7679 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007680 else
7681 case `uname -r` in
7682 [01].* | 2.[0-7] | 2.[0-7].*)
7683 LDSHARED="ld -Bshareable ${LDFLAGS}"
7684 ;;
7685 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007686 LDSHARED='$(CC) -shared $(CCSHARED)'
7687 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007688 ;;
7689 esac
7690 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007691 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007692 LDSHARED='$(CC) -shared'
7693 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007694 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007695 if test "$GCC" = "yes" ; then
7696 LDSHARED='$(CC) -shared'
7697 LDCXXSHARED='$(CXX) -shared'
7698 else
7699 LDSHARED='$(CC) -G'
7700 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007701 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007702 SCO_SV*)
7703 LDSHARED='$(CC) -Wl,-G,-Bexport'
7704 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7705 CYGWIN*)
7706 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7707 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007708 *) LDSHARED="ld";;
7709 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7712$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007713LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007714BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007715# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007716# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7718$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007719if test -z "$CCSHARED"
7720then
Guido van Rossum07397971997-04-29 21:49:50 +00007721 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007722 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007723 then CCSHARED="-fPIC";
7724 elif test `uname -p` = sparc;
7725 then CCSHARED="-xcode=pic32";
7726 else CCSHARED="-Kpic";
7727 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007728 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007729 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007730 else CCSHARED="+z";
7731 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007732 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007733 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007734 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007735 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007736 if test "$GCC" = "yes"
7737 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007738 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007739 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007740 SCO_SV*)
7741 if test "$GCC" = "yes"
7742 then CCSHARED="-fPIC"
7743 else CCSHARED="-Kpic -belf"
7744 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007745 IRIX*/6*) case $CC in
7746 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007747 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007748 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007749 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7752$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007753# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007754# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7756$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007757if test -z "$LINKFORSHARED"
7758then
Guido van Rossum07397971997-04-29 21:49:50 +00007759 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007760 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007761 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007762 LINKFORSHARED="-Wl,-E -Wl,+s";;
7763# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007764 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007765 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007766 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007768 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007769 if test "$enable_framework"
7770 then
Jack Jansenda49e192005-01-07 13:08:22 +00007771 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007772 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007773 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007774 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007775 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007776 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007777 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007778 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7779 then
7780 LINKFORSHARED="-Wl,--export-dynamic"
7781 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007782 SunOS/5*) case $CC in
7783 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007784 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007785 then
7786 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007787 fi;;
7788 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007789 CYGWIN*)
7790 if test $enable_shared = "no"
7791 then
7792 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7793 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007794 QNX*)
7795 # -Wl,-E causes the symbols to be added to the dynamic
7796 # symbol table so that they can be found when a module
7797 # is loaded. -N 2048K causes the stack size to be set
7798 # to 2048 kilobytes so that the stack doesn't overflow
7799 # when running test_compile.py.
7800 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007801 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7804$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007805
Michael W. Hudson54241132001-12-07 15:38:26 +00007806
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007807
Matthias Kloseb9621712010-04-24 17:59:49 +00007808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7809$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007810if test ! "$LIBRARY" = "$LDLIBRARY"
7811then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007812 case $ac_sys_system in
7813 CYGWIN*)
7814 # Cygwin needs CCSHARED when building extension DLLs
7815 # but not when building the interpreter DLL.
7816 CFLAGSFORSHARED='';;
7817 *)
7818 CFLAGSFORSHARED='$(CCSHARED)'
7819 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7822$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007823
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007824# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7825# library (with --enable-shared).
7826# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007827# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7828# if it is not required, since it creates a dependency of the shared library
7829# to LIBS. This, in turn, means that applications linking the shared libpython
7830# don't need to link LIBS explicitly. The default should be only changed
7831# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007832
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7834$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007835case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007836 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007837 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007838esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7840$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007841
7842
Guido van Rossum627b2d71993-12-24 10:39:16 +00007843# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7845$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007846if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007848else
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007850LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854/* Override any GCC internal prototype to avoid an error.
7855 Use char because int might match the return type of a GCC
7856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857#ifdef __cplusplus
7858extern "C"
7859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007860char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007861int
7862main ()
7863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 ;
7866 return 0;
7867}
7868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007869if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871else
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007874rm -f core conftest.err conftest.$ac_objext \
7875 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007876LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7879$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007880if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 cat >>confdefs.h <<_ACEOF
7882#define HAVE_LIBDL 1
7883_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007884
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007885 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007886
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007887fi
7888 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7890$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007891if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007893else
Martin v. Löwis11437992002-04-12 09:54:03 +00007894 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007895LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899/* Override any GCC internal prototype to avoid an error.
7900 Use char because int might match the return type of a GCC
7901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007902#ifdef __cplusplus
7903extern "C"
7904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007905char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007906int
7907main ()
7908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 ;
7911 return 0;
7912}
7913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007916else
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007919rm -f core conftest.err conftest.$ac_objext \
7920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007921LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7924$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007925if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 cat >>confdefs.h <<_ACEOF
7927#define HAVE_LIBDLD 1
7928_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007929
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007930 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007931
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007932fi
7933 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007934
Georg Brandlb1441c72009-01-03 22:33:39 +00007935# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007936if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7938$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007939if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007940 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007941else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007942 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946/* Override any GCC internal prototype to avoid an error.
7947 Use char because int might match the return type of a GCC
7948 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007949#ifdef __cplusplus
7950extern "C"
7951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007952char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007953int
7954main ()
7955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ;
7958 return 0;
7959}
7960_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961for ac_lib in '' pthread rt posix4; do
7962 if test -z "$ac_lib"; then
7963 ac_res="none required"
7964 else
7965 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007966 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971rm -f core conftest.err conftest.$ac_objext \
7972 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08007973 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976done
Gregory P. Smith69140482012-01-16 02:05:55 -08007977if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979else
7980 ac_cv_search_sem_init=no
7981fi
7982rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007983LIBS=$ac_func_search_save_LIBS
7984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7986$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007988if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007990
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007991fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007992 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007993 # posix4 on Solaris 2.6
7994 # pthread (first!) on Linux
7995fi
7996
Martin v. Löwis19d17342003-06-14 21:03:05 +00007997# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7999$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008000if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002else
8003 ac_check_lib_save_LIBS=$LIBS
8004LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008006/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008/* Override any GCC internal prototype to avoid an error.
8009 Use char because int might match the return type of a GCC
8010 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008011#ifdef __cplusplus
8012extern "C"
8013#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008014char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008015int
8016main ()
8017{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008019 ;
8020 return 0;
8021}
8022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008023if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008024 ac_cv_lib_intl_textdomain=yes
8025else
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028rm -f core conftest.err conftest.$ac_objext \
8029 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008030LIBS=$ac_check_lib_save_LIBS
8031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8033$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008034if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008037
Brett Cannonc6d936e2009-06-07 20:09:53 +00008038 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008039fi
8040
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008041
8042# checks for system dependent C++ extensions support
8043case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8045$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008047/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008048
Georg Brandl59e87bd2011-02-15 19:48:59 +00008049 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008050int
8051main ()
8052{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008053loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008054 ;
8055 return 0;
8056}
Matthias Kloseb159a552010-04-25 21:00:44 +00008057
Martin v. Löwis11437992002-04-12 09:54:03 +00008058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008059if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008060
Matthias Kloseb159a552010-04-25 21:00:44 +00008061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
Matthias Kloseb159a552010-04-25 21:00:44 +00008064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008065$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008066
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008067else
Matthias Kloseb159a552010-04-25 21:00:44 +00008068
8069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008070$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008071
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073rm -f core conftest.err conftest.$ac_objext \
8074 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008075 *) ;;
8076esac
8077
Guido van Rossum70c7f481998-03-26 18:44:10 +00008078# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8080$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008081if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083else
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008085LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089/* Override any GCC internal prototype to avoid an error.
8090 Use char because int might match the return type of a GCC
8091 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008092#ifdef __cplusplus
8093extern "C"
8094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008095char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008096int
8097main ()
8098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 ;
8101 return 0;
8102}
8103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008104if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008106else
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008109rm -f core conftest.err conftest.$ac_objext \
8110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8114$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008115if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008116 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008117fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008118 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8120$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008121if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008123else
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008125LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129/* Override any GCC internal prototype to avoid an error.
8130 Use char because int might match the return type of a GCC
8131 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008132#ifdef __cplusplus
8133extern "C"
8134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008135char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008136int
8137main ()
8138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008140 ;
8141 return 0;
8142}
8143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008144if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008145 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008146else
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008149rm -f core conftest.err conftest.$ac_objext \
8150 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008151LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8154$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008155if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008156 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008157fi
8158 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8161$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008164if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8167$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008168LIBS="$withval $LIBS"
8169
8170else
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8172$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173fi
8174
Guido van Rossum7f43da71994-08-01 12:15:30 +00008175
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008176if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008177 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8178set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8180$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008181if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008182 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008183else
8184 case $PKG_CONFIG in
8185 [\\/]* | ?:[\\/]*)
8186 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8187 ;;
8188 *)
8189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8190for as_dir in $PATH
8191do
8192 IFS=$as_save_IFS
8193 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008194 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008195 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8196 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008198 break 2
8199 fi
8200done
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008202IFS=$as_save_IFS
8203
8204 ;;
8205esac
8206fi
8207PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8208if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8210$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008211else
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8213$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008214fi
8215
8216
8217fi
8218if test -z "$ac_cv_path_PKG_CONFIG"; then
8219 ac_pt_PKG_CONFIG=$PKG_CONFIG
8220 # Extract the first word of "pkg-config", so it can be a program name with args.
8221set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8223$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008224if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008226else
8227 case $ac_pt_PKG_CONFIG in
8228 [\\/]* | ?:[\\/]*)
8229 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8230 ;;
8231 *)
8232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8233for as_dir in $PATH
8234do
8235 IFS=$as_save_IFS
8236 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008238 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8239 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008241 break 2
8242 fi
8243done
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008245IFS=$as_save_IFS
8246
8247 ;;
8248esac
8249fi
8250ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8251if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8253$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008254else
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8256$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008257fi
8258
8259 if test "x$ac_pt_PKG_CONFIG" = x; then
8260 PKG_CONFIG=""
8261 else
8262 case $cross_compiling:$ac_tool_warned in
8263yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8265$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008266ac_tool_warned=yes ;;
8267esac
8268 PKG_CONFIG=$ac_pt_PKG_CONFIG
8269 fi
8270else
8271 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8272fi
8273
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008274
8275# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8277$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008278
8279# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008280if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008281 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008282else
8283 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008284fi
8285
8286
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8288$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008289
8290# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8292$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008293
8294# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008295if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008296 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008297else
8298 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008299fi
8300
8301
8302if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008303 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8304else
8305 LIBFFI_INCLUDEDIR=""
8306fi
8307
8308
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8310$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008311
Benjamin Peterson076ed002010-10-31 17:11:02 +00008312# Check for support for loadable sqlite extensions
8313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8314$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8315# Check whether --enable-loadable-sqlite-extensions was given.
8316if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8317 enableval=$enable_loadable_sqlite_extensions;
8318else
8319 enable_loadable_sqlite_extensions="no"
8320fi
8321
8322
8323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8324$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8325
Matthias Klose55708cc2009-04-30 08:06:49 +00008326# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8328$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008329
8330# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008331if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008332 withval=$with_dbmliborder;
8333if test x$with_dbmliborder = xyes
8334then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008335as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008336else
8337 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8338 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8339 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008340 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008341 fi
8342 done
8343fi
8344fi
8345
Matthias Kloseb9621712010-04-24 17:59:49 +00008346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8347$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008348
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008349# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008350
8351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8353$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008354
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008356if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357 withval=$with_signal_module;
8358fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008359
8360
8361if test -z "$with_signal_module"
8362then with_signal_module="yes"
8363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8365$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008366
8367if test "${with_signal_module}" = "yes"; then
8368 USE_SIGNAL_MODULE=""
8369 SIGNAL_OBJS=""
8370else
8371 USE_SIGNAL_MODULE="#"
8372 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8373fi
8374
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008375# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008376
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008377USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8380$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008381
Guido van Rossumec2f0731997-01-22 20:54:01 +00008382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008384if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8387$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008388LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008389if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008390 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008391fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8394$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395fi
8396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
8398# Templates for things AC_DEFINEd more than once.
8399# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008400
8401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402
8403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8405$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008408if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409 withval=$with_threads;
8410fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008411
8412
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008413# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008416if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 withval=$with_thread; with_threads=$with_thread
8418fi
8419
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008420
8421if test -z "$with_threads"
8422then with_threads="yes"
8423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8425$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008426
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008427
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008428if test "$with_threads" = "no"
8429then
8430 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008431elif test "$ac_cv_pthread_is_default" = yes
8432then
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008434
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008435 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008437
8438 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008440elif test "$ac_cv_kpthread" = "yes"
8441then
8442 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008443 if test "$ac_cv_cxx_thread" = "yes"; then
8444 CXX="$CXX -Kpthread"
8445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008447
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008448 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008449 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008450elif test "$ac_cv_kthread" = "yes"
8451then
8452 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008453 if test "$ac_cv_cxx_thread" = "yes"; then
8454 CXX="$CXX -Kthread"
8455 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008457
8458 posix_threads=yes
8459 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008460elif test "$ac_cv_pthread" = "yes"
8461then
8462 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008463 if test "$ac_cv_cxx_thread" = "yes"; then
8464 CXX="$CXX -pthread"
8465 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008467
8468 posix_threads=yes
8469 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008470else
8471 if test ! -z "$with_threads" -a -d "$with_threads"
8472 then LDFLAGS="$LDFLAGS -L$with_threads"
8473 fi
8474 if test ! -z "$withval" -a -d "$withval"
8475 then LDFLAGS="$LDFLAGS -L$withval"
8476 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008477
8478 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008479 # define _POSIX_THREADS in unistd.h. Some apparently don't
8480 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8482$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008484/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008485
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008486#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008487#ifdef _POSIX_THREADS
8488yes
8489#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008490
8491_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008494 unistd_defines_pthreads=yes
8495else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008496 unistd_defines_pthreads=no
8497fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008498rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008499
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8501$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008504
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 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 -08008506if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
Matthias Kloseb9621712010-04-24 17:59:49 +00008512$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008513
8514 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008515 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008516else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008517
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 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 -08008519if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008521
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008523
Martin v. Löwis11437992002-04-12 09:54:03 +00008524
Matthias Kloseb9621712010-04-24 17:59:49 +00008525$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008526
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008527 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008528else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008529
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008530 # Just looking for pthread_create in libpthread is not enough:
8531 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8532 # So we really have to include pthread.h, and then link.
8533 _libs=$LIBS
8534 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8536$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008538/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008539#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008540
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008541void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008542int
8543main ()
8544{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008545
8546pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ;
8548 return 0;
8549}
8550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008551if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8554$as_echo "yes" >&6; }
8555 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008556
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008557 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008558 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008559else
Martin v. Löwis11437992002-04-12 09:54:03 +00008560
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008561 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008563if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008565
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008566 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008567 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008568else
Guido van Rossumad678af1998-10-02 14:42:15 +00008569
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8571$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008572if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008574else
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008576LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580/* Override any GCC internal prototype to avoid an error.
8581 Use char because int might match the return type of a GCC
8582 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008583#ifdef __cplusplus
8584extern "C"
8585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008586char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008587int
8588main ()
8589{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008590return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 ;
8592 return 0;
8593}
8594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600rm -f core conftest.err conftest.$ac_objext \
8601 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008602LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8605$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008606if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008608
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008609 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008610 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008611 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008612else
Greg Steinadf63d62000-07-05 10:38:09 +00008613
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8615$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008616if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008618else
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008620LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624/* Override any GCC internal prototype to avoid an error.
8625 Use char because int might match the return type of a GCC
8626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008627#ifdef __cplusplus
8628extern "C"
8629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008630char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008631int
8632main ()
8633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ;
8636 return 0;
8637}
8638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644rm -f core conftest.err conftest.$ac_objext \
8645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8649$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008650if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008652
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008653 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008654 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008655 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008656else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008657
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8659$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008660if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008662else
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008664LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668/* Override any GCC internal prototype to avoid an error.
8669 Use char because int might match the return type of a GCC
8670 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008671#ifdef __cplusplus
8672extern "C"
8673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008674char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675int
8676main ()
8677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 ;
8680 return 0;
8681}
8682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688rm -f core conftest.err conftest.$ac_objext \
8689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008690LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8693$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008694if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008696
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008697 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008698 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008699 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008700else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008701
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8703$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008704if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008706else
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008708LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712/* Override any GCC internal prototype to avoid an error.
8713 Use char because int might match the return type of a GCC
8714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008715#ifdef __cplusplus
8716extern "C"
8717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008718char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008719int
8720main ()
8721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 ;
8724 return 0;
8725}
8726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008727if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732rm -f core conftest.err conftest.$ac_objext \
8733 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008734LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8737$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008738if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008741 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008742 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008743 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008744else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008745
Martin v. Löwis130fb172001-07-19 11:00:41 +00008746 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008747fi
8748
Guido van Rossum627b2d71993-12-24 10:39:16 +00008749
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008750fi
8751
Guido van Rossum0be3e491997-05-22 20:33:33 +00008752fi
8753
Guido van Rossum49545951997-12-02 19:28:29 +00008754fi
8755
Guido van Rossumb93a8621998-05-07 13:27:32 +00008756fi
8757
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008759rm -f core conftest.err conftest.$ac_objext \
8760 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761fi
8762
Martin v. Löwis11437992002-04-12 09:54:03 +00008763
8764fi
8765
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008766
Michael W. Hudson54241132001-12-07 15:38:26 +00008767
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8769$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008770if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008772else
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008774LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008778/* Override any GCC internal prototype to avoid an error.
8779 Use char because int might match the return type of a GCC
8780 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008781#ifdef __cplusplus
8782extern "C"
8783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008784char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008785int
8786main ()
8787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008788return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ;
8790 return 0;
8791}
8792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008793if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008795else
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008798rm -f core conftest.err conftest.$ac_objext \
8799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008800LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8803$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008804if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008806
Martin v. Löwis130fb172001-07-19 11:00:41 +00008807 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008808 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008809 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008810fi
8811
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008812
Neal Norwitza978ab02002-11-02 16:58:05 +00008813 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8815$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008816if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008818else
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008820LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824/* Override any GCC internal prototype to avoid an error.
8825 Use char because int might match the return type of a GCC
8826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008827#ifdef __cplusplus
8828extern "C"
8829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008830char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008831int
8832main ()
8833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ;
8836 return 0;
8837}
8838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008839if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008840 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008841else
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844rm -f core conftest.err conftest.$ac_objext \
8845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008846LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8849$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008850if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008852
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008853 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008854 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008855 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008856fi
8857
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008858 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008859
Martin v. Löwis130fb172001-07-19 11:00:41 +00008860 if test "$USE_THREAD_MODULE" != "#"
8861 then
8862 # If the above checks didn't disable threads, (at least) OSF1
8863 # needs this '-threads' argument during linking.
8864 case $ac_sys_system in
8865 OSF1) LDLAST=-threads;;
8866 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008867 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008868fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008869
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008870if test "$posix_threads" = "yes"; then
8871 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008872
Matthias Kloseb9621712010-04-24 17:59:49 +00008873$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008874
8875 fi
8876
8877 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8878 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008879 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008880$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008881
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008882 ;;
8883 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008884$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008885
8886 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008887 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008888$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008889
8890 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008891 esac
8892
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8894$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008895 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008896 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008897else
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008899 ac_cv_pthread_system_supported=no
8900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008902/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008903#include <pthread.h>
8904 void *foo(void *parm) {
8905 return NULL;
8906 }
8907 main() {
8908 pthread_attr_t attr;
8909 pthread_t id;
8910 if (pthread_attr_init(&attr)) exit(-1);
8911 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8912 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8913 exit(0);
8914 }
8915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008916if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008917 ac_cv_pthread_system_supported=yes
8918else
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008923fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925
Guido van Rossum627b2d71993-12-24 10:39:16 +00008926fi
8927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8929$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008930 if test "$ac_cv_pthread_system_supported" = "yes"; then
8931
Matthias Kloseb9621712010-04-24 17:59:49 +00008932$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008933
8934 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 for ac_func in pthread_sigmask
8936do :
8937 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08008938if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008939 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008940#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008941_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008942 case $ac_sys_system in
8943 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008944
Matthias Kloseb9621712010-04-24 17:59:49 +00008945$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008946
8947 ;;
8948 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008949fi
8950done
8951
8952fi
8953
8954
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008956
Matthias Kloseb9621712010-04-24 17:59:49 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8958$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008960if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8964$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965 ipv6=no
8966 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8968$as_echo "yes" >&6; }
8969 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970
8971 ipv6=yes
8972 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008974else
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008977
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8979$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980 ipv6=no
8981
8982else
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985 /* AF_INET6 available check */
8986#include <sys/types.h>
8987#include <sys/socket.h>
8988main()
8989{
8990 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8991 exit(1);
8992 else
8993 exit(0);
8994}
8995
Martin v. Löwis11437992002-04-12 09:54:03 +00008996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008997if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008998
Matthias Kloseb9621712010-04-24 17:59:49 +00008999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9000$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009002
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003else
Matthias Kloseb159a552010-04-25 21:00:44 +00009004
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9006$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009008
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012fi
9013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009015if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9017$as_echo_n "checking if RFC2553 API is available... " >&6; }
9018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009019/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009020
9021 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009022#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009023int
9024main ()
9025{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009026struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009027 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ;
9029 return 0;
9030}
Matthias Kloseb159a552010-04-25 21:00:44 +00009031
Martin v. Löwis11437992002-04-12 09:54:03 +00009032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009033if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009034
9035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009036$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009037 ipv6=yes
9038
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009039else
Matthias Kloseb159a552010-04-25 21:00:44 +00009040
9041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009042$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009043 ipv6=no
9044
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009047fi
9048
9049if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009051
9052fi
9053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054fi
9055
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056
9057ipv6type=unknown
9058ipv6lib=none
9059ipv6trylibc=no
9060
9061if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9063$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009064 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9065 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066 case $i in
9067 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009069/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009070
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071#include <netinet/in.h>
9072#ifdef IPV6_INRIA_VERSION
9073yes
9074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009075_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009078 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009080rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081
9082 ;;
9083 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009085/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009086
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087#include <netinet/in.h>
9088#ifdef __KAME__
9089yes
9090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009091_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009094 ipv6type=$i;
9095 ipv6lib=inet6
9096 ipv6libdir=/usr/local/v6/lib
9097 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009099rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009100
9101 ;;
9102 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009104/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009105
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106#include <features.h>
9107#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9108yes
9109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009110_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009113 ipv6type=$i;
9114 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009116rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117
9118 ;;
9119 linux-inet6)
9120 if test -d /usr/inet6; then
9121 ipv6type=$i
9122 ipv6lib=inet6
9123 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009124 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125 fi
9126 ;;
9127 solaris)
9128 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009129 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130 ipv6type=$i
9131 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009132 fi
9133 fi
9134 ;;
9135 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009137/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009138
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139#include <sys/param.h>
9140#ifdef _TOSHIBA_INET6
9141yes
9142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009143_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009145 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146 ipv6type=$i;
9147 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009148 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009149fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009150rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009151
9152 ;;
9153 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009155/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009156
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009157#include </usr/local/v6/include/sys/v6config.h>
9158#ifdef __V6D__
9159yes
9160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009161_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009163 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009164 ipv6type=$i;
9165 ipv6lib=v6;
9166 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009167 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009168fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009169rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009170
9171 ;;
9172 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009174/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009175
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009176#include <sys/param.h>
9177#ifdef _ZETA_MINAMI_INET6
9178yes
9179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009180_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009182 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009183 ipv6type=$i;
9184 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009185 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009186fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009187rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009188
9189 ;;
9190 esac
9191 if test "$ipv6type" != "unknown"; then
9192 break
9193 fi
9194 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9196$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009197fi
9198
9199if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9200 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9201 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9202 echo "using lib$ipv6lib"
9203 else
9204 if test $ipv6trylibc = "yes"; then
9205 echo "using libc"
9206 else
9207 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9208 echo "You need to fetch lib$ipv6lib.a from appropriate"
9209 echo 'ipv6 kit and compile beforehand.'
9210 exit 1
9211 fi
9212 fi
9213fi
9214
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9216$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009218/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009219
9220 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009221int
9222main ()
9223{
9224FSIORefNum fRef = 0
9225 ;
9226 return 0;
9227}
Matthias Kloseb159a552010-04-25 21:00:44 +00009228
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009230if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009231
Matthias Kloseb159a552010-04-25 21:00:44 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009234
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9236$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009237
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009238else
Matthias Kloseb159a552010-04-25 21:00:44 +00009239
Matthias Kloseb9621712010-04-24 17:59:49 +00009240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009242
9243fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9245
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009246# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9248$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009251if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252 withval=$with_doc_strings;
9253fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009254
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009255
9256if test -z "$with_doc_strings"
9257then with_doc_strings="yes"
9258fi
9259if test "$with_doc_strings" != "no"
9260then
9261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009263
9264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9266$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009267
Antoine Pitrou042b1282010-08-13 21:15:58 +00009268# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9270$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009273if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009274 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009275if test "$withval" != no
9276then
9277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009279
Matthias Kloseb9621712010-04-24 17:59:49 +00009280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9281$as_echo "yes" >&6; }
9282else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9283$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009284fi
9285else
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9287$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288fi
9289
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009290
9291# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9293$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009295# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009296if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009297 withval=$with_pymalloc;
9298fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009299
Neil Schemenauera35c6882001-02-27 04:45:05 +00009300
Neil Schemenauer16c22972002-03-22 15:34:49 +00009301if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009302then
9303 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009304 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009305fi
9306if test "$with_pymalloc" != "no"
9307then
Martin v. Löwis11437992002-04-12 09:54:03 +00009308
Matthias Kloseb9621712010-04-24 17:59:49 +00009309$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009310
9311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9313$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009314
Benjamin Peterson05159c42009-12-03 03:01:27 +00009315# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9317$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009318
9319# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009320if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009321 withval=$with_valgrind;
9322else
9323 with_valgrind=no
9324fi
9325
Matthias Kloseb9621712010-04-24 17:59:49 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9327$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009328if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 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 -08009330if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009331
Matthias Kloseb9621712010-04-24 17:59:49 +00009332$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009333
9334else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009335 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009336
9337fi
9338
9339
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009340 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009341fi
9342
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009343# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009344
Guido van Rossum98935bf2001-09-05 19:13:16 +00009345DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009346
Guido van Rossume97ee181999-12-20 21:27:22 +00009347# the dlopen() function means we might want to use dynload_shlib.o. some
9348# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009349for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009350do :
9351 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009352if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009354#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009355_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009356
Guido van Rossume97ee181999-12-20 21:27:22 +00009357fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009358done
Guido van Rossume97ee181999-12-20 21:27:22 +00009359
Michael W. Hudson54241132001-12-07 15:38:26 +00009360
Guido van Rossume97ee181999-12-20 21:27:22 +00009361# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9362# loading of modules.
9363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9365$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009366if test -z "$DYNLOADFILE"
9367then
9368 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009369 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9370 if test "$ac_cv_func_dlopen" = yes
9371 then DYNLOADFILE="dynload_shlib.o"
9372 else DYNLOADFILE="dynload_aix.o"
9373 fi
9374 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009375 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009376 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9377 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009378 *)
9379 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9380 # out any dynamic loading
9381 if test "$ac_cv_func_dlopen" = yes
9382 then DYNLOADFILE="dynload_shlib.o"
9383 else DYNLOADFILE="dynload_stub.o"
9384 fi
9385 ;;
9386 esac
9387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9389$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009390if test "$DYNLOADFILE" != "dynload_stub.o"
9391then
Martin v. Löwis11437992002-04-12 09:54:03 +00009392
Matthias Kloseb9621712010-04-24 17:59:49 +00009393$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009394
9395fi
9396
Neil Schemenauer4e425612001-06-19 15:44:15 +00009397# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9398
Michael W. Hudson54241132001-12-07 15:38:26 +00009399
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9401$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009402if test -z "$MACHDEP_OBJS"
9403then
Jack Jansene578a632001-08-15 01:27:14 +00009404 MACHDEP_OBJS=$extra_machdep_objs
9405else
9406 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9409$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009410
Guido van Rossum627b2d71993-12-24 10:39:16 +00009411# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009412for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009413 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009414 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009415 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009416 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009417 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009418 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009419 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9420 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009421 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009422 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009423 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009424 truncate uname unsetenv utimes waitpid wait3 wait4 \
9425 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009426do :
9427 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9428ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009429if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009431#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009432_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009433
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009434fi
9435done
9436
Michael W. Hudson54241132001-12-07 15:38:26 +00009437
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009438ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9439 #include <dirent.h>
9440"
9441if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9442
9443$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9444
9445fi
9446
9447
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009448# For some functions, having a definition is not sufficient, since
9449# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9451$as_echo_n "checking for chroot... " >&6; }
9452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009453/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009454#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009455int
9456main ()
9457{
9458void *x=chroot
9459 ;
9460 return 0;
9461}
9462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009464
Matthias Kloseb9621712010-04-24 17:59:49 +00009465$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009466
Matthias Kloseb159a552010-04-25 21:00:44 +00009467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009468$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009469else
Matthias Kloseb9621712010-04-24 17:59:49 +00009470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9471$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009472
9473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9476$as_echo_n "checking for link... " >&6; }
9477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009478/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009479#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009480int
9481main ()
9482{
9483void *x=link
9484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009489
Matthias Kloseb9621712010-04-24 17:59:49 +00009490$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009491
Matthias Kloseb159a552010-04-25 21:00:44 +00009492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009493$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009494else
Matthias Kloseb9621712010-04-24 17:59:49 +00009495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9496$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009497
9498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9501$as_echo_n "checking for symlink... " >&6; }
9502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009503/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009504#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009505int
9506main ()
9507{
9508void *x=symlink
9509 ;
9510 return 0;
9511}
9512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009514
Matthias Kloseb9621712010-04-24 17:59:49 +00009515$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009516
Matthias Kloseb159a552010-04-25 21:00:44 +00009517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009518$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009519else
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9521$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009522
9523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9526$as_echo_n "checking for fchdir... " >&6; }
9527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009528/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009529#include <unistd.h>
9530int
9531main ()
9532{
9533void *x=fchdir
9534 ;
9535 return 0;
9536}
9537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009541
Matthias Kloseb159a552010-04-25 21:00:44 +00009542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009543$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009544else
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9546$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009547
9548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9551$as_echo_n "checking for fsync... " >&6; }
9552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009553/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009554#include <unistd.h>
9555int
9556main ()
9557{
9558void *x=fsync
9559 ;
9560 return 0;
9561}
9562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009564
Matthias Kloseb9621712010-04-24 17:59:49 +00009565$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009566
Matthias Kloseb159a552010-04-25 21:00:44 +00009567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009568$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009569else
Matthias Kloseb9621712010-04-24 17:59:49 +00009570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9571$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009572
9573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9576$as_echo_n "checking for fdatasync... " >&6; }
9577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009579#include <unistd.h>
9580int
9581main ()
9582{
9583void *x=fdatasync
9584 ;
9585 return 0;
9586}
9587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009588if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009589
Matthias Kloseb9621712010-04-24 17:59:49 +00009590$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009591
Matthias Kloseb159a552010-04-25 21:00:44 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009593$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009594else
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009597
9598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9601$as_echo_n "checking for epoll... " >&6; }
9602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009603/* end confdefs.h. */
9604#include <sys/epoll.h>
9605int
9606main ()
9607{
9608void *x=epoll_create
9609 ;
9610 return 0;
9611}
9612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009614
Matthias Kloseb9621712010-04-24 17:59:49 +00009615$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009616
Matthias Kloseb159a552010-04-25 21:00:44 +00009617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009618$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009619else
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9621$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009622
9623fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9626$as_echo_n "checking for kqueue... " >&6; }
9627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009628/* end confdefs.h. */
9629
9630#include <sys/types.h>
9631#include <sys/event.h>
9632
9633int
9634main ()
9635{
9636int x=kqueue()
9637 ;
9638 return 0;
9639}
9640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009641if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009642
Matthias Kloseb9621712010-04-24 17:59:49 +00009643$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009644
Matthias Kloseb159a552010-04-25 21:00:44 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009646$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009647else
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009650
9651fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009653# On some systems (eg. FreeBSD 5), we would find a definition of the
9654# functions ctermid_r, setgroups in the library, but no prototype
9655# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9656# address to avoid compiler warnings and potential miscompilations
9657# because of the missing prototypes.
9658
Matthias Kloseb9621712010-04-24 17:59:49 +00009659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9660$as_echo_n "checking for ctermid_r... " >&6; }
9661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009662/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009663
Martin v. Löwisd5843682002-11-21 20:41:28 +00009664#include <stdio.h>
9665
Martin v. Löwisd5843682002-11-21 20:41:28 +00009666int
9667main ()
9668{
9669void* p = ctermid_r
9670 ;
9671 return 0;
9672}
9673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009675
Matthias Kloseb9621712010-04-24 17:59:49 +00009676$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009677
Matthias Kloseb159a552010-04-25 21:00:44 +00009678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009679$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009680else
Matthias Kloseb9621712010-04-24 17:59:49 +00009681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9682$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009683
9684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9686
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9688$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009689if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009690 $as_echo_n "(cached) " >&6
9691else
9692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009693/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009694#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009695int
9696main ()
9697{
9698void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009699
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009700 ;
9701 return 0;
9702}
9703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009704if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009705 ac_cv_flock_decl=yes
9706else
9707 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009708
9709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009711
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009712fi
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9714$as_echo "$ac_cv_flock_decl" >&6; }
9715if test "x${ac_cv_flock_decl}" = xyes; then
9716 for ac_func in flock
9717do :
9718 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009719if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009720 cat >>confdefs.h <<_ACEOF
9721#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009722_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009723
Antoine Pitroua3000072010-09-07 14:52:42 +00009724else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009726$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009727if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009728 $as_echo_n "(cached) " >&6
9729else
9730 ac_check_lib_save_LIBS=$LIBS
9731LIBS="-lbsd $LIBS"
9732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9733/* end confdefs.h. */
9734
9735/* Override any GCC internal prototype to avoid an error.
9736 Use char because int might match the return type of a GCC
9737 builtin and then its argument prototype would still apply. */
9738#ifdef __cplusplus
9739extern "C"
9740#endif
9741char flock ();
9742int
9743main ()
9744{
9745return flock ();
9746 ;
9747 return 0;
9748}
9749_ACEOF
9750if ac_fn_c_try_link "$LINENO"; then :
9751 ac_cv_lib_bsd_flock=yes
9752else
9753 ac_cv_lib_bsd_flock=no
9754fi
9755rm -f core conftest.err conftest.$ac_objext \
9756 conftest$ac_exeext conftest.$ac_ext
9757LIBS=$ac_check_lib_save_LIBS
9758fi
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9760$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009761if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009762 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009763
9764
9765$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9766
9767
9768fi
9769
9770
9771fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009772done
9773
Antoine Pitroua3000072010-09-07 14:52:42 +00009774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775
Matthias Kloseb9621712010-04-24 17:59:49 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9777$as_echo_n "checking for getpagesize... " >&6; }
9778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009780
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009781#include <unistd.h>
9782
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009783int
9784main ()
9785{
9786void* p = getpagesize
9787 ;
9788 return 0;
9789}
9790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009791if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009792
Matthias Kloseb9621712010-04-24 17:59:49 +00009793$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009794
Matthias Kloseb159a552010-04-25 21:00:44 +00009795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009796$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009797else
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009800
9801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009803
Charles-François Natali6613c182011-11-27 12:41:06 +01009804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9805$as_echo_n "checking for broken unsetenv... " >&6; }
9806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9807/* end confdefs.h. */
9808
9809#include <stdlib.h>
9810
9811int
9812main ()
9813{
9814int res = unsetenv("DUMMY")
9815 ;
9816 return 0;
9817}
9818_ACEOF
9819if ac_fn_c_try_compile "$LINENO"; then :
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
9822else
9823
9824$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9825
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9827$as_echo "yes" >&6; }
9828
9829fi
9830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9831
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009832for ac_prog in true
9833do
9834 # Extract the first word of "$ac_prog", so it can be a program name with args.
9835set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9837$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009838if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009840else
9841 if test -n "$TRUE"; then
9842 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9843else
9844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847 IFS=$as_save_IFS
9848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850 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 +00009851 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 $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 +00009853 break 2
9854 fi
9855done
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009858
9859fi
9860fi
9861TRUE=$ac_cv_prog_TRUE
9862if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9864$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009865else
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009868fi
9869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009871 test -n "$TRUE" && break
9872done
9873test -n "$TRUE" || TRUE="/bin/true"
9874
9875
Matthias Kloseb9621712010-04-24 17:59:49 +00009876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9877$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009878if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009880else
9881 ac_check_lib_save_LIBS=$LIBS
9882LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009884/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886/* Override any GCC internal prototype to avoid an error.
9887 Use char because int might match the return type of a GCC
9888 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009889#ifdef __cplusplus
9890extern "C"
9891#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009892char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009893int
9894main ()
9895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009897 ;
9898 return 0;
9899}
9900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009902 ac_cv_lib_c_inet_aton=yes
9903else
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906rm -f core conftest.err conftest.$ac_objext \
9907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009908LIBS=$ac_check_lib_save_LIBS
9909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9911$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009912if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009913 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009914else
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9916$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009917if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009919else
9920 ac_check_lib_save_LIBS=$LIBS
9921LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009923/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009925/* Override any GCC internal prototype to avoid an error.
9926 Use char because int might match the return type of a GCC
9927 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009928#ifdef __cplusplus
9929extern "C"
9930#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009931char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009932int
9933main ()
9934{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009936 ;
9937 return 0;
9938}
9939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009941 ac_cv_lib_resolv_inet_aton=yes
9942else
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009945rm -f core conftest.err conftest.$ac_objext \
9946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009947LIBS=$ac_check_lib_save_LIBS
9948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9950$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009951if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009952 cat >>confdefs.h <<_ACEOF
9953#define HAVE_LIBRESOLV 1
9954_ACEOF
9955
9956 LIBS="-lresolv $LIBS"
9957
9958fi
9959
9960
9961fi
9962
9963
Christian Heimesd0764e22007-12-04 15:00:33 +00009964# On Tru64, chflags seems to be present, but calling it will
9965# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9967$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009968if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009970else
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009972 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009973else
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009975/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009976
Christian Heimesd0764e22007-12-04 15:00:33 +00009977#include <sys/stat.h>
9978#include <unistd.h>
9979int main(int argc, char*argv[])
9980{
9981 if(chflags(argv[0], 0) != 0)
9982 return 1;
9983 return 0;
9984}
Ned Deily3eb67d52011-06-28 00:00:28 -07009985
Christian Heimesd0764e22007-12-04 15:00:33 +00009986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009987if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009988 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009989else
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009994fi
9995
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9999$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010000if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010002if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010003 ac_cv_have_chflags="yes"
10004else
10005 ac_cv_have_chflags="no"
10006fi
10007
10008fi
10009if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010010
Matthias Kloseb9621712010-04-24 17:59:49 +000010011$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010012
10013fi
10014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10016$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010017if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010019else
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010021 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010022else
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010024/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010025
Christian Heimesd0764e22007-12-04 15:00:33 +000010026#include <sys/stat.h>
10027#include <unistd.h>
10028int main(int argc, char*argv[])
10029{
10030 if(lchflags(argv[0], 0) != 0)
10031 return 1;
10032 return 0;
10033}
Ned Deily3eb67d52011-06-28 00:00:28 -070010034
Christian Heimesd0764e22007-12-04 15:00:33 +000010035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010037 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010038else
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010043fi
10044
10045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10048$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010049if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010051if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010052 ac_cv_have_lchflags="yes"
10053else
10054 ac_cv_have_lchflags="no"
10055fi
10056
10057fi
10058if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010061
10062fi
10063
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010064case $ac_sys_system/$ac_sys_release in
10065Darwin/*)
10066 _CUR_CFLAGS="${CFLAGS}"
10067 _CUR_LDFLAGS="${LDFLAGS}"
10068 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10069 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10070 ;;
10071esac
10072
Matthias Kloseb9621712010-04-24 17:59:49 +000010073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10074$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010075if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010076 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010077else
10078 ac_check_lib_save_LIBS=$LIBS
10079LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010081/* end confdefs.h. */
10082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083/* Override any GCC internal prototype to avoid an error.
10084 Use char because int might match the return type of a GCC
10085 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010086#ifdef __cplusplus
10087extern "C"
10088#endif
10089char inflateCopy ();
10090int
10091main ()
10092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010093return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010094 ;
10095 return 0;
10096}
10097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010098if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010099 ac_cv_lib_z_inflateCopy=yes
10100else
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010103rm -f core conftest.err conftest.$ac_objext \
10104 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010105LIBS=$ac_check_lib_save_LIBS
10106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10108$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010109if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010110
Matthias Kloseb9621712010-04-24 17:59:49 +000010111$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010112
10113fi
10114
10115
10116case $ac_sys_system/$ac_sys_release in
10117Darwin/*)
10118 CFLAGS="${_CUR_CFLAGS}"
10119 LDFLAGS="${_CUR_LDFLAGS}"
10120 ;;
10121esac
10122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10124$as_echo_n "checking for hstrerror... " >&6; }
10125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010126/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010127
Martin v. Löwise9416172003-05-03 10:12:45 +000010128#include <netdb.h>
10129
Martin v. Löwise9416172003-05-03 10:12:45 +000010130int
10131main ()
10132{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010133void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010134 ;
10135 return 0;
10136}
10137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010139
Matthias Kloseb9621712010-04-24 17:59:49 +000010140$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010141
Matthias Kloseb159a552010-04-25 21:00:44 +000010142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010143$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010144else
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10146$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010147
10148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149rm -f core conftest.err conftest.$ac_objext \
10150 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151
Matthias Kloseb9621712010-04-24 17:59:49 +000010152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10153$as_echo_n "checking for inet_aton... " >&6; }
10154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010155/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010156
Martin v. Löwis86d66262006-02-17 08:40:11 +000010157#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010158#include <sys/socket.h>
10159#include <netinet/in.h>
10160#include <arpa/inet.h>
10161
Martin v. Löwise9416172003-05-03 10:12:45 +000010162int
10163main ()
10164{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010165void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010166 ;
10167 return 0;
10168}
10169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010171
Matthias Kloseb9621712010-04-24 17:59:49 +000010172$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010173
Matthias Kloseb159a552010-04-25 21:00:44 +000010174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010175$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010176else
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010179
10180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181rm -f core conftest.err conftest.$ac_objext \
10182 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183
Matthias Kloseb9621712010-04-24 17:59:49 +000010184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10185$as_echo_n "checking for inet_pton... " >&6; }
10186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010187/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010188
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010189#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010190#include <sys/socket.h>
10191#include <netinet/in.h>
10192#include <arpa/inet.h>
10193
Martin v. Löwise9416172003-05-03 10:12:45 +000010194int
10195main ()
10196{
10197void* p = inet_pton
10198 ;
10199 return 0;
10200}
10201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010203
Matthias Kloseb9621712010-04-24 17:59:49 +000010204$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010205
Matthias Kloseb159a552010-04-25 21:00:44 +000010206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010207$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010208else
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010211
10212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010214
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010215# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10217$as_echo_n "checking for setgroups... " >&6; }
10218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010219/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010220
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010221#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010222#ifdef HAVE_GRP_H
10223#include <grp.h>
10224#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010225
Martin v. Löwisd5843682002-11-21 20:41:28 +000010226int
10227main ()
10228{
10229void* p = setgroups
10230 ;
10231 return 0;
10232}
10233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010235
Matthias Kloseb9621712010-04-24 17:59:49 +000010236$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010237
Matthias Kloseb159a552010-04-25 21:00:44 +000010238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010239$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010240else
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10242$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010243
10244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010246
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010247# check for openpty and forkpty
10248
10249for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010250do :
10251 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010252if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010254#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010255_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010256
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010257else
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10259$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010260if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010262else
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010264LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268/* Override any GCC internal prototype to avoid an error.
10269 Use char because int might match the return type of a GCC
10270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010271#ifdef __cplusplus
10272extern "C"
10273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010274char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010275int
10276main ()
10277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ;
10280 return 0;
10281}
10282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010284 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010285else
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010288rm -f core conftest.err conftest.$ac_objext \
10289 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010290LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10293$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010294if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010296 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010297else
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10299$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010300if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010302else
10303 ac_check_lib_save_LIBS=$LIBS
10304LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010306/* end confdefs.h. */
10307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010308/* Override any GCC internal prototype to avoid an error.
10309 Use char because int might match the return type of a GCC
10310 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010311#ifdef __cplusplus
10312extern "C"
10313#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010314char openpty ();
10315int
10316main ()
10317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010324 ac_cv_lib_bsd_openpty=yes
10325else
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010328rm -f core conftest.err conftest.$ac_objext \
10329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010330LIBS=$ac_check_lib_save_LIBS
10331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10333$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010334if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010336 LIBS="$LIBS -lbsd"
10337fi
10338
10339
10340fi
10341
Fred Drake8cef4cf2000-06-28 16:40:38 +000010342
10343fi
10344done
10345
10346for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010347do :
10348 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010349if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010351#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010352_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010353
Fred Drake8cef4cf2000-06-28 16:40:38 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10356$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010357if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010359else
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010361LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010365/* Override any GCC internal prototype to avoid an error.
10366 Use char because int might match the return type of a GCC
10367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010368#ifdef __cplusplus
10369extern "C"
10370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010371char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010372int
10373main ()
10374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ;
10377 return 0;
10378}
10379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010380if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010382else
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010385rm -f core conftest.err conftest.$ac_objext \
10386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010387LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10390$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010391if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010393 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010394else
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10396$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010397if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010399else
10400 ac_check_lib_save_LIBS=$LIBS
10401LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010403/* end confdefs.h. */
10404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405/* Override any GCC internal prototype to avoid an error.
10406 Use char because int might match the return type of a GCC
10407 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010408#ifdef __cplusplus
10409extern "C"
10410#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010411char forkpty ();
10412int
10413main ()
10414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010416 ;
10417 return 0;
10418}
10419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010421 ac_cv_lib_bsd_forkpty=yes
10422else
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010425rm -f core conftest.err conftest.$ac_objext \
10426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010427LIBS=$ac_check_lib_save_LIBS
10428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10430$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010431if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010433 LIBS="$LIBS -lbsd"
10434fi
10435
10436
10437fi
10438
Fred Drake8cef4cf2000-06-28 16:40:38 +000010439
10440fi
10441done
10442
Jack Jansendd19cf82001-12-06 22:36:17 +000010443
Christian Heimesb186d002008-03-18 15:15:01 +000010444# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010445for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010446do :
10447 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010448if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010449 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010450#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010451_ACEOF
10452
10453fi
10454done
10455
10456
Michael W. Hudson54241132001-12-07 15:38:26 +000010457# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010458for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010459do :
10460 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10461ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010462if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010465_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010466
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010467fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010468done
10469
Michael W. Hudson54241132001-12-07 15:38:26 +000010470
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010471ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010472if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010473 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010474
Martin v. Löwis1142de32002-03-29 16:28:31 +000010475else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010477 *" dup2.$ac_objext "* ) ;;
10478 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010479 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010480esac
10481
Martin v. Löwis1142de32002-03-29 16:28:31 +000010482fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010483
10484ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010485if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010486 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10487
10488else
10489 case " $LIBOBJS " in
10490 *" getcwd.$ac_objext "* ) ;;
10491 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10492 ;;
10493esac
10494
10495fi
10496
10497ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010498if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010499 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10500
10501else
10502 case " $LIBOBJS " in
10503 *" strdup.$ac_objext "* ) ;;
10504 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10505 ;;
10506esac
10507
10508fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010509
10510
10511for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010512do :
10513 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010514if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010516#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010519/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010520#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010521int
10522main ()
10523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010524getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 ;
10526 return 0;
10527}
10528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010530
Matthias Kloseb9621712010-04-24 17:59:49 +000010531$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010532
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010535
Guido van Rossum627b2d71993-12-24 10:39:16 +000010536fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010537done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010538
Jack Jansen150753c2003-03-29 22:07:47 +000010539for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010540do :
10541 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010542if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010543 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010544#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010547/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010548#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010549int
10550main ()
10551{
10552setpgrp(0,0);
10553 ;
10554 return 0;
10555}
10556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010558
Matthias Kloseb9621712010-04-24 17:59:49 +000010559$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010560
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010563
10564fi
10565done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010566
Thomas Wouters3a584202000-08-05 23:28:51 +000010567for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010568do :
10569 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010570if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010575/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010576#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010577int
10578main ()
10579{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010580gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 ;
10582 return 0;
10583}
10584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010585if ac_fn_c_try_compile "$LINENO"; then :
10586
Guido van Rossum627b2d71993-12-24 10:39:16 +000010587else
Skip Montanaro6dead952003-09-25 14:50:04 +000010588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010590
Martin v. Löwis11437992002-04-12 09:54:03 +000010591
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010594
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010596done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010597
Michael W. Hudson54241132001-12-07 15:38:26 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10600$as_echo_n "checking for major... " >&6; }
10601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010602/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010603
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010604#if defined(MAJOR_IN_MKDEV)
10605#include <sys/mkdev.h>
10606#elif defined(MAJOR_IN_SYSMACROS)
10607#include <sys/sysmacros.h>
10608#else
10609#include <sys/types.h>
10610#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010611
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010612int
10613main ()
10614{
10615
10616 makedev(major(0),minor(0));
10617
10618 ;
10619 return 0;
10620}
10621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010622if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010623
10624
Matthias Kloseb9621712010-04-24 17:59:49 +000010625$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010626
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10628$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010629
10630else
Skip Montanaro6dead952003-09-25 14:50:04 +000010631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010634
10635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010636rm -f core conftest.err conftest.$ac_objext \
10637 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010638
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010639# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010640# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10642$as_echo_n "checking for getaddrinfo... " >&6; }
10643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010645
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010646#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010647#include <sys/socket.h>
10648#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010649#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010650
Martin v. Löwis11437992002-04-12 09:54:03 +000010651int
10652main ()
10653{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010654getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ;
10656 return 0;
10657}
10658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010659if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010660 have_getaddrinfo=yes
10661else
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664rm -f core conftest.err conftest.$ac_objext \
10665 conftest$ac_exeext conftest.$ac_ext
10666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10667$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010668if test $have_getaddrinfo = yes
10669then
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10671$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010672 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010674else
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010676 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010679/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010680
10681#include <sys/types.h>
10682#include <netdb.h>
10683#include <string.h>
10684#include <sys/socket.h>
10685#include <netinet/in.h>
10686
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010687int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010688{
10689 int passive, gaierr, inet4 = 0, inet6 = 0;
10690 struct addrinfo hints, *ai, *aitop;
10691 char straddr[INET6_ADDRSTRLEN], strport[16];
10692
10693 for (passive = 0; passive <= 1; passive++) {
10694 memset(&hints, 0, sizeof(hints));
10695 hints.ai_family = AF_UNSPEC;
10696 hints.ai_flags = passive ? AI_PASSIVE : 0;
10697 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010698 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010699 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10700 (void)gai_strerror(gaierr);
10701 goto bad;
10702 }
10703 for (ai = aitop; ai; ai = ai->ai_next) {
10704 if (ai->ai_addr == NULL ||
10705 ai->ai_addrlen == 0 ||
10706 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10707 straddr, sizeof(straddr), strport, sizeof(strport),
10708 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10709 goto bad;
10710 }
10711 switch (ai->ai_family) {
10712 case AF_INET:
10713 if (strcmp(strport, "54321") != 0) {
10714 goto bad;
10715 }
10716 if (passive) {
10717 if (strcmp(straddr, "0.0.0.0") != 0) {
10718 goto bad;
10719 }
10720 } else {
10721 if (strcmp(straddr, "127.0.0.1") != 0) {
10722 goto bad;
10723 }
10724 }
10725 inet4++;
10726 break;
10727 case AF_INET6:
10728 if (strcmp(strport, "54321") != 0) {
10729 goto bad;
10730 }
10731 if (passive) {
10732 if (strcmp(straddr, "::") != 0) {
10733 goto bad;
10734 }
10735 } else {
10736 if (strcmp(straddr, "::1") != 0) {
10737 goto bad;
10738 }
10739 }
10740 inet6++;
10741 break;
10742 case AF_UNSPEC:
10743 goto bad;
10744 break;
10745 default:
10746 /* another family support? */
10747 break;
10748 }
10749 }
10750 }
10751
10752 if (!(inet4 == 0 || inet4 == 2))
10753 goto bad;
10754 if (!(inet6 == 0 || inet6 == 2))
10755 goto bad;
10756
10757 if (aitop)
10758 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010759 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010760
10761 bad:
10762 if (aitop)
10763 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010764 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010765}
10766
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010768if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010769 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010770else
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010777fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010778
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010780
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10782$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10783
Mark Dickinson2df5d282009-12-31 21:22:50 +000010784if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010785then
10786 if test $ipv6 = yes
10787 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010788 echo 'Fatal: You must get working getaddrinfo() function.'
10789 echo ' or you can specify "--disable-ipv6"'.
10790 exit 1
10791 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010792else
Martin v. Löwis11437992002-04-12 09:54:03 +000010793
Matthias Kloseb9621712010-04-24 17:59:49 +000010794$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010795
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010796fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010797
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010798for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010799do :
10800 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010801if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010802 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010805
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010806fi
10807done
10808
Michael W. Hudson54241132001-12-07 15:38:26 +000010809
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010810# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10812$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010813if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010815else
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010817/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010818#include <sys/types.h>
10819#include <sys/time.h>
10820#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010821
Martin v. Löwis11437992002-04-12 09:54:03 +000010822int
10823main ()
10824{
10825if ((struct tm *) 0)
10826return 0;
10827 ;
10828 return 0;
10829}
10830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010831if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010833else
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10839$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010840if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010841
Matthias Kloseb9621712010-04-24 17:59:49 +000010842$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010843
10844fi
10845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10847$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010848if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010850else
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010852/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010853#include <sys/types.h>
10854#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
Martin v. Löwis11437992002-04-12 09:54:03 +000010856int
10857main ()
10858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859struct tm tm;
10860 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ;
10863 return 0;
10864}
10865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010866if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010867 ac_cv_struct_tm=time.h
10868else
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10874$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010875if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878
10879fi
10880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881ac_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 +000010882#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884"
Gregory P. Smith69140482012-01-16 02:05:55 -080010885if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010886
10887cat >>confdefs.h <<_ACEOF
10888#define HAVE_STRUCT_TM_TM_ZONE 1
10889_ACEOF
10890
10891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010892fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010893
Martin v. Löwis11437992002-04-12 09:54:03 +000010894if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897
10898else
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10900"
Gregory P. Smith69140482012-01-16 02:05:55 -080010901if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010903else
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905fi
10906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010907cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010908#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010909_ACEOF
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10912$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010913if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915else
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010918#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010919#if !HAVE_DECL_TZNAME
10920extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
Martin v. Löwis11437992002-04-12 09:54:03 +000010923int
10924main ()
10925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 ;
10928 return 0;
10929}
10930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010931if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010932 ac_cv_var_tzname=yes
10933else
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010936rm -f core conftest.err conftest.$ac_objext \
10937 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10940$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010941 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010944
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010945 fi
10946fi
10947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948ac_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 -080010949if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010950
10951cat >>confdefs.h <<_ACEOF
10952#define HAVE_STRUCT_STAT_ST_RDEV 1
10953_ACEOF
10954
10955
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010956fi
10957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958ac_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 -080010959if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010960
Martin v. Löwis11437992002-04-12 09:54:03 +000010961cat >>confdefs.h <<_ACEOF
10962#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10963_ACEOF
10964
10965
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010966fi
10967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968ac_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 -080010969if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010970
10971cat >>confdefs.h <<_ACEOF
10972#define HAVE_STRUCT_STAT_ST_FLAGS 1
10973_ACEOF
10974
10975
10976fi
10977
Matthias Kloseb9621712010-04-24 17:59:49 +000010978ac_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 -080010979if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010980
10981cat >>confdefs.h <<_ACEOF
10982#define HAVE_STRUCT_STAT_ST_GEN 1
10983_ACEOF
10984
10985
10986fi
10987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988ac_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 -080010989if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010990
10991cat >>confdefs.h <<_ACEOF
10992#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10993_ACEOF
10994
10995
10996fi
10997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998ac_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 -080010999if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011000
Martin v. Löwis11437992002-04-12 09:54:03 +000011001cat >>confdefs.h <<_ACEOF
11002#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11003_ACEOF
11004
11005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011007
11008else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011010 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11012 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011013esac
11014
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011015fi
11016
Michael W. Hudson54241132001-12-07 15:38:26 +000011017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11020$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011021if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011023else
Matthias Kloseb159a552010-04-25 21:00:44 +000011024
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011026/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011027#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011028int
11029main ()
11030{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011031return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 ;
11033 return 0;
11034}
11035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011036if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037 ac_cv_header_time_altzone=yes
11038else
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043fi
11044
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11046$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011047if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011050
11051fi
11052
Guido van Rossumda88dad1995-01-26 00:46:29 +000011053was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11055$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011057/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011058
11059#include <sys/types.h>
11060#include <sys/select.h>
11061#include <sys/time.h>
11062
Martin v. Löwis11437992002-04-12 09:54:03 +000011063int
11064main ()
11065{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011066;
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 ;
11068 return 0;
11069}
11070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011071if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
11073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011076 was_it_defined=yes
11077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11081$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11084$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011085if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011087else
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. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011090#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011091int
11092main ()
11093{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011094struct addrinfo a
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 :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011100 ac_cv_struct_addrinfo=yes
11101else
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11105fi
11106
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11108$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011109if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011110
Matthias Kloseb9621712010-04-24 17:59:49 +000011111$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011112
11113fi
11114
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11116$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011117if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011119else
Matthias Kloseb9621712010-04-24 17:59:49 +000011120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011121/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011122
11123# include <sys/types.h>
11124# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011125int
11126main ()
11127{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011128struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 ;
11130 return 0;
11131}
11132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011133if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011134 ac_cv_struct_sockaddr_storage=yes
11135else
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11139fi
11140
Matthias Kloseb9621712010-04-24 17:59:49 +000011141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11142$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011143if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
Matthias Kloseb9621712010-04-24 17:59:49 +000011145$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011146
11147fi
11148
Guido van Rossum627b2d71993-12-24 10:39:16 +000011149# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011150
Matthias Kloseb9621712010-04-24 17:59:49 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11152$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011153if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011155else
Matthias Kloseb9621712010-04-24 17:59:49 +000011156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011158$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011159int
11160main ()
11161{
11162static int test_array [1 - 2 * !(((char) -1) < 0)];
11163test_array [0] = 0
11164
11165 ;
11166 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011167}
Martin v. Löwis11437992002-04-12 09:54:03 +000011168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011170 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011171else
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11177$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011178if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011179 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180
11181fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11184$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011185if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011187else
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011189/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190
Martin v. Löwis11437992002-04-12 09:54:03 +000011191int
11192main ()
11193{
11194/* FIXME: Include the comments suggested by Paul. */
11195#ifndef __cplusplus
11196 /* Ultrix mips cc rejects this. */
11197 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200 char const *const *pcpcc;
11201 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 /* NEC SVR4.0.2 mips cc rejects this. */
11203 struct point {int x, y;};
11204 static struct point const zero = {0,0};
11205 /* AIX XL C 1.02.0.0 rejects this.
11206 It does not let you subtract one const X* pointer from another in
11207 an arm of an if-expression whose if-part is not a constant
11208 expression */
11209 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011210 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011212 ++pcpcc;
11213 ppc = (char**) pcpcc;
11214 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 { /* SCO 3.2v4 cc rejects this. */
11216 char *t;
11217 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011218
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 }
11222 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11223 int x[] = {25, 17};
11224 const int *foo = &x[0];
11225 ++foo;
11226 }
11227 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11228 typedef const int *iptr;
11229 iptr p = 0;
11230 ++p;
11231 }
11232 { /* AIX XL C 1.02.0.0 rejects this saying
11233 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11234 struct s { int j; const int *ap[3]; };
11235 struct s *b; b->j = 5;
11236 }
11237 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11238 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011242#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011243
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 ;
11245 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011246}
Martin v. Löwis11437992002-04-12 09:54:03 +000011247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011248if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011249 ac_cv_c_const=yes
11250else
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11256$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011257if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011258
Matthias Kloseb9621712010-04-24 17:59:49 +000011259$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011260
11261fi
11262
Michael W. Hudson54241132001-12-07 15:38:26 +000011263
Guido van Rossumda88dad1995-01-26 00:46:29 +000011264works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11266$as_echo_n "checking for working volatile... " >&6; }
11267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270int
11271main ()
11272{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011273volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011279 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011280else
Skip Montanaro6dead952003-09-25 14:50:04 +000011281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011283
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011284
Guido van Rossum627b2d71993-12-24 10:39:16 +000011285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11288$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011289
Guido van Rossumda88dad1995-01-26 00:46:29 +000011290works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11292$as_echo_n "checking for working signed char... " >&6; }
11293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011294/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011295
Martin v. Löwis11437992002-04-12 09:54:03 +000011296int
11297main ()
11298{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011299signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 ;
11301 return 0;
11302}
11303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011304if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011305 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011306else
Skip Montanaro6dead952003-09-25 14:50:04 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011309
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011310
Guido van Rossum7f43da71994-08-01 12:15:30 +000011311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11314$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011315
Guido van Rossumda88dad1995-01-26 00:46:29 +000011316have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11318$as_echo_n "checking for prototypes... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011321int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011322int
11323main ()
11324{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011325return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 ;
11327 return 0;
11328}
11329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011333
Matthias Kloseb159a552010-04-25 21:00:44 +000011334 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11338$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011339
Guido van Rossumda88dad1995-01-26 00:46:29 +000011340works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11342$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011344/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011345
11346#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011347int foo(int x, ...) {
11348 va_list va;
11349 va_start(va, x);
11350 va_arg(va, int);
11351 va_arg(va, char *);
11352 va_arg(va, double);
11353 return 0;
11354}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011355
Martin v. Löwis11437992002-04-12 09:54:03 +000011356int
11357main ()
11358{
Guido van Rossum90eea071996-08-30 20:58:57 +000011359return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
11366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011369 works=yes
11370
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11374$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011375
Martin v. Löwisd6320502004-08-12 13:45:08 +000011376# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11378$as_echo_n "checking for socketpair... " >&6; }
11379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011380/* end confdefs.h. */
11381
11382#include <sys/types.h>
11383#include <sys/socket.h>
11384
11385int
11386main ()
11387{
11388void *x=socketpair
11389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011396
Matthias Kloseb159a552010-04-25 21:00:44 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011399else
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11401$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011402
11403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011405
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011406# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11408$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011410/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011411#include <sys/types.h>
11412#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011413int
11414main ()
11415{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011416struct sockaddr x;
11417x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ;
11419 return 0;
11420}
11421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422if ac_fn_c_try_compile "$LINENO"; then :
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11424$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011427
11428else
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011431
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011434
Guido van Rossumda88dad1995-01-26 00:46:29 +000011435va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11437$as_echo_n "checking whether va_list is an array... " >&6; }
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011439/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011440
11441#ifdef HAVE_STDARG_PROTOTYPES
11442#include <stdarg.h>
11443#else
11444#include <varargs.h>
11445#endif
11446
Martin v. Löwis11437992002-04-12 09:54:03 +000011447int
11448main ()
11449{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011450va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ;
11452 return 0;
11453}
11454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011455if ac_fn_c_try_compile "$LINENO"; then :
11456
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457else
Skip Montanaro6dead952003-09-25 14:50:04 +000011458
Martin v. Löwis11437992002-04-12 09:54:03 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Guido van Rossumda88dad1995-01-26 00:46:29 +000011462 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011463
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11467$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011468
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011469# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011470
11471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011473if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011476
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11478$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011479 OLD_CFLAGS=$CFLAGS
11480 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011483
11484# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011485
Martin v. Löwis11437992002-04-12 09:54:03 +000011486int
11487main ()
11488{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011489
11490 char *name;
11491 struct hostent *he, *res;
11492 char buffer[2048];
11493 int buflen = 2048;
11494 int h_errnop;
11495
11496 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
11498 ;
11499 return 0;
11500}
11501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011505
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Matthias Kloseb9621712010-04-24 17:59:49 +000011507$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11510$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011512else
Skip Montanaro6dead952003-09-25 14:50:04 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11517$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011519/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011520
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011521# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Martin v. Löwis11437992002-04-12 09:54:03 +000011523int
11524main ()
11525{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011526
11527 char *name;
11528 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011529 char buffer[2048];
11530 int buflen = 2048;
11531 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011532
Matthias Kloseb159a552010-04-25 21:00:44 +000011533 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
11535 ;
11536 return 0;
11537}
11538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011540
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011542
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Matthias Kloseb159a552010-04-25 21:00:44 +000011544$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011545
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11547$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011549else
Skip Montanaro6dead952003-09-25 14:50:04 +000011550
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11554$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556/* end confdefs.h. */
11557
11558# include <netdb.h>
11559
11560int
11561main ()
11562{
11563
11564 char *name;
11565 struct hostent *he;
11566 struct hostent_data data;
11567
11568 (void) gethostbyname_r(name, he, &data);
11569
11570 ;
11571 return 0;
11572}
11573_ACEOF
11574if ac_fn_c_try_compile "$LINENO"; then :
11575
11576 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11577
11578
11579$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11580
11581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11582$as_echo "yes" >&6; }
11583
11584else
11585
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11587$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011594
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011597 CFLAGS=$OLD_CFLAGS
11598
11599else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 for ac_func in gethostbyname
11602do :
11603 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011604if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011605 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011606#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011607_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011609fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011610done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011611
Michael W. Hudson54241132001-12-07 15:38:26 +000011612
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011613fi
11614
Michael W. Hudson54241132001-12-07 15:38:26 +000011615
11616
11617
11618
11619
11620
Guido van Rossum627b2d71993-12-24 10:39:16 +000011621# checks for system services
11622# (none yet)
11623
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011624# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011625ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011626if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011627
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011628else
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11630$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011631if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011633else
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011635LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639/* Override any GCC internal prototype to avoid an error.
11640 Use char because int might match the return type of a GCC
11641 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011642#ifdef __cplusplus
11643extern "C"
11644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011645char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011646int
11647main ()
11648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011649return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011650 ;
11651 return 0;
11652}
11653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011656else
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011659rm -f core conftest.err conftest.$ac_objext \
11660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011661LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11664$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011665if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 cat >>confdefs.h <<_ACEOF
11667#define HAVE_LIBIEEE 1
11668_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011670 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011671
Guido van Rossum627b2d71993-12-24 10:39:16 +000011672fi
11673
Michael W. Hudson54241132001-12-07 15:38:26 +000011674
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011675fi
11676
Michael W. Hudson54241132001-12-07 15:38:26 +000011677
Guido van Rossum7f253911997-05-09 02:42:48 +000011678# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11680$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011682# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011684 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011685if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011686then
11687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11691$as_echo "yes" >&6; }
11692else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11693$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011694fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011695else
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11697$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011698fi
11699
Guido van Rossum7f253911997-05-09 02:42:48 +000011700
Guido van Rossum7f43da71994-08-01 12:15:30 +000011701# check for --with-libm=...
11702
Guido van Rossum563e7081996-09-10 18:20:48 +000011703case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011704Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011705*) LIBM=-lm
11706esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11708$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011710# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011713if test "$withval" = no
11714then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11716$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011717elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011718then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11720$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011721else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011722fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011723else
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11725$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726fi
11727
Guido van Rossum7f43da71994-08-01 12:15:30 +000011728
11729# check for --with-libc=...
11730
Matthias Kloseb9621712010-04-24 17:59:49 +000011731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11732$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011734# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011735if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011737if test "$withval" = no
11738then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11740$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011741elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011742then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11744$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011745else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011746fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11749$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011750fi
11751
Guido van Rossum7f43da71994-08-01 12:15:30 +000011752
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753# **************************************************
11754# * Check for various properties of floating point *
11755# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11758$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011759if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761else
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764 ac_cv_little_endian_double=no
11765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767/* end confdefs.h. */
11768
11769#include <string.h>
11770int main() {
11771 double x = 9006104071832581.0;
11772 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11773 return 0;
11774 else
11775 return 1;
11776}
11777
11778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011779if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780 ac_cv_little_endian_double=yes
11781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786fi
11787
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788fi
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11791$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011792if test "$ac_cv_little_endian_double" = yes
11793then
11794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011796
11797fi
11798
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11800$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011801if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011803else
11804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011806 ac_cv_big_endian_double=no
11807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011809/* end confdefs.h. */
11810
11811#include <string.h>
11812int main() {
11813 double x = 9006104071832581.0;
11814 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11815 return 0;
11816 else
11817 return 1;
11818}
11819
11820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011821if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822 ac_cv_big_endian_double=yes
11823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011828fi
11829
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830fi
11831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11833$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834if test "$ac_cv_big_endian_double" = yes
11835then
11836
Matthias Kloseb9621712010-04-24 17:59:49 +000011837$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838
11839fi
11840
11841# Some ARM platforms use a mixed-endian representation for doubles.
11842# While Python doesn't currently have full support for these platforms
11843# (see e.g., issue 1762561), we can at least make sure that float <-> string
11844# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11846$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011847if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011849else
11850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011852 ac_cv_mixed_endian_double=no
11853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011855/* end confdefs.h. */
11856
11857#include <string.h>
11858int main() {
11859 double x = 9006104071832581.0;
11860 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11861 return 0;
11862 else
11863 return 1;
11864}
11865
11866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011867if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011868 ac_cv_mixed_endian_double=yes
11869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011874fi
11875
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011876fi
11877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11879$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011880if test "$ac_cv_mixed_endian_double" = yes
11881then
11882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011884
11885fi
11886
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011887# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011888# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011889# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011890# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011891# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011892# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011893
11894# This inline assembler syntax may also work for suncc and icc,
11895# so we try it on all platforms.
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11898$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011900/* end confdefs.h. */
11901
11902int
11903main ()
11904{
11905
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011906 unsigned short cw;
11907 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11908 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011909
11910 ;
11911 return 0;
11912}
11913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011914if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011915 have_gcc_asm_for_x87=yes
11916else
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011918fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11921$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011922if test "$have_gcc_asm_for_x87" = yes
11923then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011924
Matthias Kloseb9621712010-04-24 17:59:49 +000011925$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011926
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011928
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929# Detect whether system arithmetic is subject to x87-style double
11930# rounding issues. The result of this test has little meaning on non
11931# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11932# mode is round-to-nearest and double rounding issues are present, and
11933# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11935$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011936# $BASECFLAGS may affect the result
11937ac_save_cc="$CC"
11938CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011939if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011940 ac_cv_x87_double_rounding=no
11941else
Matthias Kloseb9621712010-04-24 17:59:49 +000011942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011943/* end confdefs.h. */
11944
11945#include <stdlib.h>
11946#include <math.h>
11947int main() {
11948 volatile double x, y, z;
11949 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11950 x = 0.99999999999999989; /* 1-2**-53 */
11951 y = 1./x;
11952 if (y != 1.)
11953 exit(0);
11954 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11955 x = 1e16;
11956 y = 2.99999;
11957 z = x + y;
11958 if (z != 1e16+4.)
11959 exit(0);
11960 /* both tests show evidence of double rounding */
11961 exit(1);
11962}
11963
11964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011965if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011966 ac_cv_x87_double_rounding=no
11967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011972fi
11973
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011974CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11976$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011977if test "$ac_cv_x87_double_rounding" = yes
11978then
11979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011981
11982fi
11983
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011984# ************************************
11985# * Check for mathematical functions *
11986# ************************************
11987
11988LIBS_SAVE=$LIBS
11989LIBS="$LIBS $LIBM"
11990
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011991for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11992do :
11993 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11994ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011995if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011996 cat >>confdefs.h <<_ACEOF
11997#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11998_ACEOF
11999
12000fi
12001done
12002
12003for ac_func in hypot lgamma log1p round tgamma
12004do :
12005 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12006ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012007if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012008 cat >>confdefs.h <<_ACEOF
12009#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12010_ACEOF
12011
12012fi
12013done
12014
12015ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12016"
Gregory P. Smith69140482012-01-16 02:05:55 -080012017if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012018 ac_have_decl=1
12019else
12020 ac_have_decl=0
12021fi
12022
12023cat >>confdefs.h <<_ACEOF
12024#define HAVE_DECL_ISINF $ac_have_decl
12025_ACEOF
12026ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12027"
Gregory P. Smith69140482012-01-16 02:05:55 -080012028if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012029 ac_have_decl=1
12030else
12031 ac_have_decl=0
12032fi
12033
12034cat >>confdefs.h <<_ACEOF
12035#define HAVE_DECL_ISNAN $ac_have_decl
12036_ACEOF
12037ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12038"
Gregory P. Smith69140482012-01-16 02:05:55 -080012039if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012040 ac_have_decl=1
12041else
12042 ac_have_decl=0
12043fi
12044
12045cat >>confdefs.h <<_ACEOF
12046#define HAVE_DECL_ISFINITE $ac_have_decl
12047_ACEOF
12048
12049
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012050# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12051# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12053$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012054if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012056else
12057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012059 ac_cv_tanh_preserves_zero_sign=no
12060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012062/* end confdefs.h. */
12063
12064#include <math.h>
12065#include <stdlib.h>
12066int main() {
12067 /* return 0 if either negative zeros don't exist
12068 on this platform or if negative zeros exist
12069 and tanh(-0.) == -0. */
12070 if (atan2(0., -1.) == atan2(-0., -1.) ||
12071 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12072 else exit(1);
12073}
12074
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012077 ac_cv_tanh_preserves_zero_sign=yes
12078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12082 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012083fi
12084
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012085fi
12086
Matthias Kloseb9621712010-04-24 17:59:49 +000012087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12088$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012089if test "$ac_cv_tanh_preserves_zero_sign" = yes
12090then
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012093
12094fi
12095
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012096if test "$ac_cv_func_log1p" = yes
12097then
12098 # On some versions of AIX, log1p(-0.) returns 0. instead of
12099 # -0. See issue #9920.
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12101$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012102 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012103 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012104else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012105
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012106 if test "$cross_compiling" = yes; then :
12107 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012108else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12110/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012111
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012112 #include <math.h>
12113 #include <stdlib.h>
12114 int main() {
12115 /* Fail if the signs of log1p(-0.) and -0. can be
12116 distinguished. */
12117 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12118 return 0;
12119 else
12120 return 1;
12121 }
12122
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012123_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012124if ac_fn_c_try_run "$LINENO"; then :
12125 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012126else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012127 ac_cv_log1p_drops_zero_sign=yes
12128fi
12129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012131fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012132
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012133fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012134
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12136$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12137fi
12138if test "$ac_cv_log1p_drops_zero_sign" = yes
12139then
12140
12141$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12142
12143fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012144
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012145LIBS=$LIBS_SAVE
12146
Mark Dickinsona614f042009-11-28 12:48:43 +000012147# For multiprocessing module, check that sem_open
12148# actually works. For FreeBSD versions <= 7.2,
12149# the kernel module that provides POSIX semaphores
12150# isn't loaded by default, so an attempt to call
12151# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12153$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012154if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012158 ac_cv_posix_semaphores_enabled=yes
12159else
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012161/* end confdefs.h. */
12162
12163#include <unistd.h>
12164#include <fcntl.h>
12165#include <stdio.h>
12166#include <semaphore.h>
12167#include <sys/stat.h>
12168
12169int main(void) {
12170 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12171 if (a == SEM_FAILED) {
12172 perror("sem_open");
12173 return 1;
12174 }
12175 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012176 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012177 return 0;
12178}
12179
12180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012181if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012182 ac_cv_posix_semaphores_enabled=yes
12183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012188fi
12189
12190
Mark Dickinsona614f042009-11-28 12:48:43 +000012191fi
12192
Matthias Kloseb9621712010-04-24 17:59:49 +000012193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12194$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012195if test $ac_cv_posix_semaphores_enabled = no
12196then
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012199
12200fi
12201
Mark Dickinson10683072009-04-18 21:18:19 +000012202# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12204$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012205if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012207else
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012209 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012210else
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012212/* end confdefs.h. */
12213
12214#include <unistd.h>
12215#include <fcntl.h>
12216#include <stdio.h>
12217#include <semaphore.h>
12218#include <sys/stat.h>
12219
12220int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012221 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012222 int count;
12223 int res;
12224 if(a==SEM_FAILED){
12225 perror("sem_open");
12226 return 1;
12227
12228 }
12229 res = sem_getvalue(a, &count);
12230 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012231 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012232 return res==-1 ? 1 : 0;
12233}
12234
Mark Dickinson10683072009-04-18 21:18:19 +000012235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012236if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012237 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012238else
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12242 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012243fi
12244
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012245
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012246fi
12247
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12249$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012250if test $ac_cv_broken_sem_getvalue = yes
12251then
12252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012254
12255fi
12256
Mark Dickinsonbd792642009-03-18 20:06:12 +000012257# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12259$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012260# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012261if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012262 enableval=$enable_big_digits; case $enable_big_digits in
12263yes)
12264 enable_big_digits=30 ;;
12265no)
12266 enable_big_digits=15 ;;
1226715|30)
12268 ;;
12269*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012270 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 +000012271esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12273$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012274
12275cat >>confdefs.h <<_ACEOF
12276#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12277_ACEOF
12278
12279
12280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12282$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012283fi
12284
12285
Guido van Rossumef2255b2000-03-10 22:30:29 +000012286# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012287ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012288if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012289
12290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012292
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012293 wchar_h="yes"
12294
Guido van Rossumef2255b2000-03-10 22:30:29 +000012295else
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012297
12298fi
12299
Michael W. Hudson54241132001-12-07 15:38:26 +000012300
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012302# determine wchar_t size
12303if test "$wchar_h" = yes
12304then
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12307# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12308# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12310$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012311if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12315"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Martin v. Löwis11437992002-04-12 09:54:03 +000012317else
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 if test "$ac_cv_type_wchar_t" = yes; then
12319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012321as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012322See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323 else
12324 ac_cv_sizeof_wchar_t=0
12325 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012327
Martin v. Löwis11437992002-04-12 09:54:03 +000012328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12330$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012331
12332
12333
Martin v. Löwis11437992002-04-12 09:54:03 +000012334cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012335#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012336_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012337
Michael W. Hudson54241132001-12-07 15:38:26 +000012338
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012339fi
12340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12342$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012343have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012345/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012346
12347#include <tcl.h>
12348#if TCL_UTF_MAX != 6
12349# error "NOT UCS4_TCL"
12350#endif
12351int
12352main ()
12353{
12354
12355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012360
12361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012363
12364 have_ucs4_tcl=yes
12365
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12369$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012370
Skip Montanaro6dead952003-09-25 14:50:04 +000012371# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012372if test "$wchar_h" = yes
12373then
12374 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12376$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012377 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012379else
12380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012382 ac_cv_wchar_t_signed=yes
12383else
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012386
12387 #include <wchar.h>
12388 int main()
12389 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012390 /* Success: exit code 0 */
12391 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012392 }
12393
12394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012396 ac_cv_wchar_t_signed=yes
12397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12401 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012402fi
12403
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012404fi
12405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12407$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408fi
12409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12411$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012412
12413# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012414if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012415 withval=$with_wide_unicode;
12416if test "$withval" != no
12417then unicode_size="4"
12418else unicode_size="2"
12419fi
12420
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012421else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422
Georg Brandl52d168a2008-01-07 18:10:24 +000012423case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012424 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012425 *) unicode_size="2" ;;
12426esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012427
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012428fi
12429
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012430
12431
Georg Brandl52d168a2008-01-07 18:10:24 +000012432case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012433 4)
12434 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12435
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012436 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012437 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012439 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012440esac
12441
Michael W. Hudson54241132001-12-07 15:38:26 +000012442
Martin v. Löwis11437992002-04-12 09:54:03 +000012443
Georg Brandl52d168a2008-01-07 18:10:24 +000012444# wchar_t is only usable if it maps to an unsigned type
12445if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012446 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012447then
12448 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012453
Georg Brandl52d168a2008-01-07 18:10:24 +000012454elif test "$ac_cv_sizeof_short" = "$unicode_size"
12455then
12456 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012458
Georg Brandl52d168a2008-01-07 18:10:24 +000012459elif test "$ac_cv_sizeof_long" = "$unicode_size"
12460then
12461 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012463
Georg Brandl52d168a2008-01-07 18:10:24 +000012464else
12465 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12468$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012469
12470# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12472$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012473if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012475else
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 ac_cv_c_bigendian=unknown
12477 # See if we're dealing with a universal compiler.
12478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12479/* end confdefs.h. */
12480#ifndef __APPLE_CC__
12481 not a universal capable compiler
12482 #endif
12483 typedef int dummy;
12484
Skip Montanaro6dead952003-09-25 14:50:04 +000012485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_compile "$LINENO"; then :
12487
12488 # Check for potential -arch flags. It is not universal unless
12489 # there are at least two -arch flags with different values.
12490 ac_arch=
12491 ac_prev=
12492 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12493 if test -n "$ac_prev"; then
12494 case $ac_word in
12495 i?86 | x86_64 | ppc | ppc64)
12496 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12497 ac_arch=$ac_word
12498 else
12499 ac_cv_c_bigendian=universal
12500 break
12501 fi
12502 ;;
12503 esac
12504 ac_prev=
12505 elif test "x$ac_word" = "x-arch"; then
12506 ac_prev=arch
12507 fi
12508 done
12509fi
12510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12511 if test $ac_cv_c_bigendian = unknown; then
12512 # See if sys/param.h defines the BYTE_ORDER macro.
12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012514/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012515#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518int
12519main ()
12520{
Matthias Kloseb9621712010-04-24 17:59:49 +000012521#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12522 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12523 && LITTLE_ENDIAN)
12524 bogus endian macros
12525 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012526
12527 ;
12528 return 0;
12529}
12530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012532 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012534/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012535#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012537
Martin v. Löwis11437992002-04-12 09:54:03 +000012538int
12539main ()
12540{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012541#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 not big endian
12543 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
12545 ;
12546 return 0;
12547}
12548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012550 ac_cv_c_bigendian=yes
12551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012555fi
12556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12557 fi
12558 if test $ac_cv_c_bigendian = unknown; then
12559 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012561/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012562#include <limits.h>
12563
Martin v. Löwis11437992002-04-12 09:54:03 +000012564int
12565main ()
12566{
Matthias Kloseb9621712010-04-24 17:59:49 +000012567#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12568 bogus endian macros
12569 #endif
12570
Martin v. Löwis11437992002-04-12 09:54:03 +000012571 ;
12572 return 0;
12573}
12574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012575if ac_fn_c_try_compile "$LINENO"; then :
12576 # It does; now see whether it defined to _BIG_ENDIAN or not.
12577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12578/* end confdefs.h. */
12579#include <limits.h>
12580
12581int
12582main ()
12583{
12584#ifndef _BIG_ENDIAN
12585 not big endian
12586 #endif
12587
12588 ;
12589 return 0;
12590}
12591_ACEOF
12592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012594else
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12598fi
12599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12600 fi
12601 if test $ac_cv_c_bigendian = unknown; then
12602 # Compile a test program.
12603 if test "$cross_compiling" = yes; then :
12604 # Try to guess by grepping values from an object file.
12605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12606/* end confdefs.h. */
12607short int ascii_mm[] =
12608 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12609 short int ascii_ii[] =
12610 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12611 int use_ascii (int i) {
12612 return ascii_mm[i] + ascii_ii[i];
12613 }
12614 short int ebcdic_ii[] =
12615 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12616 short int ebcdic_mm[] =
12617 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12618 int use_ebcdic (int i) {
12619 return ebcdic_mm[i] + ebcdic_ii[i];
12620 }
12621 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623int
12624main ()
12625{
12626return use_ascii (foo) == use_ebcdic (foo);
12627 ;
12628 return 0;
12629}
12630_ACEOF
12631if ac_fn_c_try_compile "$LINENO"; then :
12632 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12633 ac_cv_c_bigendian=yes
12634 fi
12635 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12636 if test "$ac_cv_c_bigendian" = unknown; then
12637 ac_cv_c_bigendian=no
12638 else
12639 # finding both strings is unlikely to happen, but who knows?
12640 ac_cv_c_bigendian=unknown
12641 fi
12642 fi
12643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012645else
Matthias Kloseb9621712010-04-24 17:59:49 +000012646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012649int
12650main ()
12651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 /* Are we little or big endian? From Harbison&Steele. */
12654 union
12655 {
12656 long int l;
12657 char c[sizeof (long int)];
12658 } u;
12659 u.l = 1;
12660 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661
12662 ;
12663 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012664}
Martin v. Löwis11437992002-04-12 09:54:03 +000012665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012667 ac_cv_c_bigendian=no
12668else
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12672 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12678$as_echo "$ac_cv_c_bigendian" >&6; }
12679 case $ac_cv_c_bigendian in #(
12680 yes)
12681 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12682;; #(
12683 no)
12684 ;; #(
12685 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012688
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 ;; #(
12690 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012691 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012692 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012693 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012694
Michael W. Hudson54241132001-12-07 15:38:26 +000012695
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012696# ABI version string for Python extension modules. This appears between the
12697# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12698# from the following attributes which affect the ABI of this Python build (in
12699# this order):
12700#
12701# * The Python implementation (always 'cpython-' for us)
12702# * The major and minor version numbers
12703# * --with-pydebug (adds a 'd')
12704# * --with-pymalloc (adds a 'm')
12705# * --with-wide-unicode (adds a 'u')
12706#
12707# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012708# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12709# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012710
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12712$as_echo_n "checking ABIFLAGS... " >&6; }
12713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12714$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12716$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012717SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12719$as_echo "$SOABI" >&6; }
12720
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12722$as_echo_n "checking LDVERSION... " >&6; }
12723LDVERSION='$(VERSION)$(ABIFLAGS)'
12724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12725$as_echo "$LDVERSION" >&6; }
12726
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012727# SO is the extension of shared libraries `(including the dot!)
12728# -- usually .so, .sl on HP-UX, .dll on Cygwin
12729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12730$as_echo_n "checking SO... " >&6; }
12731if test -z "$SO"
12732then
12733 case $ac_sys_system in
12734 hp*|HP*)
12735 case `uname -m` in
12736 ia64) SO=.so;;
12737 *) SO=.sl;;
12738 esac
12739 ;;
12740 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012741 Linux*|GNU*)
12742 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012743 *) SO=.so;;
12744 esac
12745else
12746 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012747 echo
12748 echo '====================================================================='
12749 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012750 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012751 echo '+ Do you really mean to change the extension for shared libraries? +'
12752 echo '+ Continuing in 10 seconds to let you to ponder. +'
12753 echo '+ +'
12754 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012755 sleep 10
12756fi
12757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12758$as_echo "$SO" >&6; }
12759
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012760# Check whether right shifting a negative integer extends the sign bit
12761# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12763$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012764if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012766else
Martin v. Löwis11437992002-04-12 09:54:03 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012769 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012770else
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012772/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012773
12774int main()
12775{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012776 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012777}
12778
Martin v. Löwis11437992002-04-12 09:54:03 +000012779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012780if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012781 ac_cv_rshift_extends_sign=yes
12782else
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012787fi
12788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789fi
12790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12792$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012793if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012794then
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012797
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012798fi
12799
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012800# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12802$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012803if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012805else
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012808/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012809#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012813
12814 FILE *f = fopen("/dev/null", "r");
12815 flockfile(f);
12816 getc_unlocked(f);
12817 funlockfile(f);
12818
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 ;
12820 return 0;
12821}
12822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012823if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012824 ac_cv_have_getc_unlocked=yes
12825else
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 ac_cv_have_getc_unlocked=no
12827fi
12828rm -f core conftest.err conftest.$ac_objext \
12829 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12833$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012834if test "$ac_cv_have_getc_unlocked" = yes
12835then
Martin v. Löwis11437992002-04-12 09:54:03 +000012836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012838
12839fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012840
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012841# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012842# save the value of LIBS so we don't actually link Python with readline
12843LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012844
Gregory P. Smith18820942008-09-07 06:24:49 +000012845# On some systems we need to link readline to a termcap compatible
12846# library. NOTE: Keep the precedence of listed libraries synchronised
12847# with setup.py.
12848py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12850$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012851for py_libtermcap in "" ncursesw ncurses curses termcap; do
12852 if test -z "$py_libtermcap"; then
12853 READLINE_LIBS="-lreadline"
12854 else
12855 READLINE_LIBS="-lreadline -l$py_libtermcap"
12856 fi
12857 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012859/* end confdefs.h. */
12860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861/* Override any GCC internal prototype to avoid an error.
12862 Use char because int might match the return type of a GCC
12863 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012864#ifdef __cplusplus
12865extern "C"
12866#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012867char readline ();
12868int
12869main ()
12870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012872 ;
12873 return 0;
12874}
12875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012876if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012877 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012879rm -f core conftest.err conftest.$ac_objext \
12880 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012881 if test $py_cv_lib_readline = yes; then
12882 break
12883 fi
12884done
12885# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12886#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012887if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12889$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12892$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012895
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012896fi
12897
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012898# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12900$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012901if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012903else
12904 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012905LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012907/* end confdefs.h. */
12908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909/* Override any GCC internal prototype to avoid an error.
12910 Use char because int might match the return type of a GCC
12911 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012912#ifdef __cplusplus
12913extern "C"
12914#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012915char rl_callback_handler_install ();
12916int
12917main ()
12918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012920 ;
12921 return 0;
12922}
12923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012924if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012925 ac_cv_lib_readline_rl_callback_handler_install=yes
12926else
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012929rm -f core conftest.err conftest.$ac_objext \
12930 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012931LIBS=$ac_check_lib_save_LIBS
12932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12934$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012935if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012938
12939fi
12940
12941
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012942# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012944/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012945#include <readline/readline.h>
12946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012947if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012948 have_readline=yes
12949else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012950 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012951
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012952fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012953rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012954if test $have_readline = yes
12955then
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012957/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012958#include <readline/readline.h>
12959
12960_ACEOF
12961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012965
12966fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012967rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012970/* end confdefs.h. */
12971#include <readline/readline.h>
12972
12973_ACEOF
12974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012978
12979fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012980rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012981
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012982fi
12983
Martin v. Löwis0daad592001-09-30 21:09:59 +000012984# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12986$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012987if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012989else
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012991LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995/* Override any GCC internal prototype to avoid an error.
12996 Use char because int might match the return type of a GCC
12997 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012998#ifdef __cplusplus
12999extern "C"
13000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013001char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013002int
13003main ()
13004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 ;
13007 return 0;
13008}
13009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013015rm -f core conftest.err conftest.$ac_objext \
13016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013017LIBS=$ac_check_lib_save_LIBS
13018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13020$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013021if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013024
Martin v. Löwis0daad592001-09-30 21:09:59 +000013025fi
13026
Michael W. Hudson54241132001-12-07 15:38:26 +000013027
Thomas Wouters89d996e2007-09-08 17:39:28 +000013028# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13030$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013031if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013033else
13034 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013035LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013037/* end confdefs.h. */
13038
13039/* Override any GCC internal prototype to avoid an error.
13040 Use char because int might match the return type of a GCC
13041 builtin and then its argument prototype would still apply. */
13042#ifdef __cplusplus
13043extern "C"
13044#endif
13045char rl_completion_display_matches_hook ();
13046int
13047main ()
13048{
13049return rl_completion_display_matches_hook ();
13050 ;
13051 return 0;
13052}
13053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013054if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013055 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13056else
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013059rm -f core conftest.err conftest.$ac_objext \
13060 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013061LIBS=$ac_check_lib_save_LIBS
13062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13064$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013065if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013068
13069fi
13070
13071
Martin v. Löwis0daad592001-09-30 21:09:59 +000013072# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13074$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013075if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013077else
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013079LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083/* Override any GCC internal prototype to avoid an error.
13084 Use char because int might match the return type of a GCC
13085 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013086#ifdef __cplusplus
13087extern "C"
13088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013089char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013090int
13091main ()
13092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013094 ;
13095 return 0;
13096}
13097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013098if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013099 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013103rm -f core conftest.err conftest.$ac_objext \
13104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013105LIBS=$ac_check_lib_save_LIBS
13106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13108$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013109if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013112
Guido van Rossum353ae582001-07-10 16:45:32 +000013113fi
13114
Jack Jansendd19cf82001-12-06 22:36:17 +000013115
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013116# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013118/* end confdefs.h. */
13119#include <readline/readline.h>
13120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013121if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013122 have_readline=yes
13123else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013124 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013125
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013126fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013127rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013128if test $have_readline = yes
13129then
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013131/* end confdefs.h. */
13132#include <readline/readline.h>
13133
13134_ACEOF
13135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013139
13140fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013141rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013142
13143fi
13144
Martin v. Löwis82bca632006-02-10 20:49:30 +000013145# End of readline checks: restore LIBS
13146LIBS=$LIBS_no_readline
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13149$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013150if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013152else
Martin v. Löwis11437992002-04-12 09:54:03 +000013153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013155 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013158/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013159
13160int main()
13161{
13162 int val1 = nice(1);
13163 if (val1 != -1 && val1 == nice(2))
13164 exit(0);
13165 exit(1);
13166}
13167
Martin v. Löwis11437992002-04-12 09:54:03 +000013168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013169if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013170 ac_cv_broken_nice=yes
13171else
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013176fi
13177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178fi
13179
Matthias Kloseb9621712010-04-24 17:59:49 +000013180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13181$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013182if test "$ac_cv_broken_nice" = yes
13183then
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013186
13187fi
13188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13190$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013191if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013195 ac_cv_broken_poll=no
13196else
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013198/* end confdefs.h. */
13199
13200#include <poll.h>
13201
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202int main()
13203{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013204 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013205 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013206
13207 close (42);
13208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013209 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013210 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013211 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013212 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013213 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013214 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013215 return 1;
13216}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013217
13218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013220 ac_cv_broken_poll=yes
13221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13225 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013227
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013228fi
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13231$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013232if test "$ac_cv_broken_poll" = yes
13233then
13234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013236
13237fi
13238
Brett Cannon43802422005-02-10 20:48:03 +000013239# 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 +000013240# (which is not required by ISO C or UNIX spec) and/or if we support
13241# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013242ac_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 +000013243#include <$ac_cv_struct_tm>
13244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245"
Gregory P. Smith69140482012-01-16 02:05:55 -080013246if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013247
13248cat >>confdefs.h <<_ACEOF
13249#define HAVE_STRUCT_TM_TM_ZONE 1
13250_ACEOF
13251
13252
13253fi
13254
13255if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013258
13259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13261"
Gregory P. Smith69140482012-01-16 02:05:55 -080013262if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013266fi
13267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013269#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270_ACEOF
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13273$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013274if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013278/* end confdefs.h. */
13279#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280#if !HAVE_DECL_TZNAME
13281extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013282#endif
13283
13284int
13285main ()
13286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013287return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013288 ;
13289 return 0;
13290}
13291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013292if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013293 ac_cv_var_tzname=yes
13294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013297rm -f core conftest.err conftest.$ac_objext \
13298 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13301$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013302 if test $ac_cv_var_tzname = yes; then
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013305
13306 fi
13307fi
13308
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013309
Martin v. Löwis1d459062005-03-14 21:23:33 +000013310# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13312$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013313if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013315else
13316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013318 ac_cv_working_tzset=no
13319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013321/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013322
13323#include <stdlib.h>
13324#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013325#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013326
13327#if HAVE_TZNAME
13328extern char *tzname[];
13329#endif
13330
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013331int main()
13332{
Brett Cannon18367812003-09-19 00:59:16 +000013333 /* Note that we need to ensure that not only does tzset(3)
13334 do 'something' with localtime, but it works as documented
13335 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013336 This includes making sure that tzname is set properly if
13337 tm->tm_zone does not exist since it is the alternative way
13338 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013339
13340 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013341 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013342 */
13343
Martin v. Löwis1d459062005-03-14 21:23:33 +000013344 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013345 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13346
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013347 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013348 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013349 if (localtime(&groundhogday)->tm_hour != 0)
13350 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013351#if HAVE_TZNAME
13352 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13353 if (strcmp(tzname[0], "UTC") ||
13354 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13355 exit(1);
13356#endif
Brett Cannon18367812003-09-19 00:59:16 +000013357
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013358 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013359 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013360 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013361 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013362#if HAVE_TZNAME
13363 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13364 exit(1);
13365#endif
Brett Cannon18367812003-09-19 00:59:16 +000013366
13367 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13368 tzset();
13369 if (localtime(&groundhogday)->tm_hour != 11)
13370 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013371#if HAVE_TZNAME
13372 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13373 exit(1);
13374#endif
13375
13376#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013377 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13378 exit(1);
13379 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13380 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013381#endif
Brett Cannon18367812003-09-19 00:59:16 +000013382
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013383 exit(0);
13384}
13385
13386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013387if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013388 ac_cv_working_tzset=yes
13389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013394fi
13395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013396fi
13397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13399$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013400if test "$ac_cv_working_tzset" = yes
13401then
13402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013404
13405fi
13406
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013407# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13409$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013410if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013414/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013415#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013416int
13417main ()
13418{
13419
13420struct stat st;
13421st.st_mtim.tv_nsec = 1;
13422
13423 ;
13424 return 0;
13425}
13426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013428 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13433fi
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13436$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013437if test "$ac_cv_stat_tv_nsec" = yes
13438then
13439
Matthias Kloseb9621712010-04-24 17:59:49 +000013440$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013441
13442fi
13443
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013444# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13446$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013447if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013451/* end confdefs.h. */
13452#include <sys/stat.h>
13453int
13454main ()
13455{
13456
13457struct stat st;
13458st.st_mtimespec.tv_nsec = 1;
13459
13460 ;
13461 return 0;
13462}
13463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013465 ac_cv_stat_tv_nsec2=yes
13466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13470fi
13471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13473$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013474if test "$ac_cv_stat_tv_nsec2" = yes
13475then
13476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013478
13479fi
13480
Jack Jansen666b1e72001-10-31 12:11:48 +000013481# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13483$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013484if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013488/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013489#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013490int
13491main ()
13492{
Jack Jansen666b1e72001-10-31 12:11:48 +000013493
13494 int rtn;
13495 rtn = mvwdelch(0,0,0);
13496
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 ;
13498 return 0;
13499}
13500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013501if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013502 ac_cv_mvwdelch_is_expression=yes
13503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13507fi
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13510$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013511
13512if test "$ac_cv_mvwdelch_is_expression" = yes
13513then
Martin v. Löwis11437992002-04-12 09:54:03 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013516
13517fi
13518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13520$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013521if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013523else
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013526#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013527int
13528main ()
13529{
Jack Jansen666b1e72001-10-31 12:11:48 +000013530
13531 WINDOW *w;
13532 w->_flags = 0;
13533
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 ;
13535 return 0;
13536}
13537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013539 ac_cv_window_has_flags=yes
13540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13544fi
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13547$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013548
Jack Jansen666b1e72001-10-31 12:11:48 +000013549
13550if test "$ac_cv_window_has_flags" = yes
13551then
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013554
13555fi
13556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13558$as_echo_n "checking for is_term_resized... " >&6; }
13559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013560/* end confdefs.h. */
13561#include <curses.h>
13562int
13563main ()
13564{
13565void *x=is_term_resized
13566 ;
13567 return 0;
13568}
13569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013570if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013573
Matthias Kloseb159a552010-04-25 21:00:44 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013575$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13578$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013579
13580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13584$as_echo_n "checking for resize_term... " >&6; }
13585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013586/* end confdefs.h. */
13587#include <curses.h>
13588int
13589main ()
13590{
13591void *x=resize_term
13592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013599
Matthias Kloseb159a552010-04-25 21:00:44 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13604$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013605
13606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13610$as_echo_n "checking for resizeterm... " >&6; }
13611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013612/* end confdefs.h. */
13613#include <curses.h>
13614int
13615main ()
13616{
13617void *x=resizeterm
13618 ;
13619 return 0;
13620}
13621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013622if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013625
Matthias Kloseb159a552010-04-25 21:00:44 +000013626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013627$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13630$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013631
13632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13636$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013637
13638if test -r /dev/ptmx
13639then
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13641$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013644
Thomas Wouters89f507f2006-12-13 04:49:30 +000013645else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13647$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013648fi
13649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13651$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013652
13653if test -r /dev/ptc
13654then
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13656$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013659
Thomas Wouters89f507f2006-12-13 04:49:30 +000013660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13662$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013663fi
13664
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013665if test "$have_long_long" = yes
13666then
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13668$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013669 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013671else
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013673 ac_cv_have_long_long_format=no
13674else
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013676/* end confdefs.h. */
13677
13678 #include <stdio.h>
13679 #include <stddef.h>
13680 #include <string.h>
13681
13682 #ifdef HAVE_SYS_TYPES_H
13683 #include <sys/types.h>
13684 #endif
13685
13686 int main()
13687 {
13688 char buffer[256];
13689
13690 if (sprintf(buffer, "%lld", (long long)123) < 0)
13691 return 1;
13692 if (strcmp(buffer, "123"))
13693 return 1;
13694
13695 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13696 return 1;
13697 if (strcmp(buffer, "-123"))
13698 return 1;
13699
13700 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13701 return 1;
13702 if (strcmp(buffer, "123"))
13703 return 1;
13704
13705 return 0;
13706 }
13707
13708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013709if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013710 ac_cv_have_long_long_format=yes
13711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013716fi
13717
13718
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013719fi
13720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13722$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013723fi
13724
Mark Dickinson89d7d412009-12-31 20:50:59 +000013725if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013726then
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013729
13730fi
13731
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013732if test $ac_sys_system = Darwin
13733then
13734 LIBS="$LIBS -framework CoreFoundation"
13735fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13738$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013739if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013743 ac_cv_have_size_t_format="cross -- assuming yes"
13744
Thomas Wouters477c8d52006-05-27 19:21:47 +000013745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013747/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013748
Thomas Wouters477c8d52006-05-27 19:21:47 +000013749#include <stdio.h>
13750#include <stddef.h>
13751#include <string.h>
13752
Christian Heimes2c181612007-12-17 20:04:13 +000013753#ifdef HAVE_SYS_TYPES_H
13754#include <sys/types.h>
13755#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013756
13757#ifdef HAVE_SSIZE_T
13758typedef ssize_t Py_ssize_t;
13759#elif SIZEOF_VOID_P == SIZEOF_LONG
13760typedef long Py_ssize_t;
13761#else
13762typedef int Py_ssize_t;
13763#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013764
Christian Heimes2c181612007-12-17 20:04:13 +000013765int main()
13766{
13767 char buffer[256];
13768
Thomas Wouters477c8d52006-05-27 19:21:47 +000013769 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13770 return 1;
13771
Thomas Wouters89f507f2006-12-13 04:49:30 +000013772 if (strcmp(buffer, "123"))
13773 return 1;
13774
13775 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13776 return 1;
13777
13778 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013779 return 1;
13780
13781 return 0;
13782}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013783
Thomas Wouters477c8d52006-05-27 19:21:47 +000013784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013785if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013786 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013787else
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013792fi
13793
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13796$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013797if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013800
13801fi
13802
Matthias Kloseb9621712010-04-24 17:59:49 +000013803ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013804#ifdef HAVE_SYS_TYPES_H
13805#include <sys/types.h>
13806#endif
13807#ifdef HAVE_SYS_SOCKET_H
13808#include <sys/socket.h>
13809#endif
13810
Matthias Kloseb9621712010-04-24 17:59:49 +000013811"
Gregory P. Smith69140482012-01-16 02:05:55 -080013812if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013817
13818fi
13819
Michael W. Hudson54241132001-12-07 15:38:26 +000013820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13822$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013823if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013825else
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013827 ac_cv_broken_mbstowcs=no
13828else
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013830/* end confdefs.h. */
13831
13832#include<stdlib.h>
13833int main() {
13834 size_t len = -1;
13835 const char *str = "text";
13836 len = mbstowcs(NULL, str, 0);
13837 return (len != 4);
13838}
13839
13840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013841if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013842 ac_cv_broken_mbstowcs=no
13843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013848fi
13849
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013850fi
13851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13853$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013854if test "$ac_cv_broken_mbstowcs" = yes
13855then
13856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013858
13859fi
13860
Antoine Pitrou042b1282010-08-13 21:15:58 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13862$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013863if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013864 $as_echo_n "(cached) " >&6
13865else
13866 if test "$cross_compiling" = yes; then :
13867 ac_cv_computed_gotos=no
13868else
13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13870/* end confdefs.h. */
13871
13872int main(int argc, char **argv)
13873{
13874 static void *targets[1] = { &&LABEL1 };
13875 goto LABEL2;
13876LABEL1:
13877 return 0;
13878LABEL2:
13879 goto *targets[0];
13880 return 1;
13881}
13882
13883_ACEOF
13884if ac_fn_c_try_run "$LINENO"; then :
13885 ac_cv_computed_gotos=yes
13886else
13887 ac_cv_computed_gotos=no
13888fi
13889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13890 conftest.$ac_objext conftest.beam conftest.$ac_ext
13891fi
13892
13893fi
13894
13895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13896$as_echo "$ac_cv_computed_gotos" >&6; }
13897if test "$ac_cv_computed_gotos" = yes
13898then
13899
13900$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13901
13902fi
13903
Antoine Pitroub52ec782009-01-25 16:34:23 +000013904# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13906$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013907
13908# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013909if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013910 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013911if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013912then
13913
Matthias Kloseb9621712010-04-24 17:59:49 +000013914$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013915
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13917$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013918fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013919if test "$withval" = no
13920then
13921
13922$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13925$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013926fi
13927
Antoine Pitrou042b1282010-08-13 21:15:58 +000013928else
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13930$as_echo "no value specified" >&6; }
13931fi
13932
Antoine Pitroub52ec782009-01-25 16:34:23 +000013933
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013934case $ac_sys_system in
13935AIX*)
13936
13937$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13938 ;;
13939esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013940
Michael W. Hudson54241132001-12-07 15:38:26 +000013941
Jesus Cea6a792292010-05-03 21:18:48 +000013942case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080013943 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 +000013944esac
13945
Gregory P. Smith138fa432010-12-13 08:00:52 +000013946ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080013947if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013948
13949$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13950
13951fi
Jesus Cea6a792292010-05-03 21:18:48 +000013952
13953
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013954
13955
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013956for h in `(cd $srcdir;echo Python/thread_*.h)`
13957do
13958 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13959done
13960
Michael W. Hudson54241132001-12-07 15:38:26 +000013961
Neal Norwitzd24499d2005-12-18 21:36:39 +000013962SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13964$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013965for dir in $SRCDIRS; do
13966 if test ! -d $dir; then
13967 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013968 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013969done
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13971$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013972
Guido van Rossum627b2d71993-12-24 10:39:16 +000013973# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013974ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013975
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013976ac_config_files="$ac_config_files Modules/ld_so_aix"
13977
Martin v. Löwis11437992002-04-12 09:54:03 +000013978cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013979# This file is a shell script that caches the results of configure
13980# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013981# scripts and configure runs, see configure's option --config-cache.
13982# It is not useful on other systems. If it contains results you don't
13983# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013984#
Martin v. Löwis11437992002-04-12 09:54:03 +000013985# config.status only pays attention to the cache file if you give it
13986# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013987#
Skip Montanaro6dead952003-09-25 14:50:04 +000013988# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013989# loading this file, other *unset* `ac_cv_foo' will be assigned the
13990# following values.
13991
13992_ACEOF
13993
Guido van Rossumf78abae1997-01-21 22:02:36 +000013994# The following way of writing the cache mishandles newlines in values,
13995# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013997# Ultrix sh set writes to stderr and can't be redirected directly,
13998# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999(
14000 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14001 eval ac_val=\$$ac_var
14002 case $ac_val in #(
14003 *${as_nl}*)
14004 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14006$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014007 esac
14008 case $ac_var in #(
14009 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14011 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012 esac ;;
14013 esac
14014 done
14015
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014017 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14018 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 # `set' does not quote correctly, so add quotes: double-quote
14020 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014022 "s/'/'\\\\''/g;
14023 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 *)
14026 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029 esac |
14030 sort
14031) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014036 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14037 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014038 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14039 :end' >>confcache
14040if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14041 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014042 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14044$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014045 if test ! -f "$cache_file" || test -h "$cache_file"; then
14046 cat confcache >"$cache_file"
14047 else
14048 case $cache_file in #(
14049 */* | ?:*)
14050 mv -f confcache "$cache_file"$$ &&
14051 mv -f "$cache_file"$$ "$cache_file" ;; #(
14052 *)
14053 mv -f confcache "$cache_file" ;;
14054 esac
14055 fi
14056 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014057 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14059$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014060 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014061fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014062rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014063
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014064test "x$prefix" = xNONE && prefix=$ac_default_prefix
14065# Let make expand exec_prefix.
14066test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014068DEFS=-DHAVE_CONFIG_H
14069
Skip Montanaro6dead952003-09-25 14:50:04 +000014070ac_libobjs=
14071ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014072U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014073for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14074 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14078 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14080 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014081done
14082LIBOBJS=$ac_libobjs
14083
14084LTLIBOBJS=$ac_ltlibobjs
14085
14086
Martin v. Löwis11437992002-04-12 09:54:03 +000014087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088
Gregory P. Smith69140482012-01-16 02:05:55 -080014089: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014090ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014091ac_clean_files_save=$ac_clean_files
14092ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014093{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14094$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14095as_write_fail=0
14096cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014097#! $SHELL
14098# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014099# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014100# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014101# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014104ac_cs_recheck=false
14105ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107SHELL=\${CONFIG_SHELL-$SHELL}
14108export SHELL
14109_ASEOF
14110cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14111## -------------------- ##
14112## M4sh Initialization. ##
14113## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115# Be more Bourne compatible
14116DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014117if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 emulate sh
14119 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014121 # is contrary to our usage. Disable this feature.
14122 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014124else
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 case `(set -o) 2>/dev/null` in #(
14126 *posix*) :
14127 set -o posix ;; #(
14128 *) :
14129 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014131fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014132
14133
Matthias Kloseb9621712010-04-24 17:59:49 +000014134as_nl='
14135'
14136export as_nl
14137# Printing a long string crashes Solaris 7 /usr/bin/printf.
14138as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14139as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14140as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14141# Prefer a ksh shell builtin over an external printf program on Solaris,
14142# but without wasting forks for bash or zsh.
14143if test -z "$BASH_VERSION$ZSH_VERSION" \
14144 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14145 as_echo='print -r --'
14146 as_echo_n='print -rn --'
14147elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14148 as_echo='printf %s\n'
14149 as_echo_n='printf %s'
14150else
14151 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14152 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14153 as_echo_n='/usr/ucb/echo -n'
14154 else
14155 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14156 as_echo_n_body='eval
14157 arg=$1;
14158 case $arg in #(
14159 *"$as_nl"*)
14160 expr "X$arg" : "X\\(.*\\)$as_nl";
14161 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14162 esac;
14163 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14164 '
14165 export as_echo_n_body
14166 as_echo_n='sh -c $as_echo_n_body as_echo'
14167 fi
14168 export as_echo_body
14169 as_echo='sh -c $as_echo_body as_echo'
14170fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
14172# The user is always right.
14173if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 PATH_SEPARATOR=:
14175 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14176 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14177 PATH_SEPARATOR=';'
14178 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181
14182# IFS
14183# We need space, tab and new line, in precisely that order. Quoting is
14184# there to prevent editors from complaining about space-tab.
14185# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14186# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187IFS=" "" $as_nl"
14188
14189# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014190as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014191case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192 *[\\/]* ) as_myself=$0 ;;
14193 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014194for as_dir in $PATH
14195do
14196 IFS=$as_save_IFS
14197 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14199 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202 ;;
14203esac
14204# We did not find ourselves, most probably we were run as `sh COMMAND'
14205# in which case we are not to be found in the path.
14206if test "x$as_myself" = x; then
14207 as_myself=$0
14208fi
14209if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14211 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212fi
14213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214# Unset variables that we do not need and which cause bugs (e.g. in
14215# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14216# suppresses any "Segmentation fault" message there. '((' could
14217# trigger a bug in pdksh 5.2.14.
14218for as_var in BASH_ENV ENV MAIL MAILPATH
14219do eval test x\${$as_var+set} = xset \
14220 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221done
14222PS1='$ '
14223PS2='> '
14224PS4='+ '
14225
14226# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014227LC_ALL=C
14228export LC_ALL
14229LANGUAGE=C
14230export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231
Matthias Kloseb9621712010-04-24 17:59:49 +000014232# CDPATH.
14233(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14234
14235
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014236# as_fn_error STATUS ERROR [LINENO LOG_FD]
14237# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014238# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14239# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014240# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014241as_fn_error ()
14242{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014243 as_status=$1; test $as_status -eq 0 && as_status=1
14244 if test "$4"; then
14245 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14246 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014248 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 as_fn_exit $as_status
14250} # as_fn_error
14251
14252
14253# as_fn_set_status STATUS
14254# -----------------------
14255# Set $? to STATUS, without forking.
14256as_fn_set_status ()
14257{
14258 return $1
14259} # as_fn_set_status
14260
14261# as_fn_exit STATUS
14262# -----------------
14263# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14264as_fn_exit ()
14265{
14266 set +e
14267 as_fn_set_status $1
14268 exit $1
14269} # as_fn_exit
14270
14271# as_fn_unset VAR
14272# ---------------
14273# Portably unset VAR.
14274as_fn_unset ()
14275{
14276 { eval $1=; unset $1;}
14277}
14278as_unset=as_fn_unset
14279# as_fn_append VAR VALUE
14280# ----------------------
14281# Append the text in VALUE to the end of the definition contained in VAR. Take
14282# advantage of any shell optimizations that allow amortized linear growth over
14283# repeated appends, instead of the typical quadratic growth present in naive
14284# implementations.
14285if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14286 eval 'as_fn_append ()
14287 {
14288 eval $1+=\$2
14289 }'
14290else
14291 as_fn_append ()
14292 {
14293 eval $1=\$$1\$2
14294 }
14295fi # as_fn_append
14296
14297# as_fn_arith ARG...
14298# ------------------
14299# Perform arithmetic evaluation on the ARGs, and store the result in the
14300# global $as_val. Take advantage of shells that can avoid forks. The arguments
14301# must be portable across $(()) and expr.
14302if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14303 eval 'as_fn_arith ()
14304 {
14305 as_val=$(( $* ))
14306 }'
14307else
14308 as_fn_arith ()
14309 {
14310 as_val=`expr "$@" || test $? -eq 1`
14311 }
14312fi # as_fn_arith
14313
14314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315if expr a : '\(a\)' >/dev/null 2>&1 &&
14316 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14317 as_expr=expr
14318else
14319 as_expr=false
14320fi
14321
14322if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14323 as_basename=basename
14324else
14325 as_basename=false
14326fi
14327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14329 as_dirname=dirname
14330else
14331 as_dirname=false
14332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334as_me=`$as_basename -- "$0" ||
14335$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14336 X"$0" : 'X\(//\)$' \| \
14337 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014338$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339 sed '/^.*\/\([^/][^/]*\)\/*$/{
14340 s//\1/
14341 q
14342 }
14343 /^X\/\(\/\/\)$/{
14344 s//\1/
14345 q
14346 }
14347 /^X\/\(\/\).*/{
14348 s//\1/
14349 q
14350 }
14351 s/.*/./; q'`
14352
Matthias Kloseb9621712010-04-24 17:59:49 +000014353# Avoid depending upon Character Ranges.
14354as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14355as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14356as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14357as_cr_digits='0123456789'
14358as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359
14360ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014361case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014362-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 xy) ECHO_C='\c';;
14366 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14367 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368 esac;;
14369*)
14370 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014371esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014372
Martin v. Löwis11437992002-04-12 09:54:03 +000014373rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374if test -d conf$$.dir; then
14375 rm -f conf$$.dir/conf$$.file
14376else
14377 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014380if (echo >conf$$.file) 2>/dev/null; then
14381 if ln -s conf$$.file conf$$ 2>/dev/null; then
14382 as_ln_s='ln -s'
14383 # ... but there are two gotchas:
14384 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14385 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14386 # In both cases, we have to default to `cp -p'.
14387 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14388 as_ln_s='cp -p'
14389 elif ln conf$$.file conf$$ 2>/dev/null; then
14390 as_ln_s=ln
14391 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014394else
14395 as_ln_s='cp -p'
14396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14398rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Matthias Kloseb9621712010-04-24 17:59:49 +000014400
14401# as_fn_mkdir_p
14402# -------------
14403# Create "$as_dir" as a directory, including parents if necessary.
14404as_fn_mkdir_p ()
14405{
14406
14407 case $as_dir in #(
14408 -*) as_dir=./$as_dir;;
14409 esac
14410 test -d "$as_dir" || eval $as_mkdir_p || {
14411 as_dirs=
14412 while :; do
14413 case $as_dir in #(
14414 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14415 *) as_qdir=$as_dir;;
14416 esac
14417 as_dirs="'$as_qdir' $as_dirs"
14418 as_dir=`$as_dirname -- "$as_dir" ||
14419$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14420 X"$as_dir" : 'X\(//\)[^/]' \| \
14421 X"$as_dir" : 'X\(//\)$' \| \
14422 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14423$as_echo X"$as_dir" |
14424 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14425 s//\1/
14426 q
14427 }
14428 /^X\(\/\/\)[^/].*/{
14429 s//\1/
14430 q
14431 }
14432 /^X\(\/\/\)$/{
14433 s//\1/
14434 q
14435 }
14436 /^X\(\/\).*/{
14437 s//\1/
14438 q
14439 }
14440 s/.*/./; q'`
14441 test -d "$as_dir" && break
14442 done
14443 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014444 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014445
14446
14447} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014448if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014450else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014452 as_mkdir_p=false
14453fi
14454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455if test -x / >/dev/null 2>&1; then
14456 as_test_x='test -x'
14457else
14458 if ls -dL / >/dev/null 2>&1; then
14459 as_ls_L_option=L
14460 else
14461 as_ls_L_option=
14462 fi
14463 as_test_x='
14464 eval sh -c '\''
14465 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 case $1 in #(
14469 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472 ???[sx]*):;;*)false;;esac;fi
14473 '\'' sh
14474 '
14475fi
14476as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
14478# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014479as_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 +000014480
14481# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014482as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014483
14484
Martin v. Löwis11437992002-04-12 09:54:03 +000014485exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014486## ----------------------------------- ##
14487## Main body of $CONFIG_STATUS script. ##
14488## ----------------------------------- ##
14489_ASEOF
14490test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14493# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014494# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495# values after options handling.
14496ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014497This file was extended by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -080014498generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
14500 CONFIG_FILES = $CONFIG_FILES
14501 CONFIG_HEADERS = $CONFIG_HEADERS
14502 CONFIG_LINKS = $CONFIG_LINKS
14503 CONFIG_COMMANDS = $CONFIG_COMMANDS
14504 $ $0 $@
14505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506on `(hostname || uname -n) 2>/dev/null | sed 1q`
14507"
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509_ACEOF
14510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511case $ac_config_files in *"
14512"*) set x $ac_config_files; shift; ac_config_files=$*;;
14513esac
14514
14515case $ac_config_headers in *"
14516"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14517esac
14518
14519
14520cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014521# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014522config_files="$ac_config_files"
14523config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014528ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014529\`$as_me' instantiates files and other configuration actions
14530from templates according to the current configuration. Unless the files
14531and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014532
Matthias Kloseb9621712010-04-24 17:59:49 +000014533Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
14535 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 --config print configuration, then exit
14538 -q, --quiet, --silent
14539 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 -d, --debug don't remove temporary files
14541 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014542 --file=FILE[:TEMPLATE]
14543 instantiate the configuration file FILE
14544 --header=FILE[:TEMPLATE]
14545 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014546
14547Configuration files:
14548$config_files
14549
14550Configuration headers:
14551$config_headers
14552
Matthias Kloseb9621712010-04-24 17:59:49 +000014553Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14557ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014558ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014559python config.status 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -080014560configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014562
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014563Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014564This config.status script is free software; the Free Software Foundation
14565gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566
14567ac_pwd='$ac_pwd'
14568srcdir='$srcdir'
14569INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014570test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014571_ACEOF
14572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14574# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014575ac_need_defaults=:
14576while test $# != 0
14577do
14578 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014579 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14581 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014582 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014584 --*=)
14585 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14586 ac_optarg=
14587 ac_shift=:
14588 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014590 ac_option=$1
14591 ac_optarg=$2
14592 ac_shift=shift
14593 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 esac
14595
Skip Montanaro6dead952003-09-25 14:50:04 +000014596 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014598 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14599 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 $as_echo "$ac_cs_version"; exit ;;
14602 --config | --confi | --conf | --con | --co | --c )
14603 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014604 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 debug=: ;;
14606 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014607 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 case $ac_optarg in
14609 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014610 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 esac
14612 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 ac_need_defaults=false;;
14614 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014615 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 case $ac_optarg in
14617 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14618 esac
14619 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621 --he | --h)
14622 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014623 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014624Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014627 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14628 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14629 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
14631 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014632 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014633Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
14638 esac
14639 shift
14640done
14641
Skip Montanaro6dead952003-09-25 14:50:04 +000014642ac_configure_extra_args=
14643
14644if $ac_cs_silent; then
14645 exec 6>/dev/null
14646 ac_configure_extra_args="$ac_configure_extra_args --silent"
14647fi
14648
14649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014651if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14653 shift
14654 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14655 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014658fi
14659
Martin v. Löwis11437992002-04-12 09:54:03 +000014660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662exec 5>>config.log
14663{
14664 echo
14665 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14666## Running $as_me. ##
14667_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676
14677# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014678for ac_config_target in $ac_config_targets
14679do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 case $ac_config_target in
14681 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14682 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14683 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014684 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14685 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14687 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014688 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014689 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690
Gregory P. Smith69140482012-01-16 02:05:55 -080014691 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014692 esac
14693done
14694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695
Martin v. Löwis11437992002-04-12 09:54:03 +000014696# If the user did not use the arguments to specify the items to instantiate,
14697# then the envvar interface is used. Set only those that are not.
14698# We use the long form for the default assignment because of an extremely
14699# bizarre bug on SunOS 4.1.3.
14700if $ac_need_defaults; then
14701 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14702 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14703fi
14704
Skip Montanaro6dead952003-09-25 14:50:04 +000014705# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014707# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708# Hook for its removal unless debugging.
14709# Note that there is a small window in which the directory will not be cleaned:
14710# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014711$debug ||
14712{
Gregory P. Smith69140482012-01-16 02:05:55 -080014713 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014715 : "${ac_tmp:=$tmp}"
14716 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014719}
Martin v. Löwis11437992002-04-12 09:54:03 +000014720# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014721
Martin v. Löwis11437992002-04-12 09:54:03 +000014722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014724 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014725} ||
14726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727 tmp=./conf$$-$RANDOM
14728 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014729} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014730ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732# Set up the scripts for CONFIG_FILES section.
14733# No need to generate them if there are no CONFIG_FILES.
14734# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737
14738ac_cr=`echo X | tr X '\015'`
14739# On cygwin, bash can eat \r inside `` if the user requested igncr.
14740# But we know of no other shell where ac_cr would be empty at this
14741# point, so we can use a bashism as a fallback.
14742if test "x$ac_cr" = x; then
14743 eval ac_cr=\$\'\\r\'
14744fi
14745ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14746if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014747 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014748else
14749 ac_cs_awk_cr=$ac_cr
14750fi
14751
Gregory P. Smith69140482012-01-16 02:05:55 -080014752echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014753_ACEOF
14754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755
Matthias Kloseb9621712010-04-24 17:59:49 +000014756{
14757 echo "cat >conf$$subs.awk <<_ACEOF" &&
14758 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14759 echo "_ACEOF"
14760} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014761 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14762ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763ac_delim='%!_!# '
14764for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014766 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14769 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770 break
14771 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014772 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773 else
14774 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776done
Matthias Kloseb9621712010-04-24 17:59:49 +000014777rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014780cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014782sed -n '
14783h
14784s/^/S["/; s/!.*/"]=/
14785p
14786g
14787s/^[^!]*!//
14788:repl
14789t repl
14790s/'"$ac_delim"'$//
14791t delim
14792:nl
14793h
14794s/\(.\{148\}\)..*/\1/
14795t more1
14796s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14797p
14798n
14799b repl
14800:more1
14801s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14802p
14803g
14804s/.\{148\}//
14805t nl
14806:delim
14807h
14808s/\(.\{148\}\)..*/\1/
14809t more2
14810s/["\\]/\\&/g; s/^/"/; s/$/"/
14811p
14812b
14813:more2
14814s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14815p
14816g
14817s/.\{148\}//
14818t delim
14819' <conf$$subs.awk | sed '
14820/^[^""]/{
14821 N
14822 s/\n//
14823}
14824' >>$CONFIG_STATUS || ac_write_fail=1
14825rm -f conf$$subs.awk
14826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14827_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014828cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 for (key in S) S_is_set[key] = 1
14830 FS = ""
14831
14832}
14833{
14834 line = $ 0
14835 nfields = split(line, field, "@")
14836 substed = 0
14837 len = length(field[1])
14838 for (i = 2; i < nfields; i++) {
14839 key = field[i]
14840 keylen = length(key)
14841 if (S_is_set[key]) {
14842 value = S[key]
14843 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14844 len += length(value) + length(field[++i])
14845 substed = 1
14846 } else
14847 len += 1 + keylen
14848 }
14849
14850 print line
14851}
14852
14853_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14856if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14857 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14858else
14859 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014860fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014861 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014862_ACEOF
14863
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014864# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14865# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866# trailing colons and then remove the whole line if VPATH becomes empty
14867# (actually we leave an empty line to preserve line numbers).
14868if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014869 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14870h
14871s///
14872s/^/:/
14873s/[ ]*$/:/
14874s/:\$(srcdir):/:/g
14875s/:\${srcdir}:/:/g
14876s/:@srcdir@:/:/g
14877s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014879x
14880s/\(=[ ]*\).*/\1/
14881G
14882s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883s/^[^=]*=[ ]*$//
14884}'
14885fi
14886
Matthias Kloseb9621712010-04-24 17:59:49 +000014887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014888fi # test -n "$CONFIG_FILES"
14889
Matthias Kloseb9621712010-04-24 17:59:49 +000014890# Set up the scripts for CONFIG_HEADERS section.
14891# No need to generate them if there are no CONFIG_HEADERS.
14892# This happens for instance with `./config.status Makefile'.
14893if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014894cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014895BEGIN {
14896_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898# Transform confdefs.h into an awk script `defines.awk', embedded as
14899# here-document in config.status, that substitutes the proper values into
14900# config.h.in to produce config.h.
14901
14902# Create a delimiter string that does not exist in confdefs.h, to ease
14903# handling of long lines.
14904ac_delim='%!_!# '
14905for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080014906 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14907 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 break
14909 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014910 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 else
14912 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14913 fi
14914done
14915
14916# For the awk script, D is an array of macro values keyed by name,
14917# likewise P contains macro parameters if any. Preserve backslash
14918# newline sequences.
14919
14920ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14921sed -n '
14922s/.\{148\}/&'"$ac_delim"'/g
14923t rset
14924:rset
14925s/^[ ]*#[ ]*define[ ][ ]*/ /
14926t def
14927d
14928:def
14929s/\\$//
14930t bsnl
14931s/["\\]/\\&/g
14932s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14933D["\1"]=" \3"/p
14934s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14935d
14936:bsnl
14937s/["\\]/\\&/g
14938s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14939D["\1"]=" \3\\\\\\n"\\/p
14940t cont
14941s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14942t cont
14943d
14944:cont
14945n
14946s/.\{148\}/&'"$ac_delim"'/g
14947t clear
14948:clear
14949s/\\$//
14950t bsnlc
14951s/["\\]/\\&/g; s/^/"/; s/$/"/p
14952d
14953:bsnlc
14954s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14955b cont
14956' <confdefs.h | sed '
14957s/'"$ac_delim"'/"\\\
14958"/g' >>$CONFIG_STATUS || ac_write_fail=1
14959
14960cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14961 for (key in D) D_is_set[key] = 1
14962 FS = ""
14963}
14964/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14965 line = \$ 0
14966 split(line, arg, " ")
14967 if (arg[1] == "#") {
14968 defundef = arg[2]
14969 mac1 = arg[3]
14970 } else {
14971 defundef = substr(arg[1], 2)
14972 mac1 = arg[2]
14973 }
14974 split(mac1, mac2, "(") #)
14975 macro = mac2[1]
14976 prefix = substr(line, 1, index(line, defundef) - 1)
14977 if (D_is_set[macro]) {
14978 # Preserve the white space surrounding the "#".
14979 print prefix "define", macro P[macro] D[macro]
14980 next
14981 } else {
14982 # Replace #undef with comments. This is necessary, for example,
14983 # in the case of _POSIX_SOURCE, which is predefined and required
14984 # on some systems where configure will not decide to define it.
14985 if (defundef == "undef") {
14986 print "/*", prefix defundef, macro, "*/"
14987 next
14988 }
14989 }
14990}
14991{ print }
14992_ACAWK
14993_ACEOF
14994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014995 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014996fi # test -n "$CONFIG_HEADERS"
14997
14998
14999eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15000shift
15001for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002do
15003 case $ac_tag in
15004 :[FHLC]) ac_mode=$ac_tag; continue;;
15005 esac
15006 case $ac_mode$ac_tag in
15007 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015008 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015009 :[FH]-) ac_tag=-:-;;
15010 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15011 esac
15012 ac_save_IFS=$IFS
15013 IFS=:
15014 set x $ac_tag
15015 IFS=$ac_save_IFS
15016 shift
15017 ac_file=$1
15018 shift
15019
15020 case $ac_mode in
15021 :L) ac_source=$1;;
15022 :[FH])
15023 ac_file_inputs=
15024 for ac_f
15025 do
15026 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015027 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 *) # Look for the file first in the build tree, then in the source tree
15029 # (if the path is not absolute). The absolute path cannot be DOS-style,
15030 # because $ac_f cannot contain `:'.
15031 test -f "$ac_f" ||
15032 case $ac_f in
15033 [\\/$]*) false;;
15034 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15035 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015036 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15039 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 done
15041
15042 # Let's still pretend it is `configure' which instantiates (i.e., don't
15043 # use $as_me), people would be surprised to read:
15044 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 configure_input='Generated from '`
15046 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15047 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048 if test x"$ac_file" != x-; then
15049 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15051$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 # Neutralize special characters interpreted by sed in replacement strings.
15054 case $configure_input in #(
15055 *\&* | *\|* | *\\* )
15056 ac_sed_conf_input=`$as_echo "$configure_input" |
15057 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15058 *) ac_sed_conf_input=$configure_input;;
15059 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060
15061 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015062 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15063 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064 esac
15065 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 esac
15067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015069$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015070 X"$ac_file" : 'X\(//\)[^/]' \| \
15071 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015073$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15075 s//\1/
15076 q
15077 }
15078 /^X\(\/\/\)[^/].*/{
15079 s//\1/
15080 q
15081 }
15082 /^X\(\/\/\)$/{
15083 s//\1/
15084 q
15085 }
15086 /^X\(\/\).*/{
15087 s//\1/
15088 q
15089 }
15090 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015091 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 ac_builddir=.
15093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094case "$ac_dir" in
15095.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15096*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100 case $ac_top_builddir_sub in
15101 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15102 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15103 esac ;;
15104esac
15105ac_abs_top_builddir=$ac_pwd
15106ac_abs_builddir=$ac_pwd$ac_dir_suffix
15107# for backward compatibility:
15108ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015109
15110case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113 ac_top_srcdir=$ac_top_builddir_sub
15114 ac_abs_top_srcdir=$ac_pwd ;;
15115 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117 ac_top_srcdir=$srcdir
15118 ac_abs_top_srcdir=$srcdir ;;
15119 *) # Relative name.
15120 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15121 ac_top_srcdir=$ac_top_build_prefix$srcdir
15122 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015123esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015125
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127 case $ac_mode in
15128 :F)
15129 #
15130 # CONFIG_FILE
15131 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015132
15133 case $INSTALL in
15134 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015137_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140# If the template does not know about datarootdir, expand it.
15141# FIXME: This hack should be removed a few years after 2.60.
15142ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015143ac_sed_dataroot='
15144/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145 p
15146 q
15147}
15148/@datadir@/p
15149/@docdir@/p
15150/@infodir@/p
15151/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015152/@mandir@/p'
15153case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154*datarootdir*) ac_datarootdir_seen=yes;;
15155*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15157$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015159cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160 ac_datarootdir_hack='
15161 s&@datadir@&$datadir&g
15162 s&@docdir@&$docdir&g
15163 s&@infodir@&$infodir&g
15164 s&@localedir@&$localedir&g
15165 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015167esac
15168_ACEOF
15169
15170# Neutralize VPATH when `$srcdir' = `.'.
15171# Shell code in configure.ac might set extrasub.
15172# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15174ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015175$extrasub
15176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015177cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015178:t
15179/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015180s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015182s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183s&@srcdir@&$ac_srcdir&;t t
15184s&@abs_srcdir@&$ac_abs_srcdir&;t t
15185s&@top_srcdir@&$ac_top_srcdir&;t t
15186s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15187s&@builddir@&$ac_builddir&;t t
15188s&@abs_builddir@&$ac_abs_builddir&;t t
15189s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15190s&@INSTALL@&$ac_INSTALL&;t t
15191$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015192"
Gregory P. Smith69140482012-01-16 02:05:55 -080015193eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15194 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015197 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15198 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15199 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 { $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 +000015201which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015202$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015203which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015204
Gregory P. Smith69140482012-01-16 02:05:55 -080015205 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015207 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15208 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015210 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211 ;;
15212 :H)
15213 #
15214 # CONFIG_HEADER
15215 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 {
15218 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015219 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15220 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015221 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015222 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15224$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015227 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015228 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015229 fi
15230 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015232 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015233 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237
15238 esac
15239
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015240
15241 case $ac_file$ac_mode in
15242 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15243
15244 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245done # for ac_tag
15246
Guido van Rossum627b2d71993-12-24 10:39:16 +000015247
Matthias Kloseb9621712010-04-24 17:59:49 +000015248as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015249_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015250ac_clean_files=$ac_clean_files_save
15251
Matthias Kloseb9621712010-04-24 17:59:49 +000015252test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015253 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015254
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
15256# configure is writing to config.log, and then calls config.status.
15257# config.status does its own redirection, appending to config.log.
15258# Unfortunately, on DOS this fails, as config.log is still kept open
15259# by configure, so config.status won't be able to write to it; its
15260# output is simply discarded. So we exec the FD to /dev/null,
15261# effectively closing config.log, so it can be properly (re)opened and
15262# appended to by config.status. When coming back to configure, we
15263# need to make the FD available again.
15264if test "$no_create" != yes; then
15265 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015266 ac_config_status_args=
15267 test "$silent" = yes &&
15268 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015270 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 exec 5>>config.log
15272 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15273 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015274 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015275fi
15276if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15278$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015279fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015280
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015281
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015282echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015283if test ! -f Modules/Setup
15284then
15285 cp $srcdir/Modules/Setup.dist Modules/Setup
15286fi
15287
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015288echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015289if test ! -f Modules/Setup.local
15290then
15291 echo "# Edit this file for local setup changes" >Modules/Setup.local
15292fi
15293
15294echo "creating Makefile"
15295$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15296 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015297 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015298mv config.c Modules