blob: f9a62613a34460e3432a2fafd3571ac73a7ed7e7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose0f4c16e2012-03-14 23:10:15 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Gregory P. Smith69140482012-01-16 02:05:55 -08004# Generated by GNU Autoconf 2.68 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080095as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000096case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000097 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000099for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117fi
118
Matthias Kloseb9621712010-04-24 17:59:49 +0000119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
Matthias Kloseb9621712010-04-24 17:59:49 +0000137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212 CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
Gregory P. Smith69140482012-01-16 02:05:55 -0800221 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
Gregory P. Smith69140482012-01-16 02:05:55 -0800226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Kloseb9621712010-04-24 17:59:49 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000410$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000431
432
Matthias Kloseb9621712010-04-24 17:59:49 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000465case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000467 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000482 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000524 case $1 in #(
525 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000526 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Kloseb9621712010-04-24 17:59:49 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000564PACKAGE_VERSION='3.2'
565PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Kloseb9621712010-04-24 17:59:49 +0000606ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000607SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000608THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000609SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000642ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000643LN
Trent Nelsona45afca2012-08-30 14:32:02 +0000644MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000645INSTALL_DATA
646INSTALL_SCRIPT
647INSTALL_PROGRAM
Georg Brandl187c1112011-07-03 09:23:20 +0200648HAS_PYTHON
649DISABLE_ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100650HAS_HG
651HGBRANCH
652HGTAG
653HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000654SVNVERSION
655ARFLAGS
656AR
657RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000658USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000659GNULD
660LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000661LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000662RUNSHARED
663INSTSONAME
664LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000665PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000666BLDLIBRARY
667DLLLIBRARY
668LDLIBRARY
669LIBRARY
670BUILDEXEEXT
671EGREP
672GREP
673CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200674NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000675MAINCC
676CXX
677OBJEXT
678EXEEXT
679ac_ct_CC
680CPPFLAGS
681LDFLAGS
682CFLAGS
683CC
684EXPORT_MACOSX_DEPLOYMENT_TARGET
685CONFIGURE_MACOSX_DEPLOYMENT_TARGET
686SGI_ABI
687MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000688FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000689FRAMEWORKUNIXTOOLSPREFIX
690FRAMEWORKALTINSTALLLAST
691FRAMEWORKALTINSTALLFIRST
692FRAMEWORKINSTALLLAST
693FRAMEWORKINSTALLFIRST
694PYTHONFRAMEWORKINSTALLDIR
695PYTHONFRAMEWORKPREFIX
696PYTHONFRAMEWORKDIR
697PYTHONFRAMEWORKIDENTIFIER
698PYTHONFRAMEWORK
699LIPO_32BIT_FLAGS
700ARCH_RUN_32BIT
701UNIVERSALSDK
702CONFIG_ARGS
703SOVERSION
704VERSION
705target_alias
706host_alias
707build_alias
708LIBS
709ECHO_T
710ECHO_N
711ECHO_C
712DEFS
713mandir
714localedir
715libdir
716psdir
717pdfdir
718dvidir
719htmldir
720infodir
721docdir
722oldincludedir
723includedir
724localstatedir
725sharedstatedir
726sysconfdir
727datadir
728datarootdir
729libexecdir
730sbindir
731bindir
732program_transform_name
733prefix
734exec_prefix
735PACKAGE_URL
736PACKAGE_BUGREPORT
737PACKAGE_STRING
738PACKAGE_VERSION
739PACKAGE_TARNAME
740PACKAGE_NAME
741PATH_SEPARATOR
742SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000743ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000744ac_user_opts='
745enable_option_checking
746enable_universalsdk
747with_universal_archs
748with_framework_name
749enable_framework
750with_gcc
751with_cxx_main
752with_suffix
753enable_shared
754enable_profiling
755with_pydebug
756with_libs
757with_system_expat
758with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000759enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000760with_dbmliborder
761with_signal_module
762with_dec_threads
763with_threads
764with_thread
765enable_ipv6
766with_doc_strings
767with_tsc
768with_pymalloc
769with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000770with_fpectl
771with_libm
772with_libc
773enable_big_digits
774with_wide_unicode
775with_computed_gotos
776'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777 ac_precious_vars='build_alias
778host_alias
779target_alias
780CC
781CFLAGS
782LDFLAGS
783LIBS
784CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000785CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000786
Guido van Rossum627b2d71993-12-24 10:39:16 +0000787
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000789ac_init_help=
790ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000791ac_unrecognized_opts=
792ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793# The variables have the same names as the options, with
794# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000795cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798no_recursion=
799prefix=NONE
800program_prefix=NONE
801program_suffix=NONE
802program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000804site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807x_includes=NONE
808x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000809
810# Installation directory options.
811# These are left unexpanded so users can "make install exec_prefix=/foo"
812# and all the variables that are supposed to be based on exec_prefix
813# by default will actually change.
814# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816bindir='${exec_prefix}/bin'
817sbindir='${exec_prefix}/sbin'
818libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819datarootdir='${prefix}/share'
820datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821sysconfdir='${prefix}/etc'
822sharedstatedir='${prefix}/com'
823localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824includedir='${prefix}/include'
825oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
827infodir='${datarootdir}/info'
828htmldir='${docdir}'
829dvidir='${docdir}'
830pdfdir='${docdir}'
831psdir='${docdir}'
832libdir='${exec_prefix}/lib'
833localedir='${datarootdir}/locale'
834mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000839do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840 # If the previous option needs an argument, assign it.
841 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843 ac_prev=
844 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000845 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000848 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
849 *=) ac_optarg= ;;
850 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853 # Accept the important Cygnus configure options, so we can diagnose typos.
854
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855 case $ac_dashdash$ac_option in
856 --)
857 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859 -bindir | --bindir | --bindi | --bind | --bin | --bi)
860 ac_prev=bindir ;;
861 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863
864 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 -cache-file | --cache-file | --cache-fil | --cache-fi \
870 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
871 ac_prev=cache_file ;;
872 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
873 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 cache_file=$ac_optarg ;;
875
876 --config-cache | -C)
877 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
885 | --dataroo | --dataro | --datar)
886 ac_prev=datarootdir ;;
887 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
888 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
889 datarootdir=$ac_optarg ;;
890
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000892 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000894 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000895 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000896 ac_useropt_orig=$ac_useropt
897 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
898 case $ac_user_opts in
899 *"
900"enable_$ac_useropt"
901"*) ;;
902 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
903 ac_unrecognized_sep=', ';;
904 esac
905 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906
907 -docdir | --docdir | --docdi | --doc | --do)
908 ac_prev=docdir ;;
909 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
910 docdir=$ac_optarg ;;
911
912 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
913 ac_prev=dvidir ;;
914 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
915 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
917 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000920 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000921 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000922 ac_useropt_orig=$ac_useropt
923 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
924 case $ac_user_opts in
925 *"
926"enable_$ac_useropt"
927"*) ;;
928 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
929 ac_unrecognized_sep=', ';;
930 esac
931 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
934 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
935 | --exec | --exe | --ex)
936 ac_prev=exec_prefix ;;
937 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
938 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
939 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
942 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 # Obsolete; use --with-gas.
944 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 -help | --help | --hel | --he | -h)
947 ac_init_help=long ;;
948 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
949 ac_init_help=recursive ;;
950 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
951 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
959 ac_prev=htmldir ;;
960 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
961 | --ht=*)
962 htmldir=$ac_optarg ;;
963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -includedir | --includedir | --includedi | --included | --include \
965 | --includ | --inclu | --incl | --inc)
966 ac_prev=includedir ;;
967 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
968 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
971 -infodir | --infodir | --infodi | --infod | --info | --inf)
972 ac_prev=infodir ;;
973 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
976 -libdir | --libdir | --libdi | --libd)
977 ac_prev=libdir ;;
978 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980
981 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
982 | --libexe | --libex | --libe)
983 ac_prev=libexecdir ;;
984 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
985 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000988 -localedir | --localedir | --localedi | --localed | --locale)
989 ac_prev=localedir ;;
990 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
991 localedir=$ac_optarg ;;
992
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000993 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000994 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995 ac_prev=localstatedir ;;
996 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000997 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
1000 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1001 ac_prev=mandir ;;
1002 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001006 # Obsolete; use --without-fp.
1007 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011 no_create=yes ;;
1012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1018 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1019 | --oldin | --oldi | --old | --ol | --o)
1020 ac_prev=oldincludedir ;;
1021 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1022 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1023 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1027 ac_prev=prefix ;;
1028 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
1031 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1032 | --program-pre | --program-pr | --program-p)
1033 ac_prev=program_prefix ;;
1034 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1035 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
1038 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1039 | --program-suf | --program-su | --program-s)
1040 ac_prev=program_suffix ;;
1041 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1042 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
1045 -program-transform-name | --program-transform-name \
1046 | --program-transform-nam | --program-transform-na \
1047 | --program-transform-n | --program-transform- \
1048 | --program-transform | --program-transfor \
1049 | --program-transfo | --program-transf \
1050 | --program-trans | --program-tran \
1051 | --progr-tra | --program-tr | --program-t)
1052 ac_prev=program_transform_name ;;
1053 -program-transform-name=* | --program-transform-name=* \
1054 | --program-transform-nam=* | --program-transform-na=* \
1055 | --program-transform-n=* | --program-transform-=* \
1056 | --program-transform=* | --program-transfor=* \
1057 | --program-transfo=* | --program-transf=* \
1058 | --program-trans=* | --program-tran=* \
1059 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1063 ac_prev=pdfdir ;;
1064 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1065 pdfdir=$ac_optarg ;;
1066
1067 -psdir | --psdir | --psdi | --psd | --ps)
1068 ac_prev=psdir ;;
1069 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1070 psdir=$ac_optarg ;;
1071
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1073 | -silent | --silent | --silen | --sile | --sil)
1074 silent=yes ;;
1075
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1077 ac_prev=sbindir ;;
1078 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1079 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
1082 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1083 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1084 | --sharedst | --shareds | --shared | --share | --shar \
1085 | --sha | --sh)
1086 ac_prev=sharedstatedir ;;
1087 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1088 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1089 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1090 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093 -site | --site | --sit)
1094 ac_prev=site ;;
1095 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1099 ac_prev=srcdir ;;
1100 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1104 | --syscon | --sysco | --sysc | --sys | --sy)
1105 ac_prev=sysconfdir ;;
1106 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1107 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1116 verbose=yes ;;
1117
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 -version | --version | --versio | --versi | --vers | -V)
1119 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001124 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001125 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 ac_useropt_orig=$ac_useropt
1127 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1128 case $ac_user_opts in
1129 *"
1130"with_$ac_useropt"
1131"*) ;;
1132 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1133 ac_unrecognized_sep=', ';;
1134 esac
1135 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001140 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001141 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001142 ac_useropt_orig=$ac_useropt
1143 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1144 case $ac_user_opts in
1145 *"
1146"with_$ac_useropt"
1147"*) ;;
1148 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1149 ac_unrecognized_sep=', ';;
1150 esac
1151 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153 --x)
1154 # Obsolete; use --with-x.
1155 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
1157 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1158 | --x-incl | --x-inc | --x-in | --x-i)
1159 ac_prev=x_includes ;;
1160 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1161 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
1164 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1165 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1166 ac_prev=x_libraries ;;
1167 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1168 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001171 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1172Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 ;;
1174
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 *=*)
1176 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1177 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001178 case $ac_envvar in #(
1179 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001180 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001182 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 export $ac_envvar ;;
1184
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Gregory P. Smith69140482012-01-16 02:05:55 -08001190 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 ;;
1192
1193 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001194done
1195
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001198 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199fi
1200
Matthias Kloseb9621712010-04-24 17:59:49 +00001201if test -n "$ac_unrecognized_opts"; then
1202 case $enable_option_checking in
1203 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001204 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1206 esac
1207fi
1208
1209# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001210for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1211 datadir sysconfdir sharedstatedir localstatedir includedir \
1212 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1213 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 # Remove trailing slashes.
1217 case $ac_val in
1218 */ )
1219 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1220 eval $ac_var=\$ac_val;;
1221 esac
1222 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 [\\/$]* | ?:[\\/]* ) continue;;
1225 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001227 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001228done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001229
Martin v. Löwis11437992002-04-12 09:54:03 +00001230# There might be people who depend on the old broken behavior: `$host'
1231# used to hold the argument of --host etc.
1232# FIXME: To remove some day.
1233build=$build_alias
1234host=$host_alias
1235target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236
Martin v. Löwis11437992002-04-12 09:54:03 +00001237# FIXME: To remove some day.
1238if test "x$host_alias" != x; then
1239 if test "x$build_alias" = x; then
1240 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001241 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1242 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 elif test "x$build_alias" != "x$host_alias"; then
1244 cross_compiling=yes
1245 fi
1246fi
1247
1248ac_tool_prefix=
1249test -n "$host_alias" && ac_tool_prefix=$host_alias-
1250
1251test "$silent" = yes && exec 6>/dev/null
1252
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254ac_pwd=`pwd` && test -n "$ac_pwd" &&
1255ac_ls_di=`ls -di .` &&
1256ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001257 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001259 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260
1261
Guido van Rossum627b2d71993-12-24 10:39:16 +00001262# Find the source files, if location was not specified.
1263if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 ac_confdir=`$as_dirname -- "$as_myself" ||
1267$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1268 X"$as_myself" : 'X\(//\)[^/]' \| \
1269 X"$as_myself" : 'X\(//\)$' \| \
1270 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1271$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)[^/].*/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\/\)$/{
1281 s//\1/
1282 q
1283 }
1284 /^X\(\/\).*/{
1285 s//\1/
1286 q
1287 }
1288 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001289 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291 srcdir=..
1292 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293else
1294 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296if test ! -r "$srcdir/$ac_unique_file"; then
1297 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001298 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1301ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001302 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 pwd)`
1304# When building in place, set srcdir=.
1305if test "$ac_abs_confdir" = "$ac_pwd"; then
1306 srcdir=.
1307fi
1308# Remove unnecessary trailing slashes from srcdir.
1309# Double slashes in file names in object file debugging info
1310# mess up M-x gdb in Emacs.
1311case $srcdir in
1312*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1313esac
1314for ac_var in $ac_precious_vars; do
1315 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1316 eval ac_env_${ac_var}_value=\$${ac_var}
1317 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1318 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1319done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321#
1322# Report the --help message.
1323#
1324if test "$ac_init_help" = "long"; then
1325 # Omit some internal or obsolete options to make the list less imposing.
1326 # This message is too long to be a string in the A/UX 3.1 sh.
1327 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001328\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Usage: $0 [OPTION]... [VAR=VALUE]...
1331
1332To assign environment variables (e.g., CC, CFLAGS...), specify them as
1333VAR=VALUE. See below for descriptions of some of the useful variables.
1334
1335Defaults for the options are specified in brackets.
1336
1337Configuration:
1338 -h, --help display this help and exit
1339 --help=short display options specific to this package
1340 --help=recursive display the short help of all the included packages
1341 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001342 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001343 --cache-file=FILE cache test results in FILE [disabled]
1344 -C, --config-cache alias for \`--cache-file=config.cache'
1345 -n, --no-create do not create output files
1346 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1347
Martin v. Löwis11437992002-04-12 09:54:03 +00001348Installation directories:
1349 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001351 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001352 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001353
1354By default, \`make install' will install all the files in
1355\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1356an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1357for instance \`--prefix=\$HOME'.
1358
1359For better control, use the options below.
1360
1361Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001362 --bindir=DIR user executables [EPREFIX/bin]
1363 --sbindir=DIR system admin executables [EPREFIX/sbin]
1364 --libexecdir=DIR program executables [EPREFIX/libexec]
1365 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1366 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1367 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1368 --libdir=DIR object code libraries [EPREFIX/lib]
1369 --includedir=DIR C header files [PREFIX/include]
1370 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1371 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1372 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1373 --infodir=DIR info documentation [DATAROOTDIR/info]
1374 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1375 --mandir=DIR man documentation [DATAROOTDIR/man]
1376 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1377 --htmldir=DIR html documentation [DOCDIR]
1378 --dvidir=DIR dvi documentation [DOCDIR]
1379 --pdfdir=DIR pdf documentation [DOCDIR]
1380 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
1382
1383 cat <<\_ACEOF
1384_ACEOF
1385fi
1386
1387if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001388 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001389 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001390 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 cat <<\_ACEOF
1392
1393Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001394 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1396 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001397 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001398 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --enable-framework[=INSTALLDIR]
1400 Build (MacOSX|Darwin) framework
1401 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001402 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001403 --enable-loadable-sqlite-extensions
1404 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001405 --enable-ipv6 Enable ipv6 (with ipv4) support
1406 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001407 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001408 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410Optional Packages:
1411 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1412 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001413 --with-universal-archs=ARCH
1414 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001415 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001416 --with-framework-name=FRAMEWORK
1417 specify an alternate name of the framework built
1418 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001420 --with-cxx-main=<compiler>
1421 compile main() and link python executable with C++
1422 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with-suffix=.exe set executable suffix
1424 --with-pydebug build with Py_DEBUG defined
1425 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001426 --with-system-expat build pyexpat module using an installed expat
1427 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001428 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001429 --with-dbmliborder=db1:db2:...
1430 order to check db backends for dbm. Valid value is a
1431 colon separated string with the backend names
1432 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --with-signal-module disable/enable signal module
1434 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1435 --with(out)-threads[=DIRECTORY]
1436 disable/enable thread support
1437 --with(out)-thread[=DIRECTORY]
1438 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001440 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001442 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001443 --with-fpectl enable SIGFPE catching
1444 --with-libm=STRING math library
1445 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001446 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001447 --with(out)-computed-gotos
1448 Use computed gotos in evaluation loop (enabled by
1449 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001450
1451Some influential environment variables:
1452 CC C compiler command
1453 CFLAGS C compiler flags
1454 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1455 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001459 CPP C preprocessor
1460
1461Use these variables to override the choices made by `configure' or to help
1462it to find libraries and programs with nonstandard names/locations.
1463
Georg Brandle2e15612009-05-20 18:25:10 +00001464Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001467fi
1468
1469if test "$ac_init_help" = "recursive"; then
1470 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 test -d "$ac_dir" ||
1473 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1474 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ac_builddir=.
1476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477case "$ac_dir" in
1478.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001480 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 case $ac_top_builddir_sub in
1484 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1485 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1486 esac ;;
1487esac
1488ac_abs_top_builddir=$ac_pwd
1489ac_abs_builddir=$ac_pwd$ac_dir_suffix
1490# for backward compatibility:
1491ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
1493case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001495 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 ac_top_srcdir=$ac_top_builddir_sub
1497 ac_abs_top_srcdir=$ac_pwd ;;
1498 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500 ac_top_srcdir=$srcdir
1501 ac_abs_top_srcdir=$srcdir ;;
1502 *) # Relative name.
1503 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1504 ac_top_srcdir=$ac_top_build_prefix$srcdir
1505 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001506esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 cd "$ac_dir" || { ac_status=$?; continue; }
1510 # Check for guested configure.
1511 if test -f "$ac_srcdir/configure.gnu"; then
1512 echo &&
1513 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1514 elif test -f "$ac_srcdir/configure"; then
1515 echo &&
1516 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001517 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001518 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 fi || ac_status=$?
1520 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001521 done
1522fi
1523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001525if $ac_init_version; then
1526 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001527python configure 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -08001528generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001530Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001531This configure script is free software; the Free Software Foundation
1532gives unlimited permission to copy, distribute and modify it.
1533_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001536
1537## ------------------------ ##
1538## Autoconf initialization. ##
1539## ------------------------ ##
1540
1541# ac_fn_c_try_compile LINENO
1542# --------------------------
1543# Try to compile conftest.$ac_ext, and return whether this succeeded.
1544ac_fn_c_try_compile ()
1545{
1546 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1547 rm -f conftest.$ac_objext
1548 if { { ac_try="$ac_compile"
1549case "(($ac_try" in
1550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1551 *) ac_try_echo=$ac_try;;
1552esac
1553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1554$as_echo "$ac_try_echo"; } >&5
1555 (eval "$ac_compile") 2>conftest.err
1556 ac_status=$?
1557 if test -s conftest.err; then
1558 grep -v '^ *+' conftest.err >conftest.er1
1559 cat conftest.er1 >&5
1560 mv -f conftest.er1 conftest.err
1561 fi
1562 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1563 test $ac_status = 0; } && {
1564 test -z "$ac_c_werror_flag" ||
1565 test ! -s conftest.err
1566 } && test -s conftest.$ac_objext; then :
1567 ac_retval=0
1568else
1569 $as_echo "$as_me: failed program was:" >&5
1570sed 's/^/| /' conftest.$ac_ext >&5
1571
1572 ac_retval=1
1573fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001574 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001575 as_fn_set_status $ac_retval
1576
1577} # ac_fn_c_try_compile
1578
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001579# ac_fn_c_try_link LINENO
1580# -----------------------
1581# Try to link conftest.$ac_ext, and return whether this succeeded.
1582ac_fn_c_try_link ()
1583{
1584 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1585 rm -f conftest.$ac_objext conftest$ac_exeext
1586 if { { ac_try="$ac_link"
1587case "(($ac_try" in
1588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1589 *) ac_try_echo=$ac_try;;
1590esac
1591eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1592$as_echo "$ac_try_echo"; } >&5
1593 (eval "$ac_link") 2>conftest.err
1594 ac_status=$?
1595 if test -s conftest.err; then
1596 grep -v '^ *+' conftest.err >conftest.er1
1597 cat conftest.er1 >&5
1598 mv -f conftest.er1 conftest.err
1599 fi
1600 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1601 test $ac_status = 0; } && {
1602 test -z "$ac_c_werror_flag" ||
1603 test ! -s conftest.err
1604 } && test -s conftest$ac_exeext && {
1605 test "$cross_compiling" = yes ||
1606 $as_test_x conftest$ac_exeext
1607 }; then :
1608 ac_retval=0
1609else
1610 $as_echo "$as_me: failed program was:" >&5
1611sed 's/^/| /' conftest.$ac_ext >&5
1612
1613 ac_retval=1
1614fi
1615 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1616 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1617 # interfere with the next link command; also delete a directory that is
1618 # left behind by Apple's compiler. We do this before executing the actions.
1619 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001620 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001621 as_fn_set_status $ac_retval
1622
1623} # ac_fn_c_try_link
1624
Matthias Kloseb9621712010-04-24 17:59:49 +00001625# ac_fn_c_try_cpp LINENO
1626# ----------------------
1627# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1628ac_fn_c_try_cpp ()
1629{
1630 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1631 if { { ac_try="$ac_cpp conftest.$ac_ext"
1632case "(($ac_try" in
1633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1634 *) ac_try_echo=$ac_try;;
1635esac
1636eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1637$as_echo "$ac_try_echo"; } >&5
1638 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1639 ac_status=$?
1640 if test -s conftest.err; then
1641 grep -v '^ *+' conftest.err >conftest.er1
1642 cat conftest.er1 >&5
1643 mv -f conftest.er1 conftest.err
1644 fi
1645 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001646 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001647 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1648 test ! -s conftest.err
1649 }; then :
1650 ac_retval=0
1651else
1652 $as_echo "$as_me: failed program was:" >&5
1653sed 's/^/| /' conftest.$ac_ext >&5
1654
1655 ac_retval=1
1656fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001657 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 as_fn_set_status $ac_retval
1659
1660} # ac_fn_c_try_cpp
1661
1662# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1663# -------------------------------------------------------
1664# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1665# the include files in INCLUDES and setting the cache variable VAR
1666# accordingly.
1667ac_fn_c_check_header_mongrel ()
1668{
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith69140482012-01-16 02:05:55 -08001670 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1672$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001673if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 $as_echo_n "(cached) " >&6
1675fi
1676eval ac_res=\$$3
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1678$as_echo "$ac_res" >&6; }
1679else
1680 # Is the header compilable?
1681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1682$as_echo_n "checking $2 usability... " >&6; }
1683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1684/* end confdefs.h. */
1685$4
1686#include <$2>
1687_ACEOF
1688if ac_fn_c_try_compile "$LINENO"; then :
1689 ac_header_compiler=yes
1690else
1691 ac_header_compiler=no
1692fi
1693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1695$as_echo "$ac_header_compiler" >&6; }
1696
1697# Is the header present?
1698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1699$as_echo_n "checking $2 presence... " >&6; }
1700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1701/* end confdefs.h. */
1702#include <$2>
1703_ACEOF
1704if ac_fn_c_try_cpp "$LINENO"; then :
1705 ac_header_preproc=yes
1706else
1707 ac_header_preproc=no
1708fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001709rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1711$as_echo "$ac_header_preproc" >&6; }
1712
1713# So? What about this header?
1714case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1715 yes:no: )
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1717$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1719$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1720 ;;
1721 no:yes:* )
1722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1723$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1725$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1727$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1729$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1731$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001732( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001733## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001734## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001735 ) | sed "s/^/$as_me: WARNING: /" >&2
1736 ;;
1737esac
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1739$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001740if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 $as_echo_n "(cached) " >&6
1742else
1743 eval "$3=\$ac_header_compiler"
1744fi
1745eval ac_res=\$$3
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1747$as_echo "$ac_res" >&6; }
1748fi
Gregory P. Smith69140482012-01-16 02:05:55 -08001749 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001750
1751} # ac_fn_c_check_header_mongrel
1752
1753# ac_fn_c_try_run LINENO
1754# ----------------------
1755# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1756# that executables *can* be run.
1757ac_fn_c_try_run ()
1758{
1759 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1760 if { { ac_try="$ac_link"
1761case "(($ac_try" in
1762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1763 *) ac_try_echo=$ac_try;;
1764esac
1765eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1766$as_echo "$ac_try_echo"; } >&5
1767 (eval "$ac_link") 2>&5
1768 ac_status=$?
1769 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1770 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1771 { { case "(($ac_try" in
1772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1773 *) ac_try_echo=$ac_try;;
1774esac
1775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1776$as_echo "$ac_try_echo"; } >&5
1777 (eval "$ac_try") 2>&5
1778 ac_status=$?
1779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1780 test $ac_status = 0; }; }; then :
1781 ac_retval=0
1782else
1783 $as_echo "$as_me: program exited with status $ac_status" >&5
1784 $as_echo "$as_me: failed program was:" >&5
1785sed 's/^/| /' conftest.$ac_ext >&5
1786
1787 ac_retval=$ac_status
1788fi
1789 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Gregory P. Smith69140482012-01-16 02:05:55 -08001790 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001791 as_fn_set_status $ac_retval
1792
1793} # ac_fn_c_try_run
1794
1795# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1796# -------------------------------------------------------
1797# Tests whether HEADER exists and can be compiled using the include files in
1798# INCLUDES, setting the cache variable VAR accordingly.
1799ac_fn_c_check_header_compile ()
1800{
1801 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1803$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001804if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001805 $as_echo_n "(cached) " >&6
1806else
1807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809$4
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_compile "$LINENO"; then :
1813 eval "$3=yes"
1814else
1815 eval "$3=no"
1816fi
1817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1818fi
1819eval ac_res=\$$3
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1821$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001822 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001823
1824} # ac_fn_c_check_header_compile
1825
Matthias Kloseb9621712010-04-24 17:59:49 +00001826# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1827# -------------------------------------------
1828# Tests whether TYPE exists after having included INCLUDES, setting cache
1829# variable VAR accordingly.
1830ac_fn_c_check_type ()
1831{
1832 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1834$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001835if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001836 $as_echo_n "(cached) " >&6
1837else
1838 eval "$3=no"
1839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1840/* end confdefs.h. */
1841$4
1842int
1843main ()
1844{
1845if (sizeof ($2))
1846 return 0;
1847 ;
1848 return 0;
1849}
1850_ACEOF
1851if ac_fn_c_try_compile "$LINENO"; then :
1852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853/* end confdefs.h. */
1854$4
1855int
1856main ()
1857{
1858if (sizeof (($2)))
1859 return 0;
1860 ;
1861 return 0;
1862}
1863_ACEOF
1864if ac_fn_c_try_compile "$LINENO"; then :
1865
1866else
1867 eval "$3=yes"
1868fi
1869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1870fi
1871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1872fi
1873eval ac_res=\$$3
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1875$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001877
1878} # ac_fn_c_check_type
1879
1880# ac_fn_c_find_uintX_t LINENO BITS VAR
1881# ------------------------------------
1882# Finds an unsigned integer type with width BITS, setting cache variable VAR
1883# accordingly.
1884ac_fn_c_find_uintX_t ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1888$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001889if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 $as_echo_n "(cached) " >&6
1891else
1892 eval "$3=no"
1893 # Order is important - never check a type that is potentially smaller
1894 # than half of the expected target width.
1895 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1896 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1898/* end confdefs.h. */
1899$ac_includes_default
1900int
1901main ()
1902{
1903static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1904test_array [0] = 0
1905
1906 ;
1907 return 0;
1908}
1909_ACEOF
1910if ac_fn_c_try_compile "$LINENO"; then :
1911 case $ac_type in #(
1912 uint$2_t) :
1913 eval "$3=yes" ;; #(
1914 *) :
1915 eval "$3=\$ac_type" ;;
1916esac
1917fi
1918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001919 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921else
1922 break
1923fi
1924 done
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_find_uintX_t
1932
1933# ac_fn_c_find_intX_t LINENO BITS VAR
1934# -----------------------------------
1935# Finds a signed integer type with width BITS, setting cache variable VAR
1936# accordingly.
1937ac_fn_c_find_intX_t ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1941$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 # Order is important - never check a type that is potentially smaller
1947 # than half of the expected target width.
1948 for ac_type in int$2_t 'int' 'long int' \
1949 'long long int' 'short int' 'signed char'; do
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001953 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001954int
1955main ()
1956{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001957static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001958test_array [0] = 0
1959
1960 ;
1961 return 0;
1962}
1963_ACEOF
1964if ac_fn_c_try_compile "$LINENO"; then :
1965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1966/* end confdefs.h. */
1967$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001968 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001969int
1970main ()
1971{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001972static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001973 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1974test_array [0] = 0
1975
1976 ;
1977 return 0;
1978}
1979_ACEOF
1980if ac_fn_c_try_compile "$LINENO"; then :
1981
1982else
1983 case $ac_type in #(
1984 int$2_t) :
1985 eval "$3=yes" ;; #(
1986 *) :
1987 eval "$3=\$ac_type" ;;
1988esac
1989fi
1990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001993 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001994
1995else
1996 break
1997fi
1998 done
1999fi
2000eval ac_res=\$$3
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002003 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002004
2005} # ac_fn_c_find_intX_t
2006
2007# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2008# --------------------------------------------
2009# Tries to find the compile-time value of EXPR in a program that includes
2010# INCLUDES, setting VAR accordingly. Returns whether the value could be
2011# computed
2012ac_fn_c_compute_int ()
2013{
2014 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015 if test "$cross_compiling" = yes; then
2016 # Depending upon the size, compute the lo and hi bounds.
2017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020int
2021main ()
2022{
2023static int test_array [1 - 2 * !(($2) >= 0)];
2024test_array [0] = 0
2025
2026 ;
2027 return 0;
2028}
2029_ACEOF
2030if ac_fn_c_try_compile "$LINENO"; then :
2031 ac_lo=0 ac_mid=0
2032 while :; do
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main ()
2038{
2039static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2040test_array [0] = 0
2041
2042 ;
2043 return 0;
2044}
2045_ACEOF
2046if ac_fn_c_try_compile "$LINENO"; then :
2047 ac_hi=$ac_mid; break
2048else
2049 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2050 if test $ac_lo -le $ac_mid; then
2051 ac_lo= ac_hi=
2052 break
2053 fi
2054 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2055fi
2056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2057 done
2058else
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) < 0)];
2066test_array [0] = 0
2067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_hi=-1 ac_mid=-1
2074 while :; do
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2082test_array [0] = 0
2083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_lo=$ac_mid; break
2090else
2091 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2092 if test $ac_mid -le $ac_hi; then
2093 ac_lo= ac_hi=
2094 break
2095 fi
2096 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099 done
2100else
2101 ac_lo= ac_hi=
2102fi
2103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106# Binary search between lo and hi bounds.
2107while test "x$ac_lo" != "x$ac_hi"; do
2108 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2116test_array [0] = 0
2117
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_hi=$ac_mid
2124else
2125 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2126fi
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128done
2129case $ac_lo in #((
2130?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2131'') ac_retval=1 ;;
2132esac
2133 else
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137static long int longval () { return $2; }
2138static unsigned long int ulongval () { return $2; }
2139#include <stdio.h>
2140#include <stdlib.h>
2141int
2142main ()
2143{
2144
2145 FILE *f = fopen ("conftest.val", "w");
2146 if (! f)
2147 return 1;
2148 if (($2) < 0)
2149 {
2150 long int i = longval ();
2151 if (i != ($2))
2152 return 1;
2153 fprintf (f, "%ld", i);
2154 }
2155 else
2156 {
2157 unsigned long int i = ulongval ();
2158 if (i != ($2))
2159 return 1;
2160 fprintf (f, "%lu", i);
2161 }
2162 /* Do not output a trailing newline, as this causes \r\n confusion
2163 on some platforms. */
2164 return ferror (f) || fclose (f) != 0;
2165
2166 ;
2167 return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_run "$LINENO"; then :
2171 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2172else
2173 ac_retval=1
2174fi
2175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2176 conftest.$ac_objext conftest.beam conftest.$ac_ext
2177rm -f conftest.val
2178
2179 fi
Gregory P. Smith69140482012-01-16 02:05:55 -08002180 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 as_fn_set_status $ac_retval
2182
2183} # ac_fn_c_compute_int
2184
2185# ac_fn_c_check_func LINENO FUNC VAR
2186# ----------------------------------
2187# Tests whether FUNC exists, setting the cache variable VAR accordingly
2188ac_fn_c_check_func ()
2189{
2190 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2192$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002193if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002194 $as_echo_n "(cached) " >&6
2195else
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h. */
2198/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2199 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2200#define $2 innocuous_$2
2201
2202/* System header to define __stub macros and hopefully few prototypes,
2203 which can conflict with char $2 (); below.
2204 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2205 <limits.h> exists even on freestanding compilers. */
2206
2207#ifdef __STDC__
2208# include <limits.h>
2209#else
2210# include <assert.h>
2211#endif
2212
2213#undef $2
2214
2215/* Override any GCC internal prototype to avoid an error.
2216 Use char because int might match the return type of a GCC
2217 builtin and then its argument prototype would still apply. */
2218#ifdef __cplusplus
2219extern "C"
2220#endif
2221char $2 ();
2222/* The GNU C library defines this for functions which it implements
2223 to always fail with ENOSYS. Some functions are actually named
2224 something starting with __ and the normal name is an alias. */
2225#if defined __stub_$2 || defined __stub___$2
2226choke me
2227#endif
2228
2229int
2230main ()
2231{
2232return $2 ();
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_link "$LINENO"; then :
2238 eval "$3=yes"
2239else
2240 eval "$3=no"
2241fi
2242rm -f core conftest.err conftest.$ac_objext \
2243 conftest$ac_exeext conftest.$ac_ext
2244fi
2245eval ac_res=\$$3
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2247$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002248 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002249
2250} # ac_fn_c_check_func
2251
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002252# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2253# ---------------------------------------------
2254# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2255# accordingly.
2256ac_fn_c_check_decl ()
2257{
2258 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259 as_decl_name=`echo $2|sed 's/ *(.*//'`
2260 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2262$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2263if eval \${$3+:} false; then :
2264 $as_echo_n "(cached) " >&6
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$4
2269int
2270main ()
2271{
2272#ifndef $as_decl_name
2273#ifdef __cplusplus
2274 (void) $as_decl_use;
2275#else
2276 (void) $as_decl_name;
2277#endif
2278#endif
2279
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"; then :
2285 eval "$3=yes"
2286else
2287 eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291eval ac_res=\$$3
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293$as_echo "$ac_res" >&6; }
2294 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2295
2296} # ac_fn_c_check_decl
2297
Matthias Kloseb9621712010-04-24 17:59:49 +00002298# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2299# ----------------------------------------------------
2300# Tries to find if the field MEMBER exists in type AGGR, after including
2301# INCLUDES, setting cache variable VAR accordingly.
2302ac_fn_c_check_member ()
2303{
2304 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2306$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002307if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002308 $as_echo_n "(cached) " >&6
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$5
2313int
2314main ()
2315{
2316static $2 ac_aggr;
2317if (ac_aggr.$3)
2318return 0;
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$4=yes"
2325else
2326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h. */
2328$5
2329int
2330main ()
2331{
2332static $2 ac_aggr;
2333if (sizeof ac_aggr.$3)
2334return 0;
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_compile "$LINENO"; then :
2340 eval "$4=yes"
2341else
2342 eval "$4=no"
2343fi
2344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347fi
2348eval ac_res=\$$4
2349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350$as_echo "$ac_res" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08002351 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002352
2353} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002354cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002355This file contains any messages produced by compilers while
2356running configure, to aid debugging if configure makes a mistake.
2357
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002358It was created by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -08002359generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002360
2361 $ $0 $@
2362
2363_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002364exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002365{
2366cat <<_ASUNAME
2367## --------- ##
2368## Platform. ##
2369## --------- ##
2370
2371hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2372uname -m = `(uname -m) 2>/dev/null || echo unknown`
2373uname -r = `(uname -r) 2>/dev/null || echo unknown`
2374uname -s = `(uname -s) 2>/dev/null || echo unknown`
2375uname -v = `(uname -v) 2>/dev/null || echo unknown`
2376
2377/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2378/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2379
2380/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2381/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2382/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002384/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2385/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2386/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2387
2388_ASUNAME
2389
2390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2391for as_dir in $PATH
2392do
2393 IFS=$as_save_IFS
2394 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002395 $as_echo "PATH: $as_dir"
2396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002398
2399} >&5
2400
2401cat >&5 <<_ACEOF
2402
2403
2404## ----------- ##
2405## Core tests. ##
2406## ----------- ##
2407
2408_ACEOF
2409
2410
2411# Keep a trace of the command line.
2412# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002414# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002415# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002416ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002417ac_configure_args0=
2418ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002419ac_must_keep_next=false
2420for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002421do
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 for ac_arg
2423 do
2424 case $ac_arg in
2425 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2426 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2427 | -silent | --silent | --silen | --sile | --sil)
2428 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 esac
2432 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002437 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002439 case $ac_arg in
2440 *=* | --config-cache | -C | -disable-* | --disable-* \
2441 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2442 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2443 | -with-* | --with-* | -without-* | --without-* | --x)
2444 case "$ac_configure_args0 " in
2445 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2446 esac
2447 ;;
2448 -* ) ac_must_keep_next=true ;;
2449 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 ;;
2453 esac
2454 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002455done
Matthias Kloseb9621712010-04-24 17:59:49 +00002456{ ac_configure_args0=; unset ac_configure_args0;}
2457{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002458
2459# When interrupted or exit'd, cleanup temporary files, and complete
2460# config.log. We remove comments because anyway the quotes in there
2461# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462# WARNING: Use '\'' to represent an apostrophe within the trap.
2463# 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 +00002464trap 'exit_status=$?
2465 # Save into config.log some information that might help in debugging.
2466 {
2467 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002468
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002469 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002470## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002471## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 echo
2473 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474(
2475 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2476 eval ac_val=\$$ac_var
2477 case $ac_val in #(
2478 *${as_nl}*)
2479 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2481$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac
2483 case $ac_var in #(
2484 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002485 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2486 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 esac ;;
2488 esac
2489 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2492 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 "s/'\''/'\''\\\\'\'''\''/g;
2495 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2496 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002497 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002499 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac |
2501 sort
2502)
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002504
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002505 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002506## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002507## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_vars
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518
2519 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002520 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002522## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 echo
2524 for ac_var in $ac_subst_files
2525 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 eval ac_val=\$$ac_var
2527 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 done | sort
2532 echo
2533 fi
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002536 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002537## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002538## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 echo
2542 fi
2543 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 $as_echo "$as_me: caught signal $ac_signal"
2545 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 rm -f core *.core core.conftest.* &&
2548 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002551for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002552 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002553done
2554ac_signal=0
2555
2556# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002558
Matthias Kloseb9621712010-04-24 17:59:49 +00002559$as_echo "/* confdefs.h */" > confdefs.h
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561# Predefined preprocessor variables.
2562
2563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_NAME "$PACKAGE_NAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_VERSION "$PACKAGE_VERSION"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_STRING "$PACKAGE_STRING"
2577_ACEOF
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2581_ACEOF
2582
Matthias Kloseb9621712010-04-24 17:59:49 +00002583cat >>confdefs.h <<_ACEOF
2584#define PACKAGE_URL "$PACKAGE_URL"
2585_ACEOF
2586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587
2588# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002589# Prefer an explicitly selected file to automatically selected ones.
2590ac_site_file1=NONE
2591ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002593 # We do not want a PATH search for config.site.
2594 case $CONFIG_SITE in #((
2595 -*) ac_site_file1=./$CONFIG_SITE;;
2596 */*) ac_site_file1=$CONFIG_SITE;;
2597 *) ac_site_file1=./$CONFIG_SITE;;
2598 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 ac_site_file1=$prefix/share/config.site
2601 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602else
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 ac_site_file1=$ac_default_prefix/share/config.site
2604 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002606for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607do
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 test "x$ac_site_file" = xNONE && continue
2609 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2611$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002613 . "$ac_site_file" \
2614 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2616as_fn_error $? "failed to load site script $ac_site_file
Gregory P. Smith69140482012-01-16 02:05:55 -08002617See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618 fi
2619done
2620
2621if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 # Some versions of bash will fail to source /dev/null (special files
2623 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2624 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2626$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2629 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 esac
2631 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632else
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2634$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 >$cache_file
2636fi
2637
2638# Check that the precious variables saved in the cache have kept the same
2639# value.
2640ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2643 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2645 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 case $ac_old_set,$ac_new_set in
2647 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2649$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 +00002650 ac_cache_corrupted=: ;;
2651 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2653$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 ac_cache_corrupted=: ;;
2655 ,);;
2656 *)
2657 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 # differences in whitespace do not lead to failure.
2659 ac_old_val_w=`echo x $ac_old_val`
2660 ac_new_val_w=`echo x $ac_new_val`
2661 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2663$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2664 ac_cache_corrupted=:
2665 else
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2667$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2668 eval $ac_var=\$ac_old_val
2669 fi
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2671$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2673$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 fi;;
2675 esac
2676 # Pass precious variables to config.status.
2677 if test "$ac_new_set" = set; then
2678 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 *) ac_arg=$ac_var=$ac_new_val ;;
2681 esac
2682 case " $ac_configure_args " in
2683 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 esac
2686 fi
2687done
2688if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2692$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002693 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002695## -------------------- ##
2696## Main body of script. ##
2697## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698
Guido van Rossum7f43da71994-08-01 12:15:30 +00002699ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002701ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2702ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2703ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002704
Guido van Rossum627b2d71993-12-24 10:39:16 +00002705
Michael W. Hudson54241132001-12-07 15:38:26 +00002706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002708
2709
Martin v. Löwis11437992002-04-12 09:54:03 +00002710
Benjamin Petersond23f8222009-04-05 19:13:16 +00002711if test "$prefix" != "/"; then
2712 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2713fi
2714
2715
Martin v. Löwis11437992002-04-12 09:54:03 +00002716
2717
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002718# We don't use PACKAGE_ variables, and they cause conflicts
2719# with other autoconf-based packages that include Python.h
2720grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2721rm confdefs.h
2722mv confdefs.h.new confdefs.h
2723
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002724
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002725VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002726
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002727# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002728
2729SOVERSION=1.0
2730
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002731# The later defininition of _XOPEN_SOURCE disables certain features
2732# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002735
2736
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2739# them.
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002742
2743
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002744# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2745# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2746# them.
2747
Matthias Kloseb9621712010-04-24 17:59:49 +00002748$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002749
2750
Martin v. Löwisd6320502004-08-12 13:45:08 +00002751# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2752# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2753
Matthias Kloseb9621712010-04-24 17:59:49 +00002754$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002755
2756
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002757# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2758# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2759# them.
2760
Matthias Kloseb9621712010-04-24 17:59:49 +00002761$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002762
2763
2764
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002765define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002766
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002767# Arguments passed to configure.
2768
2769CONFIG_ARGS="$ac_configure_args"
2770
Matthias Kloseb9621712010-04-24 17:59:49 +00002771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2772$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002774if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776 case $enableval in
2777 yes)
2778 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002779 if test ! -d "${enableval}"
2780 then
2781 enableval=/
2782 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002783 ;;
2784 esac
2785 case $enableval in
2786 no)
2787 UNIVERSALSDK=
2788 enable_universalsdk=
2789 ;;
2790 *)
2791 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002792 if test ! -d "${UNIVERSALSDK}"
2793 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002794 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002795 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002796 ;;
2797 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002798
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002799
Thomas Wouters477c8d52006-05-27 19:21:47 +00002800else
2801
2802 UNIVERSALSDK=
2803 enable_universalsdk=
2804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002805fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002806
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002807if test -n "${UNIVERSALSDK}"
2808then
Matthias Kloseb9621712010-04-24 17:59:49 +00002809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2810$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002811else
Matthias Kloseb9621712010-04-24 17:59:49 +00002812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2813$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002814fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002816
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002817
2818
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002819UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002820
Matthias Kloseb9621712010-04-24 17:59:49 +00002821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2822$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002823
2824# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002825if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002826 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2828$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002829 UNIVERSAL_ARCHS="$withval"
2830
2831else
2832
Matthias Kloseb9621712010-04-24 17:59:49 +00002833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2834$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002835
2836fi
2837
2838
2839
2840
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002841
2842# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002843if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002844 withval=$with_framework_name;
2845 PYTHONFRAMEWORK=${withval}
2846 PYTHONFRAMEWORKDIR=${withval}.framework
2847 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2848
2849else
2850
2851 PYTHONFRAMEWORK=Python
2852 PYTHONFRAMEWORKDIR=Python.framework
2853 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2854
2855fi
2856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002857# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002858if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002860 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002861 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002862 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002863 esac
2864 case $enableval in
2865 no)
2866 PYTHONFRAMEWORK=
2867 PYTHONFRAMEWORKDIR=no-framework
2868 PYTHONFRAMEWORKPREFIX=
2869 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002870 FRAMEWORKINSTALLFIRST=
2871 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002872 FRAMEWORKALTINSTALLFIRST=
2873 FRAMEWORKALTINSTALLLAST=
2874 if test "x${prefix}" = "xNONE"; then
2875 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2876 else
2877 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2878 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002879 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002880 ;;
2881 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002882 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002883 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002884 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002885 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002886 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2887 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002888 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002889
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002890 if test "x${prefix}" = "xNONE" ; then
2891 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002892
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002893 else
2894 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2895 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002896
2897 case "${enableval}" in
2898 /System*)
2899 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2900 if test "${prefix}" = "NONE" ; then
2901 # See below
2902 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2903 fi
2904 ;;
2905
2906 /Library*)
2907 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2908 ;;
2909
2910 */Library/Frameworks)
2911 MDIR="`dirname "${enableval}"`"
2912 MDIR="`dirname "${MDIR}"`"
2913 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2914
2915 if test "${prefix}" = "NONE"; then
2916 # User hasn't specified the
2917 # --prefix option, but wants to install
2918 # the framework in a non-default location,
2919 # ensure that the compatibility links get
2920 # installed relative to that prefix as well
2921 # instead of in /usr/local.
2922 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2923 fi
2924 ;;
2925
2926 *)
2927 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2928 ;;
2929 esac
2930
Jack Jansen127e56e2001-09-11 14:41:54 +00002931 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002932
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002933 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002934 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002935 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002937 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002939 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2940
2941 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2942
Jack Jansene578a632001-08-15 01:27:14 +00002943 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Guido van Rossum563e7081996-09-10 18:20:48 +00002945else
Martin v. Löwis11437992002-04-12 09:54:03 +00002946
Jack Jansene578a632001-08-15 01:27:14 +00002947 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002948 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002949 PYTHONFRAMEWORKPREFIX=
2950 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002951 FRAMEWORKINSTALLFIRST=
2952 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002953 FRAMEWORKALTINSTALLFIRST=
2954 FRAMEWORKALTINSTALLLAST=
2955 if test "x${prefix}" = "xNONE" ; then
2956 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2957 else
2958 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2959 fi
Jack Jansene578a632001-08-15 01:27:14 +00002960 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002961
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002963fi
2964
Thomas Wouters477c8d52006-05-27 19:21:47 +00002965
2966
Michael W. Hudson54241132001-12-07 15:38:26 +00002967
2968
2969
2970
Jack Jansene578a632001-08-15 01:27:14 +00002971
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002972
2973
2974
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002975
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002976
Jack Jansene578a632001-08-15 01:27:14 +00002977##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002978## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002979## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002980##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002981# Set name for machine-dependent library files
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2984$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985if test -z "$MACHDEP"
2986then
Guido van Rossum563e7081996-09-10 18:20:48 +00002987 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002988 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002989 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002990 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002991 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002992 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002993 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002994 ac_md_system=`echo $ac_sys_system |
2995 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2996 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002997 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002998 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002999
Guido van Rossum07397971997-04-29 21:49:50 +00003000 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02003001 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003002 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003003 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003004 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003005 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003006 esac
3007fi
Guido van Rossum91922671997-10-09 20:24:13 +00003008
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003009# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3010# disable features if it is defined, without any means to access these
3011# features as extensions. For these systems, we skip the definition of
3012# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3013# some feature, make sure there is no alternative way to access this
3014# feature. Also, when using wildcards, make sure you have verified the
3015# need for not defining _XOPEN_SOURCE on all systems matching the
3016# wildcard, and that the wildcard does not include future systems
3017# (which may remove their limitations).
3018case $ac_sys_system/$ac_sys_release in
3019 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3020 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003021 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003022 # In addition, Stefan Krah confirms that issue #1244610 exists through
3023 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003024 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003025 define_xopen_source=no
3026 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3027 # also defined. This can be overridden by defining _BSD_SOURCE
3028 # As this has a different meaning on Linux, only define it on OpenBSD
3029
Matthias Kloseb9621712010-04-24 17:59:49 +00003030$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003031
3032 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003033 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003034 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3035 # also defined. This can be overridden by defining _BSD_SOURCE
3036 # As this has a different meaning on Linux, only define it on OpenBSD
3037
Matthias Kloseb9621712010-04-24 17:59:49 +00003038$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003039
3040 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003041 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3042 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3043 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003044 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 +00003045 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003046 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3047 # request to enable features supported by the standard as a request
3048 # to disable features not supported by the standard. The best way
3049 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3050 # entirely and define __EXTENSIONS__ instead.
3051 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003052 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003053 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3054 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003055 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003056 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003057 define_xopen_source=no;;
3058 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003059 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003060 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003061 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003062 # On FreeBSD 4, the math functions C89 does not cover are never defined
3063 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3064 FreeBSD/4.*)
3065 define_xopen_source=no;;
3066 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3067 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3068 # identifies itself as Darwin/7.*
3069 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3070 # disables platform specific features beyond repair.
3071 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3072 # has no effect, don't bother defining them
3073 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003074 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003075 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003076 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003077 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3078 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3079 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003080 AIX/4)
3081 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003082 AIX/5)
3083 if test `uname -r` -eq 1; then
3084 define_xopen_source=no
3085 fi
3086 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003087 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3088 # defining NI_NUMERICHOST.
3089 QNX/6.3.2)
3090 define_xopen_source=no
3091 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003092
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003093esac
3094
3095if test $define_xopen_source = yes
3096then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003097
Matthias Kloseb9621712010-04-24 17:59:49 +00003098$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003099
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003100
3101 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3102 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3103 # several APIs are not declared. Since this is also needed in some
3104 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003107
3108
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003109
Matthias Kloseb9621712010-04-24 17:59:49 +00003110$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003111
3112
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003113fi
3114
Guido van Rossum91922671997-10-09 20:24:13 +00003115#
3116# SGI compilers allow the specification of the both the ABI and the
3117# ISA on the command line. Depending on the values of these switches,
3118# different and often incompatable code will be generated.
3119#
3120# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3121# thus supply support for various ABI/ISA combinations. The MACHDEP
3122# variable is also adjusted.
3123#
3124
3125if test ! -z "$SGI_ABI"
3126then
3127 CC="cc $SGI_ABI"
3128 LDFLAGS="$SGI_ABI $LDFLAGS"
3129 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3132$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003133
Jack Jansen6b08a402004-06-03 12:41:45 +00003134# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3135# it may influence the way we can build extensions, so distutils
3136# needs to check it
3137
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138
Jack Jansen6b08a402004-06-03 12:41:45 +00003139CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003140EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003141
Matthias Kloseb9621712010-04-24 17:59:49 +00003142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3143$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003144ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3146$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003147
Guido van Rossum627b2d71993-12-24 10:39:16 +00003148# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003149
3150# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3151# for debug/optimization stuff. BASECFLAGS is for flags that are required
3152# just to get things to compile and link. Users are free to override OPT
3153# when running configure or make. The build should not break if they do.
3154# BASECFLAGS should generally not be messed with, however.
3155
3156# XXX shouldn't some/most/all of this code be merged with the stuff later
3157# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3159$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003161# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003162if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003164 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003165 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003166 without_gcc=yes;;
3167 yes) CC=gcc
3168 without_gcc=no;;
3169 *) CC=$withval
3170 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003171 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003172else
Martin v. Löwis11437992002-04-12 09:54:03 +00003173
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003174 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003175 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003176 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003177 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003178 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179fi
3180
Matthias Kloseb9621712010-04-24 17:59:49 +00003181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3182$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003183
Guido van Rossum8b131c51995-03-09 14:10:13 +00003184# If the user switches compilers, we can't believe the cache
3185if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3186then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003187 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003188(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003189fi
3190
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003191# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3192# when the compiler supports them, but we don't always want -O2, and
3193# we set -g later.
3194if test -z "$CFLAGS"; then
3195 CFLAGS=
3196fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003197ac_ext=c
3198ac_cpp='$CPP $CPPFLAGS'
3199ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3200ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3201ac_compiler_gnu=$ac_cv_c_compiler_gnu
3202if test -n "$ac_tool_prefix"; then
3203 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3204set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3206$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003207if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003208 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003209else
3210 if test -n "$CC"; then
3211 ac_cv_prog_CC="$CC" # Let the user override the test.
3212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3214for as_dir in $PATH
3215do
3216 IFS=$as_save_IFS
3217 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003218 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219 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 +00003220 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003221 $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 +00003222 break 2
3223 fi
3224done
Matthias Kloseb9621712010-04-24 17:59:49 +00003225 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003227
Jack Jansendd19cf82001-12-06 22:36:17 +00003228fi
3229fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003230CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003231if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3233$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003234else
Matthias Kloseb9621712010-04-24 17:59:49 +00003235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3236$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003237fi
3238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239
Martin v. Löwis11437992002-04-12 09:54:03 +00003240fi
3241if test -z "$ac_cv_prog_CC"; then
3242 ac_ct_CC=$CC
3243 # Extract the first word of "gcc", so it can be a program name with args.
3244set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3246$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003247if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003248 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003249else
3250 if test -n "$ac_ct_CC"; then
3251 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3252else
3253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3254for as_dir in $PATH
3255do
3256 IFS=$as_save_IFS
3257 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003258 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259 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 +00003260 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003261 $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 +00003262 break 2
3263 fi
3264done
Matthias Kloseb9621712010-04-24 17:59:49 +00003265 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003267
3268fi
3269fi
3270ac_ct_CC=$ac_cv_prog_ac_ct_CC
3271if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3273$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003274else
Matthias Kloseb9621712010-04-24 17:59:49 +00003275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3276$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003277fi
3278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279 if test "x$ac_ct_CC" = x; then
3280 CC=""
3281 else
3282 case $cross_compiling:$ac_tool_warned in
3283yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003284{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3285$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286ac_tool_warned=yes ;;
3287esac
3288 CC=$ac_ct_CC
3289 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003290else
3291 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003292fi
3293
Jack Jansendd19cf82001-12-06 22:36:17 +00003294if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295 if test -n "$ac_tool_prefix"; then
3296 # 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 +00003297set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3299$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003300if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003302else
3303 if test -n "$CC"; then
3304 ac_cv_prog_CC="$CC" # Let the user override the test.
3305else
Martin v. Löwis11437992002-04-12 09:54:03 +00003306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in $PATH
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003313 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 break 2
3316 fi
3317done
Matthias Kloseb9621712010-04-24 17:59:49 +00003318 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003320
3321fi
3322fi
3323CC=$ac_cv_prog_CC
3324if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3326$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
Matthias Kloseb9621712010-04-24 17:59:49 +00003328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3329$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003330fi
3331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332
Martin v. Löwis11437992002-04-12 09:54:03 +00003333 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003334fi
3335if test -z "$CC"; then
3336 # Extract the first word of "cc", so it can be a program name with args.
3337set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3339$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003340if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003342else
3343 if test -n "$CC"; then
3344 ac_cv_prog_CC="$CC" # Let the user override the test.
3345else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003346 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in $PATH
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003352 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003353 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 +00003354 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3355 ac_prog_rejected=yes
3356 continue
3357 fi
3358 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003359 $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 +00003360 break 2
3361 fi
3362done
Matthias Kloseb9621712010-04-24 17:59:49 +00003363 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003364IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003365
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366if test $ac_prog_rejected = yes; then
3367 # We found a bogon in the path, so make sure we never use it.
3368 set dummy $ac_cv_prog_CC
3369 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003371 # We chose a different compiler from the bogus one.
3372 # However, it has the same basename, so the bogon will be chosen
3373 # first if we set CC to just the basename; use the full file name.
3374 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003375 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003376 fi
3377fi
3378fi
3379fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003380CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003381if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3383$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003384else
Matthias Kloseb9621712010-04-24 17:59:49 +00003385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3386$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003387fi
3388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389
Martin v. Löwis11437992002-04-12 09:54:03 +00003390fi
3391if test -z "$CC"; then
3392 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003393 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003394 do
3395 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3396set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3398$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003399if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003400 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003401else
3402 if test -n "$CC"; then
3403 ac_cv_prog_CC="$CC" # Let the user override the test.
3404else
Martin v. Löwis11437992002-04-12 09:54:03 +00003405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3406for as_dir in $PATH
3407do
3408 IFS=$as_save_IFS
3409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003410 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003411 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 +00003412 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003413 $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 +00003414 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003416done
Matthias Kloseb9621712010-04-24 17:59:49 +00003417 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003418IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003419
3420fi
3421fi
3422CC=$ac_cv_prog_CC
3423if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3425$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003426else
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003429fi
3430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003431
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 test -n "$CC" && break
3433 done
3434fi
3435if test -z "$CC"; then
3436 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003438do
3439 # Extract the first word of "$ac_prog", so it can be a program name with args.
3440set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3442$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003443if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003444 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003445else
3446 if test -n "$ac_ct_CC"; then
3447 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3448else
3449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3450for as_dir in $PATH
3451do
3452 IFS=$as_save_IFS
3453 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455 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 +00003456 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003457 $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 +00003458 break 2
3459 fi
3460done
Matthias Kloseb9621712010-04-24 17:59:49 +00003461 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003463
Martin v. Löwis11437992002-04-12 09:54:03 +00003464fi
3465fi
3466ac_ct_CC=$ac_cv_prog_ac_ct_CC
3467if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3469$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470else
Matthias Kloseb9621712010-04-24 17:59:49 +00003471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3472$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003473fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 test -n "$ac_ct_CC" && break
3477done
Michael W. Hudson54241132001-12-07 15:38:26 +00003478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 if test "x$ac_ct_CC" = x; then
3480 CC=""
3481 else
3482 case $cross_compiling:$ac_tool_warned in
3483yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003484{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3485$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486ac_tool_warned=yes ;;
3487esac
3488 CC=$ac_ct_CC
3489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003490fi
3491
3492fi
3493
3494
Matthias Kloseb9621712010-04-24 17:59:49 +00003495test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003497as_fn_error $? "no acceptable C compiler found in \$PATH
Gregory P. Smith69140482012-01-16 02:05:55 -08003498See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003499
3500# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003501$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3502set X $ac_compile
3503ac_compiler=$2
3504for ac_option in --version -v -V -qversion; do
3505 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506case "(($ac_try" in
3507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3508 *) ac_try_echo=$ac_try;;
3509esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003510eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3511$as_echo "$ac_try_echo"; } >&5
3512 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003514 if test -s conftest.err; then
3515 sed '10a\
3516... rest of stderr output deleted ...
3517 10q' conftest.err >conftest.er1
3518 cat conftest.er1 >&5
3519 fi
3520 rm -f conftest.er1 conftest.err
3521 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3522 test $ac_status = 0; }
3523done
Martin v. Löwis11437992002-04-12 09:54:03 +00003524
Matthias Kloseb9621712010-04-24 17:59:49 +00003525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003526/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003527
Martin v. Löwis11437992002-04-12 09:54:03 +00003528int
3529main ()
3530{
3531
3532 ;
3533 return 0;
3534}
3535_ACEOF
3536ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003537ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003538# Try to create an executable without -o first, disregard a.out.
3539# It will help us diagnose broken compilers, and finding out an intuition
3540# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3542$as_echo_n "checking whether the C compiler works... " >&6; }
3543ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3544
3545# The possible output files:
3546ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548ac_rmfiles=
3549for ac_file in $ac_files
3550do
3551 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3554 esac
3555done
3556rm -f $ac_rmfiles
3557
Matthias Kloseb9621712010-04-24 17:59:49 +00003558if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003563eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3564$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3568 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3570# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3571# in a Makefile. We should not override ac_cv_exeext if it was cached,
3572# so that the user can short-circuit this test for compilers unknown to
3573# Autoconf.
3574for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003575do
3576 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003579 ;;
3580 [ab].out )
3581 # We found the default executable, but exeext='' is most
3582 # certainly right.
3583 break;;
3584 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586 then :; else
3587 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3588 fi
3589 # We set ac_cv_exeext here because the later test for it is not
3590 # safe: cross compilers may not add the suffix if given an `-o'
3591 # argument, so we may need to know it at that point already.
3592 # Even if this section looks crufty: it has the advantage of
3593 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003594 break;;
3595 * )
3596 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 esac
3598done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599test "$ac_cv_exeext" = no && ac_cv_exeext=
3600
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003601else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602 ac_file=''
3603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003604if test -z "$ac_file"; then :
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3606$as_echo "no" >&6; }
3607$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003608sed 's/^/| /' conftest.$ac_ext >&5
3609
Matthias Kloseb9621712010-04-24 17:59:49 +00003610{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003612as_fn_error 77 "C compiler cannot create executables
Gregory P. Smith69140482012-01-16 02:05:55 -08003613See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003614else
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3616$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3619$as_echo_n "checking for C compiler default output file name... " >&6; }
3620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3621$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003623
Matthias Kloseb9621712010-04-24 17:59:49 +00003624rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003625ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3627$as_echo_n "checking for suffix of executables... " >&6; }
3628if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629case "(($ac_try" in
3630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3631 *) ac_try_echo=$ac_try;;
3632esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003633eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3634$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3638 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003639 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3640# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3641# work properly (i.e., refer to `conftest.exe'), while it won't with
3642# `rm'.
3643for ac_file in conftest.exe conftest conftest.*; do
3644 test -f "$ac_file" || continue
3645 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003647 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3648 break;;
3649 * ) break;;
3650 esac
3651done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003652else
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003655as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Gregory P. Smith69140482012-01-16 02:05:55 -08003656See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003658rm -f conftest conftest$ac_cv_exeext
3659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3660$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003661
3662rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003663EXEEXT=$ac_cv_exeext
3664ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3666/* end confdefs.h. */
3667#include <stdio.h>
3668int
3669main ()
3670{
3671FILE *f = fopen ("conftest.out", "w");
3672 return ferror (f) || fclose (f) != 0;
3673
3674 ;
3675 return 0;
3676}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003678ac_clean_files="$ac_clean_files conftest.out"
3679# Check that the compiler produces executables we can run. If not, either
3680# the compiler is broken, or we cross compile.
3681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3682$as_echo_n "checking whether we are cross compiling... " >&6; }
3683if test "$cross_compiling" != yes; then
3684 { { ac_try="$ac_link"
3685case "(($ac_try" in
3686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3687 *) ac_try_echo=$ac_try;;
3688esac
3689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3690$as_echo "$ac_try_echo"; } >&5
3691 (eval "$ac_link") 2>&5
3692 ac_status=$?
3693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3694 test $ac_status = 0; }
3695 if { ac_try='./conftest$ac_cv_exeext'
3696 { { case "(($ac_try" in
3697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3698 *) ac_try_echo=$ac_try;;
3699esac
3700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3701$as_echo "$ac_try_echo"; } >&5
3702 (eval "$ac_try") 2>&5
3703 ac_status=$?
3704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3705 test $ac_status = 0; }; }; then
3706 cross_compiling=no
3707 else
3708 if test "$cross_compiling" = maybe; then
3709 cross_compiling=yes
3710 else
3711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003713as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003714If you meant to cross compile, use \`--host'.
Gregory P. Smith69140482012-01-16 02:05:55 -08003715See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 fi
3717 fi
3718fi
3719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3720$as_echo "$cross_compiling" >&6; }
3721
3722rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3723ac_clean_files=$ac_clean_files_save
3724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3725$as_echo_n "checking for suffix of object files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003726if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $as_echo_n "(cached) " >&6
3728else
3729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003730/* end confdefs.h. */
3731
3732int
3733main ()
3734{
3735
3736 ;
3737 return 0;
3738}
3739_ACEOF
3740rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003741if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742case "(($ac_try" in
3743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3744 *) ac_try_echo=$ac_try;;
3745esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3747$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3751 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 for ac_file in conftest.o conftest.obj conftest.*; do
3753 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3757 break;;
3758 esac
3759done
3760else
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003762sed 's/^/| /' conftest.$ac_ext >&5
3763
Matthias Kloseb9621712010-04-24 17:59:49 +00003764{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003766as_fn_error $? "cannot compute suffix of object files: cannot compile
Gregory P. Smith69140482012-01-16 02:05:55 -08003767See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003768fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003769rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3772$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003773OBJEXT=$ac_cv_objext
3774ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3776$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003777if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783int
3784main ()
3785{
3786#ifndef __GNUC__
3787 choke me
3788#endif
3789
3790 ;
3791 return 0;
3792}
3793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003794if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 ac_compiler_gnu=yes
3796else
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003800ac_cv_c_compiler_gnu=$ac_compiler_gnu
3801
3802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3804$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3805if test $ac_compiler_gnu = yes; then
3806 GCC=yes
3807else
3808 GCC=
3809fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003810ac_test_CFLAGS=${CFLAGS+set}
3811ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3813$as_echo_n "checking whether $CC accepts -g... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003814if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003816else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 ac_save_c_werror_flag=$ac_c_werror_flag
3818 ac_c_werror_flag=yes
3819 ac_cv_prog_cc_g=no
3820 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003823
Martin v. Löwis11437992002-04-12 09:54:03 +00003824int
3825main ()
3826{
3827
3828 ;
3829 return 0;
3830}
3831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003832if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003833 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834else
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 CFLAGS=""
3836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837/* end confdefs.h. */
3838
3839int
3840main ()
3841{
3842
3843 ;
3844 return 0;
3845}
3846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003847if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848
Matthias Kloseb9621712010-04-24 17:59:49 +00003849else
3850 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853/* end confdefs.h. */
3854
3855int
3856main ()
3857{
3858
3859 ;
3860 return 0;
3861}
3862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003863if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3871 ac_c_werror_flag=$ac_save_c_werror_flag
3872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3874$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003875if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003876 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003877elif test $ac_cv_prog_cc_g = yes; then
3878 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003879 CFLAGS="-g -O2"
3880 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003881 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003882 fi
3883else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003884 if test "$GCC" = yes; then
3885 CFLAGS="-O2"
3886 else
3887 CFLAGS=
3888 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3891$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08003892if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003894else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003896ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003898/* end confdefs.h. */
3899#include <stdarg.h>
3900#include <stdio.h>
3901#include <sys/types.h>
3902#include <sys/stat.h>
3903/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3904struct buf { int x; };
3905FILE * (*rcsopen) (struct buf *, struct stat *, int);
3906static char *e (p, i)
3907 char **p;
3908 int i;
3909{
3910 return p[i];
3911}
3912static char *f (char * (*g) (char **, int), char **p, ...)
3913{
3914 char *s;
3915 va_list v;
3916 va_start (v,p);
3917 s = g (p, va_arg (v,int));
3918 va_end (v);
3919 return s;
3920}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003921
3922/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3923 function prototypes and stuff, but not '\xHH' hex character constants.
3924 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003926 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3927 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003929int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3932 inside strings and character constants. */
3933#define FOO(x) 'x'
3934int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3935
Skip Montanaro6dead952003-09-25 14:50:04 +00003936int test (int i, double x);
3937struct s1 {int (*f) (int a);};
3938struct s2 {int (*f) (double a);};
3939int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3940int argc;
3941char **argv;
3942int
3943main ()
3944{
3945return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3946 ;
3947 return 0;
3948}
3949_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3951 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003952do
3953 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957rm -f core conftest.err conftest.$ac_objext
3958 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003959done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003961CC=$ac_save_CC
3962
3963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964# AC_CACHE_VAL
3965case "x$ac_cv_prog_cc_c89" in
3966 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3968$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3971$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003972 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3975$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003976esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003977if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003978
Matthias Kloseb9621712010-04-24 17:59:49 +00003979fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003980
Martin v. Löwis11437992002-04-12 09:54:03 +00003981ac_ext=c
3982ac_cpp='$CPP $CPPFLAGS'
3983ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3984ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3985ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003986
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003987
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003988
3989
Matthias Kloseb9621712010-04-24 17:59:49 +00003990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3991$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003994if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003996
3997 case $withval in
3998 no) with_cxx_main=no
3999 MAINCC='$(CC)';;
4000 yes) with_cxx_main=yes
4001 MAINCC='$(CXX)';;
4002 *) with_cxx_main=yes
4003 MAINCC=$withval
4004 if test -z "$CXX"
4005 then
4006 CXX=$withval
4007 fi;;
4008 esac
4009else
4010
4011 with_cxx_main=no
4012 MAINCC='$(CC)'
4013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014fi
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4017$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004018
4019preset_cxx="$CXX"
4020if test -z "$CXX"
4021then
4022 case "$CC" in
4023 gcc) # Extract the first word of "g++", so it can be a program name with args.
4024set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4026$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004027if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004029else
4030 case $CXX in
4031 [\\/]* | ?:[\\/]*)
4032 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4033 ;;
4034 *)
4035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4036for as_dir in notfound
4037do
4038 IFS=$as_save_IFS
4039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 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 +00004042 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004044 break 2
4045 fi
4046done
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004048IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049
4050 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4051 ;;
4052esac
4053fi
4054CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004055if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4057$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004058else
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4060$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004062
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063 ;;
4064 cc) # Extract the first word of "c++", so it can be a program name with args.
4065set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4067$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004068if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070else
4071 case $CXX in
4072 [\\/]* | ?:[\\/]*)
4073 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4074 ;;
4075 *)
4076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077for as_dir in notfound
4078do
4079 IFS=$as_save_IFS
4080 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082 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 +00004083 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004085 break 2
4086 fi
4087done
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004089IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004090
4091 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4092 ;;
4093esac
4094fi
4095CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004096if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4098$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004099else
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4101$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004103
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004104 ;;
4105 esac
4106 if test "$CXX" = "notfound"
4107 then
4108 CXX=""
4109 fi
4110fi
4111if test -z "$CXX"
4112then
4113 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4114do
4115 # Extract the first word of "$ac_prog", so it can be a program name with args.
4116set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4118$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004119if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004121else
4122 if test -n "$CXX"; then
4123 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4124else
4125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4126for as_dir in $PATH
4127do
4128 IFS=$as_save_IFS
4129 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131 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 +00004132 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004134 break 2
4135 fi
4136done
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004138IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139
4140fi
4141fi
4142CXX=$ac_cv_prog_CXX
4143if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4145$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004146else
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4148$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004149fi
4150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004152 test -n "$CXX" && break
4153done
4154test -n "$CXX" || CXX="notfound"
4155
4156 if test "$CXX" = "notfound"
4157 then
4158 CXX=""
4159 fi
4160fi
4161if test "$preset_cxx" != "$CXX"
4162then
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004164
4165 By default, distutils will build C++ extension modules with \"$CXX\".
4166 If this is not intended, then set CXX on the configure command line.
4167 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004168$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004169
4170 By default, distutils will build C++ extension modules with \"$CXX\".
4171 If this is not intended, then set CXX on the configure command line.
4172 " >&2;}
4173fi
4174
4175
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4177$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4178save_LDFLAGS="$LDFLAGS"
4179LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4182/* end confdefs.h. */
4183
4184int
4185main ()
4186{
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
4192if ac_fn_c_try_link "$LINENO"; then :
4193 NO_AS_NEEDED="-Wl,--no-as-needed"
4194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4195$as_echo "yes" >&6; }
4196else
4197 NO_AS_NEEDED=""
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4199$as_echo "no" >&6; }
4200fi
4201rm -f core conftest.err conftest.$ac_objext \
4202 conftest$ac_exeext conftest.$ac_ext
4203LDFLAGS="$save_LDFLAGS"
4204
4205
4206
4207# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004208ac_ext=c
4209ac_cpp='$CPP $CPPFLAGS'
4210ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4211ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4212ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4214$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004215# On Suns, sometimes $CPP names a directory.
4216if test -n "$CPP" && test -d "$CPP"; then
4217 CPP=
4218fi
4219if test -z "$CPP"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08004220 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004222else
Martin v. Löwis11437992002-04-12 09:54:03 +00004223 # Double quotes because CPP needs to be expanded
4224 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4225 do
4226 ac_preproc_ok=false
4227for ac_c_preproc_warn_flag in '' yes
4228do
4229 # Use a header file that comes with gcc, so configuring glibc
4230 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004231 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4232 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004233 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004236/* end confdefs.h. */
4237#ifdef __STDC__
4238# include <limits.h>
4239#else
4240# include <assert.h>
4241#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004242 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004244if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004245
Matthias Kloseb9621712010-04-24 17:59:49 +00004246else
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 # Broken: fails on valid input.
4248continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004249fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004250rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004256#include <ac_nonexistent.h>
4257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004259 # Broken: success on invalid input.
4260continue
4261else
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 # Passes both tests.
4263ac_preproc_ok=:
4264break
4265fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004266rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004267
4268done
4269# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004270rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004271if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 break
4273fi
4274
4275 done
4276 ac_cv_prog_CPP=$CPP
4277
4278fi
4279 CPP=$ac_cv_prog_CPP
4280else
4281 ac_cv_prog_CPP=$CPP
4282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4284$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004285ac_preproc_ok=false
4286for ac_c_preproc_warn_flag in '' yes
4287do
4288 # Use a header file that comes with gcc, so configuring glibc
4289 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004290 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4291 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004292 # On the NeXT, cc -E runs the code through the compiler's parser,
4293 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* end confdefs.h. */
4296#ifdef __STDC__
4297# include <limits.h>
4298#else
4299# include <assert.h>
4300#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004303if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004304
Matthias Kloseb9621712010-04-24 17:59:49 +00004305else
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # Broken: fails on valid input.
4307continue
4308fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004309rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004315#include <ac_nonexistent.h>
4316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004317if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 # Broken: success on invalid input.
4319continue
4320else
Martin v. Löwis11437992002-04-12 09:54:03 +00004321 # Passes both tests.
4322ac_preproc_ok=:
4323break
4324fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004325rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004326
4327done
4328# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004329rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004330if $ac_preproc_ok; then :
4331
Martin v. Löwis11437992002-04-12 09:54:03 +00004332else
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004335as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Gregory P. Smith69140482012-01-16 02:05:55 -08004336See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004337fi
4338
4339ac_ext=c
4340ac_cpp='$CPP $CPPFLAGS'
4341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4343ac_compiler_gnu=$ac_cv_c_compiler_gnu
4344
4345
Matthias Kloseb9621712010-04-24 17:59:49 +00004346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4347$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004348if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004350else
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 # Loop through the user's path and test for each of PROGNAME-LIST
4354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4356do
4357 IFS=$as_save_IFS
4358 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 for ac_prog in grep ggrep; do
4360 for ac_exec_ext in '' $ac_executable_extensions; do
4361 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4362 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4363# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 # Check for GNU $ac_path_GREP
4365case `"$ac_path_GREP" --version 2>&1` in
4366*GNU*)
4367 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4368*)
4369 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004370 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 while :
4372 do
4373 cat "conftest.in" "conftest.in" >"conftest.tmp"
4374 mv "conftest.tmp" "conftest.in"
4375 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4378 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4381 # Best one so far, save it but keep looking for a better one
4382 ac_cv_path_GREP="$ac_path_GREP"
4383 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004384 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 # 10*(2^10) chars as input seems more than enough
4386 test $ac_count -gt 10 && break
4387 done
4388 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4389esac
4390
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 $ac_path_GREP_found && break 3
4392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004397 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 +00004398 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399else
4400 ac_cv_path_GREP=$GREP
4401fi
4402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4405$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 GREP="$ac_cv_path_GREP"
4407
4408
Matthias Kloseb9621712010-04-24 17:59:49 +00004409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4410$as_echo_n "checking for egrep... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004411if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413else
4414 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4415 then ac_cv_path_EGREP="$GREP -E"
4416 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004419 # Loop through the user's path and test for each of PROGNAME-LIST
4420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4422do
4423 IFS=$as_save_IFS
4424 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 for ac_prog in egrep; do
4426 for ac_exec_ext in '' $ac_executable_extensions; do
4427 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4428 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4429# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 # Check for GNU $ac_path_EGREP
4431case `"$ac_path_EGREP" --version 2>&1` in
4432*GNU*)
4433 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4434*)
4435 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004436 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437 while :
4438 do
4439 cat "conftest.in" "conftest.in" >"conftest.tmp"
4440 mv "conftest.tmp" "conftest.in"
4441 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004442 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004443 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4444 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4447 # Best one so far, save it but keep looking for a better one
4448 ac_cv_path_EGREP="$ac_path_EGREP"
4449 ac_path_EGREP_max=$ac_count
4450 fi
4451 # 10*(2^10) chars as input seems more than enough
4452 test $ac_count -gt 10 && break
4453 done
4454 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4455esac
4456
Matthias Kloseb9621712010-04-24 17:59:49 +00004457 $ac_path_EGREP_found && break 3
4458 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004461IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004463 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 +00004464 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004465else
4466 ac_cv_path_EGREP=$EGREP
4467fi
4468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004469 fi
4470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4472$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004473 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004474
4475
Matthias Kloseb9621712010-04-24 17:59:49 +00004476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4477$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004478if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 $as_echo_n "(cached) " >&6
4480else
4481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004482/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004483#include <stdlib.h>
4484#include <stdarg.h>
4485#include <string.h>
4486#include <float.h>
4487
4488int
4489main ()
4490{
4491
4492 ;
4493 return 0;
4494}
4495_ACEOF
4496if ac_fn_c_try_compile "$LINENO"; then :
4497 ac_cv_header_stdc=yes
4498else
4499 ac_cv_header_stdc=no
4500fi
4501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4502
4503if test $ac_cv_header_stdc = yes; then
4504 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4506/* end confdefs.h. */
4507#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004508
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004509_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004511 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004512
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004513else
Matthias Kloseb9621712010-04-24 17:59:49 +00004514 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004515fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004516rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004517
Matthias Kloseb9621712010-04-24 17:59:49 +00004518fi
4519
4520if test $ac_cv_header_stdc = yes; then
4521 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523/* end confdefs.h. */
4524#include <stdlib.h>
4525
4526_ACEOF
4527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4528 $EGREP "free" >/dev/null 2>&1; then :
4529
4530else
4531 ac_cv_header_stdc=no
4532fi
4533rm -f conftest*
4534
4535fi
4536
4537if test $ac_cv_header_stdc = yes; then
4538 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4539 if test "$cross_compiling" = yes; then :
4540 :
4541else
4542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h. */
4544#include <ctype.h>
4545#include <stdlib.h>
4546#if ((' ' & 0x0FF) == 0x020)
4547# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4548# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4549#else
4550# define ISLOWER(c) \
4551 (('a' <= (c) && (c) <= 'i') \
4552 || ('j' <= (c) && (c) <= 'r') \
4553 || ('s' <= (c) && (c) <= 'z'))
4554# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4555#endif
4556
4557#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4558int
4559main ()
4560{
4561 int i;
4562 for (i = 0; i < 256; i++)
4563 if (XOR (islower (i), ISLOWER (i))
4564 || toupper (i) != TOUPPER (i))
4565 return 2;
4566 return 0;
4567}
4568_ACEOF
4569if ac_fn_c_try_run "$LINENO"; then :
4570
4571else
4572 ac_cv_header_stdc=no
4573fi
4574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4575 conftest.$ac_objext conftest.beam conftest.$ac_ext
4576fi
4577
4578fi
4579fi
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4581$as_echo "$ac_cv_header_stdc" >&6; }
4582if test $ac_cv_header_stdc = yes; then
4583
4584$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4585
4586fi
4587
4588# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4589for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4590 inttypes.h stdint.h unistd.h
4591do :
4592 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4593ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4594"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004595if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004596 cat >>confdefs.h <<_ACEOF
4597#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4598_ACEOF
4599
4600fi
4601
4602done
4603
4604
4605
4606 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 -08004607if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 MINIX=yes
4609else
4610 MINIX=
4611fi
4612
4613
4614 if test "$MINIX" = yes; then
4615
4616$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4617
4618
4619$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4620
4621
4622$as_echo "#define _MINIX 1" >>confdefs.h
4623
4624 fi
4625
4626
4627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4628$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004629if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004630 $as_echo_n "(cached) " >&6
4631else
4632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4633/* end confdefs.h. */
4634
4635# define __EXTENSIONS__ 1
4636 $ac_includes_default
4637int
4638main ()
4639{
4640
4641 ;
4642 return 0;
4643}
4644_ACEOF
4645if ac_fn_c_try_compile "$LINENO"; then :
4646 ac_cv_safe_to_define___extensions__=yes
4647else
4648 ac_cv_safe_to_define___extensions__=no
4649fi
4650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4651fi
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4653$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4654 test $ac_cv_safe_to_define___extensions__ = yes &&
4655 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4656
4657 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4658
4659 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4660
4661 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4662
4663 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4664
4665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004667# Check for unsupported systems
4668case $ac_sys_system/$ac_sys_release in
4669atheos*|Linux*/1*)
4670 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4671 echo See README for details.
4672 exit 1;;
4673esac
4674
4675
Matthias Kloseb9621712010-04-24 17:59:49 +00004676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4677$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004678
4679# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004680if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681 withval=$with_suffix;
4682 case $withval in
4683 no) EXEEXT=;;
4684 yes) EXEEXT=.exe;;
4685 *) EXEEXT=$withval;;
4686 esac
4687fi
4688
Matthias Kloseb9621712010-04-24 17:59:49 +00004689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4690$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004691
4692# Test whether we're running on a non-case-sensitive system, in which
4693# case we give a warning if no ext is given
4694
Matthias Kloseb9621712010-04-24 17:59:49 +00004695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4696$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004697if test ! -d CaseSensitiveTestDir; then
4698mkdir CaseSensitiveTestDir
4699fi
4700
4701if test -d casesensitivetestdir
4702then
Matthias Kloseb9621712010-04-24 17:59:49 +00004703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4704$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004705 BUILDEXEEXT=.exe
4706else
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709 BUILDEXEEXT=$EXEEXT
4710fi
4711rmdir CaseSensitiveTestDir
4712
4713case $MACHDEP in
4714bsdos*)
4715 case $CC in
4716 gcc) CC="$CC -D_HAVE_BSDI";;
4717 esac;;
4718esac
4719
4720case $ac_sys_system in
4721hp*|HP*)
4722 case $CC in
4723 cc|*/cc) CC="$CC -Ae";;
4724 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004725esac
4726
4727
4728
Matthias Kloseb9621712010-04-24 17:59:49 +00004729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4730$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731if test -z "$LIBRARY"
4732then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004733 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4736$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004737
4738# LDLIBRARY is the name of the library to link against (as opposed to the
4739# name of the library into which to insert object files). BLDLIBRARY is also
4740# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4741# is blank as the main program is not linked directly against LDLIBRARY.
4742# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4743# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4744# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4745# DLLLIBRARY is the shared (i.e., DLL) library.
4746#
4747# RUNSHARED is used to run shared python without installed libraries
4748#
4749# INSTSONAME is the name of the shared library that will be use to install
4750# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004751#
4752# LDVERSION is the shared library version number, normally the Python version
4753# with the ABI build flags appended.
4754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755
4756
4757
4758
4759
4760
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762LDLIBRARY="$LIBRARY"
4763BLDLIBRARY='$(LDLIBRARY)'
4764INSTSONAME='$(LDLIBRARY)'
4765DLLLIBRARY=''
4766LDLIBRARYDIR=''
4767RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004768LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769
4770# LINKCC is the command that links the python executable -- default is $(CC).
4771# If CXX is set, and if it is needed to link a main function that was
4772# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4773# python might then depend on the C++ runtime
4774# This is altered for AIX in order to build the export list before
4775# linking.
4776
Matthias Kloseb9621712010-04-24 17:59:49 +00004777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4778$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779if test -z "$LINKCC"
4780then
4781 LINKCC='$(PURIFY) $(MAINCC)'
4782 case $ac_sys_system in
4783 AIX*)
4784 exp_extra="\"\""
4785 if test $ac_sys_release -ge 5 -o \
4786 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4787 exp_extra="."
4788 fi
4789 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790 QNX*)
4791 # qcc must be used because the other compilers do not
4792 # support -N.
4793 LINKCC=qcc;;
4794 esac
4795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4797$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004798
4799# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4800# make sure we default having it set to "no": this is used by
4801# distutils.unixccompiler to know if it should add --enable-new-dtags
4802# to linker command lines, and failing to detect GNU ld simply results
4803# in the same bahaviour as before.
4804
Matthias Kloseb9621712010-04-24 17:59:49 +00004805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4806$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807ac_prog=ld
4808if test "$GCC" = yes; then
4809 ac_prog=`$CC -print-prog-name=ld`
4810fi
4811case `"$ac_prog" -V 2>&1 < /dev/null` in
4812 *GNU*)
4813 GNULD=yes;;
4814 *)
4815 GNULD=no;;
4816esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4818$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4821$as_echo_n "checking for inline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08004822if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004823 $as_echo_n "(cached) " >&6
4824else
4825 ac_cv_c_inline=no
4826for ac_kw in inline __inline__ __inline; do
4827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4828/* end confdefs.h. */
4829#ifndef __cplusplus
4830typedef int foo_t;
4831static $ac_kw foo_t static_foo () {return 0; }
4832$ac_kw foo_t foo () {return 0; }
4833#endif
4834
4835_ACEOF
4836if ac_fn_c_try_compile "$LINENO"; then :
4837 ac_cv_c_inline=$ac_kw
4838fi
4839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4840 test "$ac_cv_c_inline" != no && break
4841done
4842
4843fi
4844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4845$as_echo "$ac_cv_c_inline" >&6; }
4846
4847case $ac_cv_c_inline in
4848 inline | yes) ;;
4849 *)
4850 case $ac_cv_c_inline in
4851 no) ac_val=;;
4852 *) ac_val=$ac_cv_c_inline;;
4853 esac
4854 cat >>confdefs.h <<_ACEOF
4855#ifndef __cplusplus
4856#define inline $ac_val
4857#endif
4858_ACEOF
4859 ;;
4860esac
4861
4862if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004863
4864$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004865
4866
4867fi
4868
4869
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4871$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004873if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874 enableval=$enable_shared;
4875fi
4876
4877
4878if test -z "$enable_shared"
4879then
4880 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004881 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882 enable_shared="yes";;
4883 *)
4884 enable_shared="no";;
4885 esac
4886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4888$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889
Matthias Kloseb9621712010-04-24 17:59:49 +00004890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4891$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004893if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004894 enableval=$enable_profiling; ac_save_cc="$CC"
4895 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004896 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 ac_enable_profiling="no"
4898else
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900/* end confdefs.h. */
4901int main() { return 0; }
4902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004903if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 ac_enable_profiling="yes"
4905else
Matthias Kloseb9621712010-04-24 17:59:49 +00004906 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910fi
4911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912 CC="$ac_save_cc"
4913fi
4914
Matthias Kloseb9621712010-04-24 17:59:49 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4916$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917
4918case "$ac_enable_profiling" in
4919 "yes")
4920 BASECFLAGS="-pg $BASECFLAGS"
4921 LDFLAGS="-pg $LDFLAGS"
4922 ;;
4923esac
4924
Matthias Kloseb9621712010-04-24 17:59:49 +00004925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4926$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927
4928# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4929# library that we build, but we do not want to link against it (we
4930# will find it with a -framework option). For this reason there is an
4931# extra variable BLDLIBRARY against which Python and the extension
4932# modules are linked, BLDLIBRARY. This is normally the same as
4933# LDLIBRARY, but empty for MacOSX framework builds.
4934if test "$enable_framework"
4935then
4936 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4937 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4938 BLDLIBRARY=''
4939else
4940 BLDLIBRARY='$(LDLIBRARY)'
4941fi
4942
4943# Other platforms follow
4944if test $enable_shared = "yes"; then
4945
Matthias Kloseb9621712010-04-24 17:59:49 +00004946$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947
4948 case $ac_sys_system in
4949 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004950 LDLIBRARY='libpython$(LDVERSION).dll.a'
4951 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952 ;;
4953 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004954 LDLIBRARY='libpython$(LDVERSION).so'
4955 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4957 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004958 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004959 then
4960 PY3LIBRARY=libpython3.so
4961 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004963 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004964 LDLIBRARY='libpython$(LDVERSION).so'
4965 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4967 case $ac_sys_system in
4968 FreeBSD*)
4969 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4970 ;;
4971 esac
4972 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004973 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004974 then
4975 PY3LIBRARY=libpython3.so
4976 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977 ;;
4978 hp*|HP*)
4979 case `uname -m` in
4980 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004981 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982 ;;
4983 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004984 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985 ;;
4986 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004987 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004988 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4989 ;;
4990 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004991 LDLIBRARY='libpython$(LDVERSION).so'
4992 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4994 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004996 LDLIBRARY='libpython$(LDVERSION).dylib'
4997 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004998 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4999 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005000 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005001 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005002 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5003 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004
5005 esac
5006else # shared is disabled
5007 case $ac_sys_system in
5008 CYGWIN*)
5009 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005010 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011 ;;
5012 esac
5013fi
5014
Matthias Kloseb9621712010-04-24 17:59:49 +00005015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5016$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005017
5018if test -n "$ac_tool_prefix"; then
5019 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5020set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005023if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025else
5026 if test -n "$RANLIB"; then
5027 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5028else
5029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5036 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038 break 2
5039 fi
5040done
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042IFS=$as_save_IFS
5043
5044fi
5045fi
5046RANLIB=$ac_cv_prog_RANLIB
5047if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5049$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005050else
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053fi
5054
5055
5056fi
5057if test -z "$ac_cv_prog_RANLIB"; then
5058 ac_ct_RANLIB=$RANLIB
5059 # Extract the first word of "ranlib", so it can be a program name with args.
5060set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005063if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065else
5066 if test -n "$ac_ct_RANLIB"; then
5067 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5068else
5069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070for as_dir in $PATH
5071do
5072 IFS=$as_save_IFS
5073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5076 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078 break 2
5079 fi
5080done
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082IFS=$as_save_IFS
5083
5084fi
5085fi
5086ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5087if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5089$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093fi
5094
5095 if test "x$ac_ct_RANLIB" = x; then
5096 RANLIB=":"
5097 else
5098 case $cross_compiling:$ac_tool_warned in
5099yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102ac_tool_warned=yes ;;
5103esac
5104 RANLIB=$ac_ct_RANLIB
5105 fi
5106else
5107 RANLIB="$ac_cv_prog_RANLIB"
5108fi
5109
5110
5111for ac_prog in ar aal
5112do
5113 # Extract the first word of "$ac_prog", so it can be a program name with args.
5114set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5116$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005117if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119else
5120 if test -n "$AR"; then
5121 ac_cv_prog_AR="$AR" # Let the user override the test.
5122else
5123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124for as_dir in $PATH
5125do
5126 IFS=$as_save_IFS
5127 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5130 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 break 2
5133 fi
5134done
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005136IFS=$as_save_IFS
5137
5138fi
5139fi
5140AR=$ac_cv_prog_AR
5141if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5143$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144else
Matthias Kloseb9621712010-04-24 17:59:49 +00005145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5146$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147fi
5148
5149
5150 test -n "$AR" && break
5151done
5152test -n "$AR" || AR="ar"
5153
5154
5155# tweak ARFLAGS only if the user didn't set it on the command line
5156
5157if test -z "$ARFLAGS"
5158then
5159 ARFLAGS="rc"
5160fi
5161
5162
5163# Extract the first word of "svnversion", so it can be a program name with args.
5164set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5166$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005167if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005169else
5170 if test -n "$SVNVERSION"; then
5171 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5172else
5173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5174for as_dir in $PATH
5175do
5176 IFS=$as_save_IFS
5177 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005178 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5180 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005182 break 2
5183 fi
5184done
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186IFS=$as_save_IFS
5187
5188 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5189fi
5190fi
5191SVNVERSION=$ac_cv_prog_SVNVERSION
5192if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5194$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195else
Matthias Kloseb9621712010-04-24 17:59:49 +00005196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5197$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198fi
5199
5200
5201if test $SVNVERSION = found
5202then
5203 SVNVERSION="svnversion \$(srcdir)"
5204else
5205 SVNVERSION="echo Unversioned directory"
5206fi
5207
Georg Brandl1ca2e792011-03-05 20:51:24 +01005208
5209
5210
Georg Brandl187c1112011-07-03 09:23:20 +02005211
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005212if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005213then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005214# Extract the first word of "hg", so it can be a program name with args.
5215set dummy hg; ac_word=$2
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5217$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005218if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005219 $as_echo_n "(cached) " >&6
5220else
5221 if test -n "$HAS_HG"; then
5222 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5223else
5224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227 IFS=$as_save_IFS
5228 test -z "$as_dir" && as_dir=.
5229 for ac_exec_ext in '' $ac_executable_extensions; do
5230 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5231 ac_cv_prog_HAS_HG="found"
5232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233 break 2
5234 fi
5235done
5236 done
5237IFS=$as_save_IFS
5238
5239 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5240fi
5241fi
5242HAS_HG=$ac_cv_prog_HAS_HG
5243if test -n "$HAS_HG"; then
5244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5245$as_echo "$HAS_HG" >&6; }
5246else
5247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248$as_echo "no" >&6; }
5249fi
5250
5251
Georg Brandl187c1112011-07-03 09:23:20 +02005252else
5253HAS_HG=no-repository
5254fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005255if test $HAS_HG = found
5256then
5257 HGVERSION="hg id -i \$(srcdir)"
5258 HGTAG="hg id -t \$(srcdir)"
5259 HGBRANCH="hg id -b \$(srcdir)"
5260else
5261 HGVERSION=""
5262 HGTAG=""
5263 HGBRANCH=""
5264fi
5265
Georg Brandl187c1112011-07-03 09:23:20 +02005266
5267DISABLE_ASDLGEN=""
5268# Extract the first word of "python", so it can be a program name with args.
5269set dummy python; ac_word=$2
5270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5271$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005272if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005273 $as_echo_n "(cached) " >&6
5274else
5275 if test -n "$HAS_PYTHON"; then
5276 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5277else
5278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5279for as_dir in $PATH
5280do
5281 IFS=$as_save_IFS
5282 test -z "$as_dir" && as_dir=.
5283 for ac_exec_ext in '' $ac_executable_extensions; do
5284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5285 ac_cv_prog_HAS_PYTHON="found"
5286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5287 break 2
5288 fi
5289done
5290 done
5291IFS=$as_save_IFS
5292
5293 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5294fi
5295fi
5296HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5297if test -n "$HAS_PYTHON"; then
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5299$as_echo "$HAS_PYTHON" >&6; }
5300else
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5302$as_echo "no" >&6; }
5303fi
5304
5305
5306if test $HAS_HG != found -o $HAS_PYTHON != found
5307then
5308 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5309fi
5310
5311
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312case $MACHDEP in
5313bsdos*|hp*|HP*)
5314 # install -d does not work on BSDI or HP-UX
5315 if test -z "$INSTALL"
5316 then
5317 INSTALL="${srcdir}/install-sh -c"
5318 fi
5319esac
5320ac_aux_dir=
5321for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005322 if test -f "$ac_dir/install-sh"; then
5323 ac_aux_dir=$ac_dir
5324 ac_install_sh="$ac_aux_dir/install-sh -c"
5325 break
5326 elif test -f "$ac_dir/install.sh"; then
5327 ac_aux_dir=$ac_dir
5328 ac_install_sh="$ac_aux_dir/install.sh -c"
5329 break
5330 elif test -f "$ac_dir/shtool"; then
5331 ac_aux_dir=$ac_dir
5332 ac_install_sh="$ac_aux_dir/shtool install -c"
5333 break
5334 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335done
5336if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005337 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338fi
5339
5340# These three variables are undocumented and unsupported,
5341# and are intended to be withdrawn in a future Autoconf release.
5342# They can cause serious problems if a builder's source tree is in a directory
5343# whose full name contains unusual characters.
5344ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5345ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5346ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5347
5348
5349# Find a good install program. We prefer a C program (faster),
5350# so one script is as good as another. But avoid the broken or
5351# incompatible versions:
5352# SysV /etc/install, /usr/sbin/install
5353# SunOS /usr/etc/install
5354# IRIX /sbin/install
5355# AIX /bin/install
5356# AmigaOS /C/install, which installs bootblocks on floppy discs
5357# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5358# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5359# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5360# OS/2's system install, which has a completely different semantic
5361# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005362# Reject install programs that cannot install multiple files.
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5364$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365if test -z "$INSTALL"; then
Gregory P. Smith69140482012-01-16 02:05:55 -08005366if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368else
5369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372 IFS=$as_save_IFS
5373 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 # Account for people who put trailing slashes in PATH elements.
5375case $as_dir/ in #((
5376 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379 /usr/ucb/* ) ;;
5380 *)
5381 # OSF1 and SCO ODT 3.0 have their own names for install.
5382 # Don't use installbsd from OSF since it installs stuff as root
5383 # by default.
5384 for ac_prog in ginstall scoinst install; do
5385 for ac_exec_ext in '' $ac_executable_extensions; do
5386 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5387 if test $ac_prog = install &&
5388 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5389 # AIX install. It has an incompatible calling convention.
5390 :
5391 elif test $ac_prog = install &&
5392 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5393 # program-specific install script used by HP pwplus--don't use.
5394 :
5395 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 rm -rf conftest.one conftest.two conftest.dir
5397 echo one > conftest.one
5398 echo two > conftest.two
5399 mkdir conftest.dir
5400 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5401 test -s conftest.one && test -s conftest.two &&
5402 test -s conftest.dir/conftest.one &&
5403 test -s conftest.dir/conftest.two
5404 then
5405 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5406 break 3
5407 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408 fi
5409 fi
5410 done
5411 done
5412 ;;
5413esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005414
5415 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416IFS=$as_save_IFS
5417
Matthias Kloseb9621712010-04-24 17:59:49 +00005418rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419
5420fi
5421 if test "${ac_cv_path_install+set}" = set; then
5422 INSTALL=$ac_cv_path_install
5423 else
5424 # As a last resort, use the slow shell script. Don't cache a
5425 # value for INSTALL within a source directory, because that will
5426 # break other packages using the cache if that directory is
5427 # removed, or if the value is a relative name.
5428 INSTALL=$ac_install_sh
5429 fi
5430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5432$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433
5434# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5435# It thinks the first close brace ends the variable substitution.
5436test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5437
5438test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5439
5440test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5441
Trent Nelsona45afca2012-08-30 14:32:02 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5443$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5444if test -z "$MKDIR_P"; then
5445 if ${ac_cv_path_mkdir+:} false; then :
5446 $as_echo_n "(cached) " >&6
5447else
5448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5450do
5451 IFS=$as_save_IFS
5452 test -z "$as_dir" && as_dir=.
5453 for ac_prog in mkdir gmkdir; do
5454 for ac_exec_ext in '' $ac_executable_extensions; do
5455 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5456 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5457 'mkdir (GNU coreutils) '* | \
5458 'mkdir (coreutils) '* | \
5459 'mkdir (fileutils) '4.1*)
5460 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5461 break 3;;
5462 esac
5463 done
5464 done
5465 done
5466IFS=$as_save_IFS
5467
5468fi
5469
5470 test -d ./--version && rmdir ./--version
5471 if test "${ac_cv_path_mkdir+set}" = set; then
5472 MKDIR_P="$ac_cv_path_mkdir -p"
5473 else
5474 # As a last resort, use the slow shell script. Don't cache a
5475 # value for MKDIR_P within a source directory, because that will
5476 # break other packages using the cache if that directory is
5477 # removed, or if the value is a relative name.
5478 MKDIR_P="$ac_install_sh -d"
5479 fi
5480fi
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5482$as_echo "$MKDIR_P" >&6; }
5483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484
5485# Not every filesystem supports hard links
5486
5487if test -z "$LN" ; then
5488 case $ac_sys_system in
5489 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005490 *) LN=ln;;
5491 esac
5492fi
5493
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005494# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005495
5496ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005497
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5500$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501
5502# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005503if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504 withval=$with_pydebug;
5505if test "$withval" != no
5506then
5507
Matthias Kloseb9621712010-04-24 17:59:49 +00005508$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509
Matthias Kloseb9621712010-04-24 17:59:49 +00005510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5511$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005513 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005514else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516fi
5517else
Matthias Kloseb9621712010-04-24 17:59:49 +00005518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5519$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520fi
5521
5522
5523# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5524# merged with this chunk of code?
5525
5526# Optimizer/debugger flags
5527# ------------------------
5528# (The following bit of code is complicated enough - please keep things
5529# indented properly. Just pretend you're editing Python code. ;-)
5530
5531# There are two parallel sets of case statements below, one that checks to
5532# see if OPT was set and one that does BASECFLAGS setting based upon
5533# compiler and platform. BASECFLAGS tweaks need to be made even if the
5534# user set OPT.
5535
5536# tweak OPT based on compiler and platform, only if the user didn't set
5537# it on the command line
5538
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005539if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540then
5541 case $GCC in
5542 yes)
5543 if test "$CC" != 'g++' ; then
5544 STRICT_PROTO="-Wstrict-prototypes"
5545 fi
5546 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5547 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5548 WRAP="-fwrapv"
5549 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005550
5551 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005552 case $CC in
5553 *clang*) WRAP="-fwrapv"
5554 ;;
5555 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005556
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557 case $ac_cv_prog_cc_g in
5558 yes)
5559 if test "$Py_DEBUG" = 'true' ; then
5560 # Optimization messes up debuggers, so turn it off for
5561 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005562 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563 else
5564 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5565 fi
5566 ;;
5567 *)
5568 OPT="-O3 -Wall $STRICT_PROTO"
5569 ;;
5570 esac
5571 case $ac_sys_system in
5572 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5573 ;;
5574 esac
5575 ;;
5576
5577 *)
5578 OPT="-O"
5579 ;;
5580 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581fi
5582
5583
5584
5585# The -arch flags for universal builds on OSX
5586UNIVERSAL_ARCH_FLAGS=
5587
5588
5589# tweak BASECFLAGS based on compiler and platform
5590case $GCC in
5591yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005592 # Python doesn't violate C99 aliasing rules, but older versions of
5593 # GCC produce warnings for legal Python code. Enable
5594 # -fno-strict-aliasing on versions of GCC that support but produce
5595 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5597$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 ac_save_cc="$CC"
5599 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005600 save_CFLAGS="$CFLAGS"
Gregory P. Smith69140482012-01-16 02:05:55 -08005601 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005602 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005603else
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005606
Matthias Kloseb159a552010-04-25 21:00:44 +00005607
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005608int
5609main ()
5610{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005611
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005612 ;
5613 return 0;
5614}
Matthias Kloseb159a552010-04-25 21:00:44 +00005615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005617if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005618
5619 CC="$ac_save_cc -fstrict-aliasing"
5620 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005622/* end confdefs.h. */
5623
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005624 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005625int
5626main ()
5627{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005628double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005629 ;
5630 return 0;
5631}
Matthias Kloseb159a552010-04-25 21:00:44 +00005632
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005634if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005635
5636 ac_cv_no_strict_aliasing=no
5637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638else
Matthias Kloseb159a552010-04-25 21:00:44 +00005639
5640 ac_cv_no_strict_aliasing=yes
5641
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005642fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005644
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005645else
Matthias Kloseb159a552010-04-25 21:00:44 +00005646
5647 ac_cv_no_strict_aliasing=no
5648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005651fi
5652
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005653 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5656$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005657 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 then
5659 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5660 fi
5661
5662 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5663 # support. Without this, treatment of subnormals doesn't follow
5664 # the standard.
5665 case $ac_sys_machine in
5666 alpha*)
5667 BASECFLAGS="$BASECFLAGS -mieee"
5668 ;;
5669 esac
5670
5671 case $ac_sys_system in
5672 SCO_SV*)
5673 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5674 ;;
5675 # is there any other compiler on Darwin besides gcc?
5676 Darwin*)
5677 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5678 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005679 if test "${CC}" = gcc
5680 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5682$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005683 case "${UNIVERSALSDK}" in
5684 */MacOSX10.4u.sdk)
5685 # Build using 10.4 SDK, force usage of gcc when the
5686 # compiler is gcc, otherwise the user will get very
5687 # confusing error messages when building on OSX 10.6
5688 CC=gcc-4.0
5689 CPP=cpp-4.0
5690 ;;
5691 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5693$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005694 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695
5696
5697 if test "${enable_universalsdk}"; then
5698 UNIVERSAL_ARCH_FLAGS=""
5699 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5700 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5701 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005702 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5704 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005705 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005706 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5709 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005710 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005711 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005713 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5714 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005715 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005716 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005717
5718 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5719 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005720 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005721 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005724 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 +00005725
5726 fi
5727
5728
Ronald Oussoren666028b2010-04-18 19:07:43 +00005729 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5730 if test "${UNIVERSALSDK}" != "/"
5731 then
5732 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5733 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005734 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735 fi
5736 fi
5737
5738 # Calculate the right deployment target for this build.
5739 #
5740 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5741 if test ${cur_target} '>' 10.2; then
5742 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005743 if test ${enable_universalsdk}; then
5744 if test "${UNIVERSAL_ARCHS}" = "all"; then
5745 # Ensure that the default platform for a
5746 # 4-way universal build is OSX 10.5,
5747 # that's the first OS release where
5748 # 4-way builds make sense.
5749 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005750
5751 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5752 cur_target='10.5'
5753
5754 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5755 cur_target='10.5'
5756
5757 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5758 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005759 fi
5760 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005761 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005762 # On Intel macs default to a deployment
5763 # target of 10.4, that's the first OSX
5764 # release with Intel support.
5765 cur_target="10.4"
5766 fi
5767 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 fi
5769 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5770
5771 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5772 # environment with a value that is the same as what we'll use
5773 # in the Makefile to ensure that we'll get the same compiler
5774 # environment during configure and build time.
5775 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5776 export MACOSX_DEPLOYMENT_TARGET
5777 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5778
5779 ;;
5780 OSF*)
5781 BASECFLAGS="$BASECFLAGS -mieee"
5782 ;;
5783 esac
5784 ;;
5785
5786*)
5787 case $ac_sys_system in
5788 OpenUNIX*|UnixWare*)
5789 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5790 ;;
5791 OSF*)
5792 BASECFLAGS="$BASECFLAGS -ieee -std"
5793 ;;
5794 SCO_SV*)
5795 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5796 ;;
5797 esac
5798 ;;
5799esac
5800
5801if test "$Py_DEBUG" = 'true'; then
5802 :
5803else
5804 OPT="-DNDEBUG $OPT"
5805fi
5806
5807if test "$ac_arch_flags"
5808then
5809 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5810fi
5811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812# Check whether GCC supports PyArg_ParseTuple format
5813if test "$GCC" = "yes"
5814then
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5816$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817 save_CFLAGS=$CFLAGS
5818 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820/* end confdefs.h. */
5821
5822 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823int
5824main ()
5825{
5826
5827 ;
5828 return 0;
5829}
Matthias Kloseb159a552010-04-25 21:00:44 +00005830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005832if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
Matthias Kloseb159a552010-04-25 21:00:44 +00005834
Matthias Kloseb9621712010-04-24 17:59:49 +00005835$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836
Matthias Kloseb159a552010-04-25 21:00:44 +00005837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005838$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840else
Matthias Kloseb159a552010-04-25 21:00:44 +00005841
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005843$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844
5845fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5847 CFLAGS=$save_CFLAGS
5848fi
5849
5850# On some compilers, pthreads are available without further options
5851# (e.g. MacOS X). On some of these systems, the compiler will not
5852# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5853# So we have to see first whether pthreads are available without
5854# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5856$as_echo_n "checking whether pthreads are available without options... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005857if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005858 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859else
Matthias Kloseb9621712010-04-24 17:59:49 +00005860 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861 ac_cv_pthread_is_default=no
5862else
Matthias Kloseb9621712010-04-24 17:59:49 +00005863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864/* end confdefs.h. */
5865
5866#include <pthread.h>
5867
5868void* routine(void* p){return NULL;}
5869
5870int main(){
5871 pthread_t p;
5872 if(pthread_create(&p,NULL,routine,NULL)!=0)
5873 return 1;
5874 (void)pthread_detach(p);
5875 return 0;
5876}
5877
5878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005879if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880
5881 ac_cv_pthread_is_default=yes
5882 ac_cv_kthread=no
5883 ac_cv_pthread=no
5884
5885else
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890fi
5891
5892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893fi
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5896$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897
5898
5899if test $ac_cv_pthread_is_default = yes
5900then
5901 ac_cv_kpthread=no
5902else
5903# -Kpthread, if available, provides the right #defines
5904# and linker options to make pthread_create available
5905# Some compilers won't report that they do not support -Kpthread,
5906# so we need to run a program to see whether it really made the
5907# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5909$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005910if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912else
5913 ac_save_cc="$CC"
5914CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005915if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ac_cv_kpthread=no
5917else
Matthias Kloseb9621712010-04-24 17:59:49 +00005918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919/* end confdefs.h. */
5920
5921#include <pthread.h>
5922
5923void* routine(void* p){return NULL;}
5924
5925int main(){
5926 pthread_t p;
5927 if(pthread_create(&p,NULL,routine,NULL)!=0)
5928 return 1;
5929 (void)pthread_detach(p);
5930 return 0;
5931}
5932
5933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005934if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ac_cv_kpthread=yes
5936else
Matthias Kloseb9621712010-04-24 17:59:49 +00005937 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941fi
5942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943CC="$ac_save_cc"
5944fi
5945
Matthias Kloseb9621712010-04-24 17:59:49 +00005946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5947$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948fi
5949
5950if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5951then
5952# -Kthread, if available, provides the right #defines
5953# and linker options to make pthread_create available
5954# Some compilers won't report that they do not support -Kthread,
5955# so we need to run a program to see whether it really made the
5956# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5958$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08005959if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961else
5962 ac_save_cc="$CC"
5963CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005964if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ac_cv_kthread=no
5966else
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968/* end confdefs.h. */
5969
5970#include <pthread.h>
5971
5972void* routine(void* p){return NULL;}
5973
5974int main(){
5975 pthread_t p;
5976 if(pthread_create(&p,NULL,routine,NULL)!=0)
5977 return 1;
5978 (void)pthread_detach(p);
5979 return 0;
5980}
5981
5982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005983if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 ac_cv_kthread=yes
5985else
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5989 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990fi
5991
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992CC="$ac_save_cc"
5993fi
5994
Matthias Kloseb9621712010-04-24 17:59:49 +00005995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5996$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997fi
5998
5999if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6000then
6001# -pthread, if available, provides the right #defines
6002# and linker options to make pthread_create available
6003# Some compilers won't report that they do not support -pthread,
6004# so we need to run a program to see whether it really made the
6005# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6007$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006008if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010else
6011 ac_save_cc="$CC"
6012CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006013if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 ac_cv_pthread=no
6015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017/* end confdefs.h. */
6018
6019#include <pthread.h>
6020
6021void* routine(void* p){return NULL;}
6022
6023int main(){
6024 pthread_t p;
6025 if(pthread_create(&p,NULL,routine,NULL)!=0)
6026 return 1;
6027 (void)pthread_detach(p);
6028 return 0;
6029}
6030
6031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006032if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 ac_cv_pthread=yes
6034else
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039fi
6040
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041CC="$ac_save_cc"
6042fi
6043
Matthias Kloseb9621712010-04-24 17:59:49 +00006044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6045$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046fi
6047
6048# If we have set a CC compiler flag for thread support then
6049# check if it works for CXX, too.
6050ac_cv_cxx_thread=no
6051if test ! -z "$CXX"
6052then
Matthias Kloseb9621712010-04-24 17:59:49 +00006053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6054$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055ac_save_cxx="$CXX"
6056
6057if test "$ac_cv_kpthread" = "yes"
6058then
6059 CXX="$CXX -Kpthread"
6060 ac_cv_cxx_thread=yes
6061elif test "$ac_cv_kthread" = "yes"
6062then
6063 CXX="$CXX -Kthread"
6064 ac_cv_cxx_thread=yes
6065elif test "$ac_cv_pthread" = "yes"
6066then
6067 CXX="$CXX -pthread"
6068 ac_cv_cxx_thread=yes
6069fi
6070
6071if test $ac_cv_cxx_thread = yes
6072then
6073 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6074 $CXX -c conftest.$ac_ext 2>&5
6075 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6076 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6077 then
6078 ac_cv_cxx_thread=yes
6079 else
6080 ac_cv_cxx_thread=no
6081 fi
6082 rm -fr conftest*
6083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6085$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086fi
6087CXX="$ac_save_cxx"
6088
6089
6090# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6092$as_echo_n "checking for ANSI C header files... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006093if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095else
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097/* end confdefs.h. */
6098#include <stdlib.h>
6099#include <stdarg.h>
6100#include <string.h>
6101#include <float.h>
6102
6103int
6104main ()
6105{
6106
6107 ;
6108 return 0;
6109}
6110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006111if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112 ac_cv_header_stdc=yes
6113else
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6117
6118if test $ac_cv_header_stdc = yes; then
6119 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121/* end confdefs.h. */
6122#include <string.h>
6123
6124_ACEOF
6125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006126 $EGREP "memchr" >/dev/null 2>&1; then :
6127
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006128else
6129 ac_cv_header_stdc=no
6130fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006131rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132
6133fi
6134
6135if test $ac_cv_header_stdc = yes; then
6136 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138/* end confdefs.h. */
6139#include <stdlib.h>
6140
6141_ACEOF
6142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 $EGREP "free" >/dev/null 2>&1; then :
6144
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145else
6146 ac_cv_header_stdc=no
6147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006148rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149
6150fi
6151
6152if test $ac_cv_header_stdc = yes; then
6153 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155 :
6156else
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158/* end confdefs.h. */
6159#include <ctype.h>
6160#include <stdlib.h>
6161#if ((' ' & 0x0FF) == 0x020)
6162# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6163# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6164#else
6165# define ISLOWER(c) \
6166 (('a' <= (c) && (c) <= 'i') \
6167 || ('j' <= (c) && (c) <= 'r') \
6168 || ('s' <= (c) && (c) <= 'z'))
6169# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6170#endif
6171
6172#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6173int
6174main ()
6175{
6176 int i;
6177 for (i = 0; i < 256; i++)
6178 if (XOR (islower (i), ISLOWER (i))
6179 || toupper (i) != TOUPPER (i))
6180 return 2;
6181 return 0;
6182}
6183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006184if ac_fn_c_try_run "$LINENO"; then :
6185
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186else
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191fi
6192
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193fi
6194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6196$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197if test $ac_cv_header_stdc = yes; then
6198
Matthias Kloseb9621712010-04-24 17:59:49 +00006199$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200
6201fi
6202
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006203for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6204fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006205ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006206shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006207unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006208sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6209sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006210sys/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 -08006211sys/syscall.h sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006212sys/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 +00006213sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006214bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006215do :
6216 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6217ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006218if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006219 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006220#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006221_ACEOF
6222
6223fi
6224
Guido van Rossum627b2d71993-12-24 10:39:16 +00006225done
6226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006227ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006228for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006229 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6231$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006232if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006233 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006234else
Matthias Kloseb9621712010-04-24 17:59:49 +00006235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006236/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006237#include <sys/types.h>
6238#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006239
Martin v. Löwis11437992002-04-12 09:54:03 +00006240int
6241main ()
6242{
6243if ((DIR *) 0)
6244return 0;
6245 ;
6246 return 0;
6247}
6248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006250 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006251else
Matthias Kloseb9621712010-04-24 17:59:49 +00006252 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006256eval ac_res=\$$as_ac_Header
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6258$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006259if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006260 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006261#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006262_ACEOF
6263
6264ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006265fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006266
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006267done
6268# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6269if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6271$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006272if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006273 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006274else
Martin v. Löwis11437992002-04-12 09:54:03 +00006275 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006279/* Override any GCC internal prototype to avoid an error.
6280 Use char because int might match the return type of a GCC
6281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006282#ifdef __cplusplus
6283extern "C"
6284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006285char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006286int
6287main ()
6288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006289return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006290 ;
6291 return 0;
6292}
6293_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006294for ac_lib in '' dir; do
6295 if test -z "$ac_lib"; then
6296 ac_res="none required"
6297 else
6298 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006299 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006300 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006301 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006302 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006304rm -f core conftest.err conftest.$ac_objext \
6305 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006306 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006307 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006309done
Gregory P. Smith69140482012-01-16 02:05:55 -08006310if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006312else
6313 ac_cv_search_opendir=no
6314fi
6315rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006316LIBS=$ac_func_search_save_LIBS
6317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6319$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006320ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006321if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006322 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006323
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006325
Michael W. Hudson54241132001-12-07 15:38:26 +00006326else
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6328$as_echo_n "checking for library containing opendir... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006329if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006330 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006331else
6332 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336/* Override any GCC internal prototype to avoid an error.
6337 Use char because int might match the return type of a GCC
6338 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006339#ifdef __cplusplus
6340extern "C"
6341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006342char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006343int
6344main ()
6345{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006346return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006347 ;
6348 return 0;
6349}
6350_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351for ac_lib in '' x; do
6352 if test -z "$ac_lib"; then
6353 ac_res="none required"
6354 else
6355 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006356 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006357 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006358 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006359 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006361rm -f core conftest.err conftest.$ac_objext \
6362 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08006363 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006364 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006366done
Gregory P. Smith69140482012-01-16 02:05:55 -08006367if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006369else
6370 ac_cv_search_opendir=no
6371fi
6372rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006373LIBS=$ac_func_search_save_LIBS
6374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6376$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006377ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006378if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006379 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006380
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006381fi
6382
6383fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006384
Matthias Kloseb9621712010-04-24 17:59:49 +00006385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6386$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006387if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006388 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006389else
Matthias Kloseb9621712010-04-24 17:59:49 +00006390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006391/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006392#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006393int
6394main ()
6395{
6396return makedev(0, 0);
6397 ;
6398 return 0;
6399}
6400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006402 ac_cv_header_sys_types_h_makedev=yes
6403else
Matthias Kloseb9621712010-04-24 17:59:49 +00006404 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006406rm -f core conftest.err conftest.$ac_objext \
6407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006408
6409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6411$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006412
6413if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006414ac_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 -08006415if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006416
Matthias Kloseb9621712010-04-24 17:59:49 +00006417$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006418
6419fi
6420
6421
6422
6423 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006424 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 -08006425if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006426
Matthias Kloseb9621712010-04-24 17:59:49 +00006427$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006428
6429fi
6430
6431
6432 fi
6433fi
6434
Michael W. Hudson54241132001-12-07 15:38:26 +00006435
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006436# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006437for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006438do :
6439 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006440#ifdef HAVE_CURSES_H
6441#include <curses.h>
6442#endif
6443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444"
Gregory P. Smith69140482012-01-16 02:05:55 -08006445if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006446 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006447#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006448_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006449
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006450fi
6451
6452done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006453
6454
Martin v. Löwis11017b12006-01-14 18:12:57 +00006455# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006456for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006457do :
6458 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 +00006459#ifdef HAVE_ASM_TYPES_H
6460#include <asm/types.h>
6461#endif
6462#ifdef HAVE_SYS_SOCKET_H
6463#include <sys/socket.h>
6464#endif
6465
Matthias Kloseb9621712010-04-24 17:59:49 +00006466"
Gregory P. Smith69140482012-01-16 02:05:55 -08006467if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006468 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006469#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006470_ACEOF
6471
6472fi
6473
6474done
6475
6476
Guido van Rossum627b2d71993-12-24 10:39:16 +00006477# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006478was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6480$as_echo_n "checking for clock_t in time.h... " >&6; }
6481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006482/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006484
6485_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006487 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006488 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006489else
Martin v. Löwis11437992002-04-12 09:54:03 +00006490
6491
Matthias Kloseb9621712010-04-24 17:59:49 +00006492$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006493
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006494
Guido van Rossum627b2d71993-12-24 10:39:16 +00006495fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006496rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6499$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006500
Neal Norwitz11690112002-07-30 01:08:28 +00006501# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6503$as_echo_n "checking for makedev... " >&6; }
6504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006505/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006506
Jesus Cea740f53a2010-04-28 11:35:30 +00006507#if defined(MAJOR_IN_MKDEV)
6508#include <sys/mkdev.h>
6509#elif defined(MAJOR_IN_SYSMACROS)
6510#include <sys/sysmacros.h>
6511#else
6512#include <sys/types.h>
6513#endif
6514
Neal Norwitz11690112002-07-30 01:08:28 +00006515int
6516main ()
6517{
Jesus Cea740f53a2010-04-28 11:35:30 +00006518
6519 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006520 ;
6521 return 0;
6522}
Matthias Kloseb159a552010-04-25 21:00:44 +00006523
Neal Norwitz11690112002-07-30 01:08:28 +00006524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006525if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006526 ac_cv_has_makedev=yes
6527else
Matthias Kloseb9621712010-04-24 17:59:49 +00006528 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006530rm -f core conftest.err conftest.$ac_objext \
6531 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006532if test "$ac_cv_has_makedev" = "no"; then
6533 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006535/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006536
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006537#define _OSF_SOURCE 1
6538#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006539
Neal Norwitz11690112002-07-30 01:08:28 +00006540int
6541main ()
6542{
6543 makedev(0, 0)
6544 ;
6545 return 0;
6546}
6547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006548if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006549 ac_cv_has_makedev=yes
6550else
Matthias Kloseb9621712010-04-24 17:59:49 +00006551 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006553rm -f core conftest.err conftest.$ac_objext \
6554 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006555 if test "$ac_cv_has_makedev" = "yes"; then
6556
Matthias Kloseb9621712010-04-24 17:59:49 +00006557$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006558
6559 fi
6560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6562$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006563if test "$ac_cv_has_makedev" = "yes"; then
6564
Matthias Kloseb9621712010-04-24 17:59:49 +00006565$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006566
6567fi
6568
Martin v. Löwis399a6892002-10-04 10:22:02 +00006569# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6570# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6571# defined, but the compiler does not support pragma redefine_extname,
6572# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6573# structures (such as rlimit64) without declaring them. As a
6574# work-around, disable LFS on such configurations
6575
6576use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6578$as_echo_n "checking Solaris LFS bug... " >&6; }
6579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006580/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006581
6582#define _LARGEFILE_SOURCE 1
6583#define _FILE_OFFSET_BITS 64
6584#include <sys/resource.h>
6585
Martin v. Löwis399a6892002-10-04 10:22:02 +00006586int
6587main ()
6588{
6589struct rlimit foo;
6590 ;
6591 return 0;
6592}
6593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006595 sol_lfs_bug=no
6596else
Matthias Kloseb9621712010-04-24 17:59:49 +00006597 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6601$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006602if test "$sol_lfs_bug" = "yes"; then
6603 use_lfs=no
6604fi
6605
6606if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006607# Two defines needed to enable largefile support on various platforms
6608# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006609case $ac_sys_system/$ac_sys_release in
6610AIX*)
6611
6612$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6613
6614 ;;
6615esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006616
Matthias Kloseb9621712010-04-24 17:59:49 +00006617$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006618
6619
Matthias Kloseb9621712010-04-24 17:59:49 +00006620$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006621
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006623
Guido van Rossum84e7b241996-08-19 21:59:00 +00006624# Add some code to confdefs.h so that the test for off_t works on SCO
6625cat >> confdefs.h <<\EOF
6626#if defined(SCO_DS)
6627#undef _OFF_T
6628#endif
6629EOF
6630
Guido van Rossumef2255b2000-03-10 22:30:29 +00006631# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006632ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006633if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006634
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006635else
Martin v. Löwis11437992002-04-12 09:54:03 +00006636
6637cat >>confdefs.h <<_ACEOF
6638#define mode_t int
6639_ACEOF
6640
6641fi
6642
Matthias Kloseb9621712010-04-24 17:59:49 +00006643ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006644if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006646else
Martin v. Löwis11437992002-04-12 09:54:03 +00006647
6648cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006649#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
6651
6652fi
6653
Matthias Kloseb9621712010-04-24 17:59:49 +00006654ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006655if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006656
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006657else
Martin v. Löwis11437992002-04-12 09:54:03 +00006658
6659cat >>confdefs.h <<_ACEOF
6660#define pid_t int
6661_ACEOF
6662
6663fi
6664
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006667#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006668_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006669
Matthias Kloseb9621712010-04-24 17:59:49 +00006670ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006671if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006672
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006673else
Martin v. Löwis11437992002-04-12 09:54:03 +00006674
6675cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006676#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006677_ACEOF
6678
6679fi
6680
Matthias Kloseb9621712010-04-24 17:59:49 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6682$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006683if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006685else
Matthias Kloseb9621712010-04-24 17:59:49 +00006686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006687/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006688#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006689
6690_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006693 ac_cv_type_uid_t=yes
6694else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006695 ac_cv_type_uid_t=no
6696fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006697rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006698
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6701$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006702if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006703
Matthias Kloseb9621712010-04-24 17:59:49 +00006704$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006705
6706
Matthias Kloseb9621712010-04-24 17:59:49 +00006707$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708
6709fi
6710
Matthias Kloseb9621712010-04-24 17:59:49 +00006711ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6712case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006713 no|yes) ;; #(
6714 *)
6715
Matthias Kloseb9621712010-04-24 17:59:49 +00006716$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006717
6718
6719cat >>confdefs.h <<_ACEOF
6720#define uint32_t $ac_cv_c_uint32_t
6721_ACEOF
6722;;
6723 esac
6724
Matthias Kloseb9621712010-04-24 17:59:49 +00006725ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6726case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006727 no|yes) ;; #(
6728 *)
6729
Matthias Kloseb9621712010-04-24 17:59:49 +00006730$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006731
6732
6733cat >>confdefs.h <<_ACEOF
6734#define uint64_t $ac_cv_c_uint64_t
6735_ACEOF
6736;;
6737 esac
6738
Matthias Kloseb9621712010-04-24 17:59:49 +00006739ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6740case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006741 no|yes) ;; #(
6742 *)
6743
6744cat >>confdefs.h <<_ACEOF
6745#define int32_t $ac_cv_c_int32_t
6746_ACEOF
6747;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006748esac
6749
Matthias Kloseb9621712010-04-24 17:59:49 +00006750ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6751case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006752 no|yes) ;; #(
6753 *)
6754
6755cat >>confdefs.h <<_ACEOF
6756#define int64_t $ac_cv_c_int64_t
6757_ACEOF
6758;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006759esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006760
Matthias Kloseb9621712010-04-24 17:59:49 +00006761ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -08006762if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006763
Matthias Kloseb9621712010-04-24 17:59:49 +00006764$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006765
6766fi
6767
Jack Jansendd19cf82001-12-06 22:36:17 +00006768
Michael W. Hudson54241132001-12-07 15:38:26 +00006769# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006770# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771# The cast to long int works around a bug in the HP C Compiler
6772# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6773# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6774# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6776$as_echo_n "checking size of int... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006777if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006779else
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 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 +00006781
Martin v. Löwis11437992002-04-12 09:54:03 +00006782else
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 if test "$ac_cv_type_int" = yes; then
6784 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006786as_fn_error 77 "cannot compute sizeof (int)
Gregory P. Smith69140482012-01-16 02:05:55 -08006787See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006788 else
6789 ac_cv_sizeof_int=0
6790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6795$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006796
6797
6798
Martin v. Löwis11437992002-04-12 09:54:03 +00006799cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006800#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006801_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006802
6803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006804# The cast to long int works around a bug in the HP C Compiler
6805# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6806# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6807# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6809$as_echo_n "checking size of long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006810if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006812else
Matthias Kloseb9621712010-04-24 17:59:49 +00006813 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 +00006814
Martin v. Löwis11437992002-04-12 09:54:03 +00006815else
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 if test "$ac_cv_type_long" = yes; then
6817 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006819as_fn_error 77 "cannot compute sizeof (long)
Gregory P. Smith69140482012-01-16 02:05:55 -08006820See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006821 else
6822 ac_cv_sizeof_long=0
6823 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6828$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006829
6830
6831
Martin v. Löwis11437992002-04-12 09:54:03 +00006832cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006833#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006834_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006835
6836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006837# The cast to long int works around a bug in the HP C Compiler
6838# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6839# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6840# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6842$as_echo_n "checking size of void *... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006843if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006845else
Matthias Kloseb9621712010-04-24 17:59:49 +00006846 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 +00006847
Martin v. Löwis11437992002-04-12 09:54:03 +00006848else
Matthias Kloseb9621712010-04-24 17:59:49 +00006849 if test "$ac_cv_type_void_p" = yes; then
6850 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006852as_fn_error 77 "cannot compute sizeof (void *)
Gregory P. Smith69140482012-01-16 02:05:55 -08006853See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854 else
6855 ac_cv_sizeof_void_p=0
6856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6861$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006862
6863
6864
Martin v. Löwis11437992002-04-12 09:54:03 +00006865cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006866#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006867_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006868
6869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006870# The cast to long int works around a bug in the HP C Compiler
6871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6875$as_echo_n "checking size of short... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006876if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006878else
Matthias Kloseb9621712010-04-24 17:59:49 +00006879 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 +00006880
Martin v. Löwis11437992002-04-12 09:54:03 +00006881else
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 if test "$ac_cv_type_short" = yes; then
6883 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006885as_fn_error 77 "cannot compute sizeof (short)
Gregory P. Smith69140482012-01-16 02:05:55 -08006886See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887 else
6888 ac_cv_sizeof_short=0
6889 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6894$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895
6896
6897
Martin v. Löwis11437992002-04-12 09:54:03 +00006898cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006899#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006900_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006901
6902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903# The cast to long int works around a bug in the HP C Compiler
6904# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6905# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6906# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6908$as_echo_n "checking size of float... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006909if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006910 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006911else
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 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 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914else
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 if test "$ac_cv_type_float" = yes; then
6916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006918as_fn_error 77 "cannot compute sizeof (float)
Gregory P. Smith69140482012-01-16 02:05:55 -08006919See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920 else
6921 ac_cv_sizeof_float=0
6922 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006924
Martin v. Löwis11437992002-04-12 09:54:03 +00006925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6927$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006928
6929
6930
Martin v. Löwis11437992002-04-12 09:54:03 +00006931cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006932#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006933_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006934
6935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006936# The cast to long int works around a bug in the HP C Compiler
6937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6939# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6941$as_echo_n "checking size of double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006942if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006943 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006944else
Matthias Kloseb9621712010-04-24 17:59:49 +00006945 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 +00006946
Martin v. Löwis11437992002-04-12 09:54:03 +00006947else
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 if test "$ac_cv_type_double" = yes; then
6949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006951as_fn_error 77 "cannot compute sizeof (double)
Gregory P. Smith69140482012-01-16 02:05:55 -08006952See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006953 else
6954 ac_cv_sizeof_double=0
6955 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6960$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006961
6962
6963
Martin v. Löwis11437992002-04-12 09:54:03 +00006964cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006965#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006966_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006967
6968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006969# The cast to long int works around a bug in the HP C Compiler
6970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6972# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6974$as_echo_n "checking size of fpos_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08006975if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006976 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006977else
Matthias Kloseb9621712010-04-24 17:59:49 +00006978 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 +00006979
Martin v. Löwis11437992002-04-12 09:54:03 +00006980else
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 if test "$ac_cv_type_fpos_t" = yes; then
6982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006984as_fn_error 77 "cannot compute sizeof (fpos_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08006985See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006986 else
6987 ac_cv_sizeof_fpos_t=0
6988 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006990
Martin v. Löwis11437992002-04-12 09:54:03 +00006991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6993$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006994
6995
6996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006998#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006999_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007000
Michael W. Hudson54241132001-12-07 15:38:26 +00007001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002# The cast to long int works around a bug in the HP C Compiler
7003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7005# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7007$as_echo_n "checking size of size_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007008if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007009 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007010else
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 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 +00007012
Martin v. Löwis18e16552006-02-15 17:27:45 +00007013else
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 if test "$ac_cv_type_size_t" = yes; then
7015 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007017as_fn_error 77 "cannot compute sizeof (size_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007018See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019 else
7020 ac_cv_sizeof_size_t=0
7021 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007023
Martin v. Löwis18e16552006-02-15 17:27:45 +00007024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7026$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027
7028
7029
Martin v. Löwis18e16552006-02-15 17:27:45 +00007030cat >>confdefs.h <<_ACEOF
7031#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7032_ACEOF
7033
7034
Christian Heimes400adb02008-02-01 08:12:03 +00007035# The cast to long int works around a bug in the HP C Compiler
7036# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7037# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7038# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7040$as_echo_n "checking size of pid_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007041if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007042 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 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 +00007045
Christian Heimes400adb02008-02-01 08:12:03 +00007046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 if test "$ac_cv_type_pid_t" = yes; then
7048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007050as_fn_error 77 "cannot compute sizeof (pid_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007051See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007052 else
7053 ac_cv_sizeof_pid_t=0
7054 fi
7055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056
Christian Heimes400adb02008-02-01 08:12:03 +00007057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7059$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007060
7061
7062
7063cat >>confdefs.h <<_ACEOF
7064#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7065_ACEOF
7066
7067
Michael W. Hudson54241132001-12-07 15:38:26 +00007068
Matthias Kloseb9621712010-04-24 17:59:49 +00007069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7070$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007071have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007073/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007074
Martin v. Löwis11437992002-04-12 09:54:03 +00007075int
7076main ()
7077{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007078long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007079 ;
7080 return 0;
7081}
7082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007084
7085
Matthias Kloseb9621712010-04-24 17:59:49 +00007086$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007087
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007088 have_long_long=yes
7089
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7093$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007094if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095# The cast to long int works around a bug in the HP C Compiler
7096# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7097# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7098# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7100$as_echo_n "checking size of long long... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007101if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007103else
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 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 +00007105
Martin v. Löwis11437992002-04-12 09:54:03 +00007106else
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 if test "$ac_cv_type_long_long" = yes; then
7108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007110as_fn_error 77 "cannot compute sizeof (long long)
Gregory P. Smith69140482012-01-16 02:05:55 -08007111See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112 else
7113 ac_cv_sizeof_long_long=0
7114 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007116
Martin v. Löwis11437992002-04-12 09:54:03 +00007117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7119$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007120
7121
7122
Martin v. Löwis11437992002-04-12 09:54:03 +00007123cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007124#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007125_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007126
Michael W. Hudson54241132001-12-07 15:38:26 +00007127
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007128fi
7129
Matthias Kloseb9621712010-04-24 17:59:49 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7131$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007132have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007134/* end confdefs.h. */
7135
7136int
7137main ()
7138{
7139long double x; x = (long double)0;
7140 ;
7141 return 0;
7142}
7143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007144if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007145
7146
Matthias Kloseb9621712010-04-24 17:59:49 +00007147$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007148
7149 have_long_double=yes
7150
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007151fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7154$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007155if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007156# The cast to long int works around a bug in the HP C Compiler
7157# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7158# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7159# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7161$as_echo_n "checking size of long double... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007162if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 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 +00007166
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007167else
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 if test "$ac_cv_type_long_double" = yes; then
7169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007171as_fn_error 77 "cannot compute sizeof (long double)
Gregory P. Smith69140482012-01-16 02:05:55 -08007172See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007173 else
7174 ac_cv_sizeof_long_double=0
7175 fi
7176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007177
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7180$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007181
7182
7183
7184cat >>confdefs.h <<_ACEOF
7185#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7186_ACEOF
7187
7188
7189fi
7190
7191
Matthias Kloseb9621712010-04-24 17:59:49 +00007192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7193$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007194have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007196/* end confdefs.h. */
7197
7198int
7199main ()
7200{
7201_Bool x; x = (_Bool)0;
7202 ;
7203 return 0;
7204}
7205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007206if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007207
7208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007210
7211 have_c99_bool=yes
7212
Thomas Woutersb2137042007-02-01 18:02:27 +00007213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7216$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007217if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007218# The cast to long int works around a bug in the HP C Compiler
7219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7221# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7223$as_echo_n "checking size of _Bool... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007224if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 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 +00007228
Thomas Woutersb2137042007-02-01 18:02:27 +00007229else
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 if test "$ac_cv_type__Bool" = yes; then
7231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007233as_fn_error 77 "cannot compute sizeof (_Bool)
Gregory P. Smith69140482012-01-16 02:05:55 -08007234See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007235 else
7236 ac_cv_sizeof__Bool=0
7237 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239
Thomas Woutersb2137042007-02-01 18:02:27 +00007240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7242$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007243
7244
7245
Thomas Woutersb2137042007-02-01 18:02:27 +00007246cat >>confdefs.h <<_ACEOF
7247#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7248_ACEOF
7249
7250
7251fi
7252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007254 #include <stdint.h>
7255 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007256 #ifdef HAVE_INTTYPES_H
7257 #include <inttypes.h>
7258 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007259"
Gregory P. Smith69140482012-01-16 02:05:55 -08007260if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007261
7262cat >>confdefs.h <<_ACEOF
7263#define HAVE_UINTPTR_T 1
7264_ACEOF
7265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007266# The cast to long int works around a bug in the HP C Compiler
7267# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7268# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7269# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7271$as_echo_n "checking size of uintptr_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007272if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007273 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007274else
Matthias Kloseb9621712010-04-24 17:59:49 +00007275 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 +00007276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277else
Matthias Kloseb9621712010-04-24 17:59:49 +00007278 if test "$ac_cv_type_uintptr_t" = yes; then
7279 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7280$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007281as_fn_error 77 "cannot compute sizeof (uintptr_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007282See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007283 else
7284 ac_cv_sizeof_uintptr_t=0
7285 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007287
Martin v. Löwis11437992002-04-12 09:54:03 +00007288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7290$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007291
7292
7293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007295#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007296_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007297
Michael W. Hudson54241132001-12-07 15:38:26 +00007298
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007299fi
7300
Thomas Wouters89f507f2006-12-13 04:49:30 +00007301
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007302# The cast to long int works around a bug in the HP C Compiler
7303# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7304# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7305# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7307$as_echo_n "checking size of off_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007308if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310else
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007312#ifdef HAVE_SYS_TYPES_H
7313#include <sys/types.h>
7314#endif
7315
Matthias Kloseb9621712010-04-24 17:59:49 +00007316"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007318else
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 if test "$ac_cv_type_off_t" = yes; then
7320 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7321$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007322as_fn_error 77 "cannot compute sizeof (off_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007323See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007324 else
7325 ac_cv_sizeof_off_t=0
7326 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7331$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007332
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333
7334
Martin v. Löwis11437992002-04-12 09:54:03 +00007335cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007336#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007337_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007338
Michael W. Hudson54241132001-12-07 15:38:26 +00007339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007340
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7342$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007343if test "$have_long_long" = yes
7344then
7345if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007346 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007347
Matthias Kloseb9621712010-04-24 17:59:49 +00007348$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007349
Matthias Kloseb9621712010-04-24 17:59:49 +00007350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7351$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007352else
Matthias Kloseb9621712010-04-24 17:59:49 +00007353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007355fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007356else
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007359fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361# The cast to long int works around a bug in the HP C Compiler
7362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7364# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7366$as_echo_n "checking size of time_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007367if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007368 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007369else
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007371#ifdef HAVE_SYS_TYPES_H
7372#include <sys/types.h>
7373#endif
7374#ifdef HAVE_TIME_H
7375#include <time.h>
7376#endif
7377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007379
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007380else
Matthias Kloseb9621712010-04-24 17:59:49 +00007381 if test "$ac_cv_type_time_t" = yes; then
7382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007384as_fn_error 77 "cannot compute sizeof (time_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007385See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007386 else
7387 ac_cv_sizeof_time_t=0
7388 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007390
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7393$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007394
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007395
7396
Martin v. Löwis11437992002-04-12 09:54:03 +00007397cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007398#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007399_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007400
Michael W. Hudson54241132001-12-07 15:38:26 +00007401
7402
Trent Mick635f6fb2000-08-23 21:33:05 +00007403# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007404ac_save_cc="$CC"
7405if test "$ac_cv_kpthread" = "yes"
7406then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007407elif test "$ac_cv_kthread" = "yes"
7408then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007409elif test "$ac_cv_pthread" = "yes"
7410then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007411fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7414$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007415have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007417/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007418
7419 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007420int
7421main ()
7422{
Guido van Rossum12580492000-09-24 16:47:19 +00007423pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007424 ;
7425 return 0;
7426}
Matthias Kloseb159a552010-04-25 21:00:44 +00007427
Martin v. Löwis11437992002-04-12 09:54:03 +00007428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007429if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007430 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7434$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007435if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007437# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7438# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7439# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7441$as_echo_n "checking size of pthread_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007442if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007444else
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007446#ifdef HAVE_PTHREAD_H
7447#include <pthread.h>
7448#endif
7449
Matthias Kloseb9621712010-04-24 17:59:49 +00007450"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007451
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007452else
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 if test "$ac_cv_type_pthread_t" = yes; then
7454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007456as_fn_error 77 "cannot compute sizeof (pthread_t)
Gregory P. Smith69140482012-01-16 02:05:55 -08007457See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007458 else
7459 ac_cv_sizeof_pthread_t=0
7460 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007462
Trent Mick635f6fb2000-08-23 21:33:05 +00007463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7465$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007466
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007467
7468
Martin v. Löwis11437992002-04-12 09:54:03 +00007469cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007470#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007471_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007472
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007473
Trent Mick635f6fb2000-08-23 21:33:05 +00007474fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007475CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007476
Michael W. Hudson54241132001-12-07 15:38:26 +00007477
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007478case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007479 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007480 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7481 ;;
7482 Darwin/*)
7483 OTHER_LIBTOOL_OPT=""
7484 ;;
7485esac
7486
7487
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007488ARCH_RUN_32BIT=""
7489
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007490case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007491 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007492 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7493 if test "${enable_universalsdk}"; then
7494 :
7495 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007496 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007497 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007499 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007500 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007501 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007502 if test ${gcc_version} '<' 4.0
7503 then
7504 LIBTOOL_CRUFT="-lcc_dynamic"
7505 else
7506 LIBTOOL_CRUFT=""
7507 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007509 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007510else
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007512/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007513
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007514 #include <unistd.h>
7515 int main(int argc, char*argv[])
7516 {
7517 if (sizeof(long) == 4) {
7518 return 0;
7519 } else {
7520 return 1;
7521 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007522 }
7523
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007525if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007526 ac_osx_32bit=yes
7527else
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7531 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007532fi
7533
7534
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007535 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007536 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007537 i386)
7538 MACOSX_DEFAULT_ARCH="i386"
7539 ;;
7540 ppc)
7541 MACOSX_DEFAULT_ARCH="ppc"
7542 ;;
7543 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007544 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007545 ;;
7546 esac
7547 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007548 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007549 i386)
7550 MACOSX_DEFAULT_ARCH="x86_64"
7551 ;;
7552 ppc)
7553 MACOSX_DEFAULT_ARCH="ppc64"
7554 ;;
7555 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007556 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007557 ;;
7558 esac
7559
7560 #ARCH_RUN_32BIT="true"
7561 fi
7562
7563 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007564 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007565 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007566esac
7567
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7569$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007570if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007571then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007572 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007573 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007574 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007575
Matthias Kloseb9621712010-04-24 17:59:49 +00007576$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007577
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7579$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007580 if test $enable_shared = "yes"
7581 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007582 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 +00007583 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007584else
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7586$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007587fi
7588
Matthias Kloseb9621712010-04-24 17:59:49 +00007589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7590$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007591case $ac_sys_system/$ac_sys_release in
7592 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007593
Matthias Kloseb9621712010-04-24 17:59:49 +00007594$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007595
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7597$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007598 ;;
7599 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7601$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007602 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007603esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007604
Guido van Rossum0a516c91994-09-12 10:58:40 +00007605# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007606
Michael W. Hudson54241132001-12-07 15:38:26 +00007607
7608
7609
7610
Benjamin Peterson99f03762010-04-11 22:15:28 +00007611
Thomas Wouters477c8d52006-05-27 19:21:47 +00007612
Georg Brandlb1441c72009-01-03 22:33:39 +00007613
Thomas Wouters477c8d52006-05-27 19:21:47 +00007614cat >>confdefs.h <<_ACEOF
7615#define SHLIB_EXT "$SO"
7616_ACEOF
7617
Guido van Rossum0a516c91994-09-12 10:58:40 +00007618# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007619# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007620# (Shared libraries in this instance are shared modules to be loaded into
7621# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7623$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007624if test -z "$LDSHARED"
7625then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007626 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007627 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007628 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007629 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007630 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007631 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007632 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007634 if test "$GCC" = "yes" ; then
7635 LDSHARED='$(CC) -shared'
7636 LDCXXSHARED='$(CXX) -shared'
7637 else
7638 LDSHARED='$(CC) -G'
7639 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007640 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007641 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007642 if test "$GCC" = "yes" ; then
7643 LDSHARED='$(CC) -shared'
7644 LDCXXSHARED='$(CXX) -shared'
7645 else
7646 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007647 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007648 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007649 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007650 LDSHARED='$(CC) -bundle'
7651 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007652 if test "$enable_framework" ; then
7653 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007654 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7655 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007656 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007657 else
7658 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007659 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007660 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007661 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007662 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007663 LDSHARED='$(CC) -bundle'
7664 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007665 if test "$enable_framework" ; then
7666 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007667 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7668 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007669 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007670 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007671 # No framework, use the Python app as bundle-loader
7672 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007673 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007674 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007675 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007676 Darwin/*)
7677 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7678 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007679
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007680 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007681 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007682 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007683 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007684 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007685 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7686 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007687 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007688 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007689 LDSHARED='$(CC) -bundle'
7690 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007691 if test "$enable_framework" ; then
7692 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007693 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7694 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007695 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007696 else
7697 # No framework, use the Python app as bundle-loader
7698 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7699 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007700 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007701 fi
7702 fi
7703 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007704 Linux*|GNU*|QNX*)
7705 LDSHARED='$(CC) -shared'
7706 LDCXXSHARED='$(CXX) -shared';;
7707 BSD/OS*/4*)
7708 LDSHARED="gcc -shared"
7709 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007710 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007711 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007712 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007713 LDSHARED='$(CC) -shared'
7714 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007715 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007716 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007717 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007718 OpenBSD*)
7719 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7720 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007721 LDSHARED='$(CC) -shared $(CCSHARED)'
7722 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007723 else
7724 case `uname -r` in
7725 [01].* | 2.[0-7] | 2.[0-7].*)
7726 LDSHARED="ld -Bshareable ${LDFLAGS}"
7727 ;;
7728 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007729 LDSHARED='$(CC) -shared $(CCSHARED)'
7730 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007731 ;;
7732 esac
7733 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007734 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007735 LDSHARED='$(CC) -shared'
7736 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007737 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007738 if test "$GCC" = "yes" ; then
7739 LDSHARED='$(CC) -shared'
7740 LDCXXSHARED='$(CXX) -shared'
7741 else
7742 LDSHARED='$(CC) -G'
7743 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007744 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007745 SCO_SV*)
7746 LDSHARED='$(CC) -Wl,-G,-Bexport'
7747 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7748 CYGWIN*)
7749 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7750 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007751 *) LDSHARED="ld";;
7752 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7755$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007756LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007757BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007758# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007759# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7761$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007762if test -z "$CCSHARED"
7763then
Guido van Rossum07397971997-04-29 21:49:50 +00007764 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007765 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007766 then CCSHARED="-fPIC";
7767 elif test `uname -p` = sparc;
7768 then CCSHARED="-xcode=pic32";
7769 else CCSHARED="-Kpic";
7770 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007771 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007772 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007773 else CCSHARED="+z";
7774 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007775 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007776 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007777 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007778 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007779 if test "$GCC" = "yes"
7780 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007781 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007782 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007783 SCO_SV*)
7784 if test "$GCC" = "yes"
7785 then CCSHARED="-fPIC"
7786 else CCSHARED="-Kpic -belf"
7787 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007788 IRIX*/6*) case $CC in
7789 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007790 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007791 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007792 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7795$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007796# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007797# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7799$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007800if test -z "$LINKFORSHARED"
7801then
Guido van Rossum07397971997-04-29 21:49:50 +00007802 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007803 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007804 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007805 LINKFORSHARED="-Wl,-E -Wl,+s";;
7806# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007807 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007808 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007809 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007811 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007812 if test "$enable_framework"
7813 then
Jack Jansenda49e192005-01-07 13:08:22 +00007814 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007815 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007816 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007817 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007818 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007819 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007820 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007821 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7822 then
7823 LINKFORSHARED="-Wl,--export-dynamic"
7824 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007825 SunOS/5*) case $CC in
7826 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007827 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007828 then
7829 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007830 fi;;
7831 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007832 CYGWIN*)
7833 if test $enable_shared = "no"
7834 then
7835 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7836 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007837 QNX*)
7838 # -Wl,-E causes the symbols to be added to the dynamic
7839 # symbol table so that they can be found when a module
7840 # is loaded. -N 2048K causes the stack size to be set
7841 # to 2048 kilobytes so that the stack doesn't overflow
7842 # when running test_compile.py.
7843 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007844 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7847$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007848
Michael W. Hudson54241132001-12-07 15:38:26 +00007849
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007850
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7852$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007853if test ! "$LIBRARY" = "$LDLIBRARY"
7854then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007855 case $ac_sys_system in
7856 CYGWIN*)
7857 # Cygwin needs CCSHARED when building extension DLLs
7858 # but not when building the interpreter DLL.
7859 CFLAGSFORSHARED='';;
7860 *)
7861 CFLAGSFORSHARED='$(CCSHARED)'
7862 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7865$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007866
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007867# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7868# library (with --enable-shared).
7869# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007870# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7871# if it is not required, since it creates a dependency of the shared library
7872# to LIBS. This, in turn, means that applications linking the shared libpython
7873# don't need to link LIBS explicitly. The default should be only changed
7874# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007875
Matthias Kloseb9621712010-04-24 17:59:49 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7877$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007878case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007879 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007880 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007881esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7883$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007884
7885
Guido van Rossum627b2d71993-12-24 10:39:16 +00007886# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7888$as_echo_n "checking for dlopen in -ldl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007889if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891else
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007893LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897/* Override any GCC internal prototype to avoid an error.
7898 Use char because int might match the return type of a GCC
7899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007900#ifdef __cplusplus
7901extern "C"
7902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007903char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007904int
7905main ()
7906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 ;
7909 return 0;
7910}
7911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007913 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007914else
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007917rm -f core conftest.err conftest.$ac_objext \
7918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007919LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7922$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007923if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 cat >>confdefs.h <<_ACEOF
7925#define HAVE_LIBDL 1
7926_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007927
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007928 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007929
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007930fi
7931 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7933$as_echo_n "checking for shl_load in -ldld... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007934if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007936else
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007938LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942/* Override any GCC internal prototype to avoid an error.
7943 Use char because int might match the return type of a GCC
7944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007945#ifdef __cplusplus
7946extern "C"
7947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007948char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007949int
7950main ()
7951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 ;
7954 return 0;
7955}
7956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007957if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007959else
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962rm -f core conftest.err conftest.$ac_objext \
7963 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007964LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7967$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007968if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 cat >>confdefs.h <<_ACEOF
7970#define HAVE_LIBDLD 1
7971_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007972
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007973 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007974
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007975fi
7976 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007977
Georg Brandlb1441c72009-01-03 22:33:39 +00007978# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007979if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7981$as_echo_n "checking for library containing sem_init... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08007982if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007984else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007985 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989/* Override any GCC internal prototype to avoid an error.
7990 Use char because int might match the return type of a GCC
7991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007992#ifdef __cplusplus
7993extern "C"
7994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007995char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007996int
7997main ()
7998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ;
8001 return 0;
8002}
8003_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004for ac_lib in '' pthread rt posix4; do
8005 if test -z "$ac_lib"; then
8006 ac_res="none required"
8007 else
8008 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008009 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008014rm -f core conftest.err conftest.$ac_objext \
8015 conftest$ac_exeext
Gregory P. Smith69140482012-01-16 02:05:55 -08008016 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019done
Gregory P. Smith69140482012-01-16 02:05:55 -08008020if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022else
8023 ac_cv_search_sem_init=no
8024fi
8025rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008026LIBS=$ac_func_search_save_LIBS
8027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8029$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008031if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008033
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008034fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008035 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008036 # posix4 on Solaris 2.6
8037 # pthread (first!) on Linux
8038fi
8039
Martin v. Löwis19d17342003-06-14 21:03:05 +00008040# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8042$as_echo_n "checking for textdomain in -lintl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008043if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008045else
8046 ac_check_lib_save_LIBS=$LIBS
8047LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008049/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051/* Override any GCC internal prototype to avoid an error.
8052 Use char because int might match the return type of a GCC
8053 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008054#ifdef __cplusplus
8055extern "C"
8056#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008057char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008058int
8059main ()
8060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008062 ;
8063 return 0;
8064}
8065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008066if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008067 ac_cv_lib_intl_textdomain=yes
8068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008071rm -f core conftest.err conftest.$ac_objext \
8072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008073LIBS=$ac_check_lib_save_LIBS
8074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8076$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008077if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008080
Brett Cannonc6d936e2009-06-07 20:09:53 +00008081 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008082fi
8083
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008084
8085# checks for system dependent C++ extensions support
8086case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8088$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008091
Georg Brandl59e87bd2011-02-15 19:48:59 +00008092 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008093int
8094main ()
8095{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008096loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ;
8098 return 0;
8099}
Matthias Kloseb159a552010-04-25 21:00:44 +00008100
Martin v. Löwis11437992002-04-12 09:54:03 +00008101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008102if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008103
Matthias Kloseb159a552010-04-25 21:00:44 +00008104
Matthias Kloseb9621712010-04-24 17:59:49 +00008105$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008106
Matthias Kloseb159a552010-04-25 21:00:44 +00008107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008108$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008109
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008110else
Matthias Kloseb159a552010-04-25 21:00:44 +00008111
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008113$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008114
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116rm -f core conftest.err conftest.$ac_objext \
8117 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008118 *) ;;
8119esac
8120
Guido van Rossum70c7f481998-03-26 18:44:10 +00008121# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8123$as_echo_n "checking for t_open in -lnsl... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008124if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008126else
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008128LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132/* Override any GCC internal prototype to avoid an error.
8133 Use char because int might match the return type of a GCC
8134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008135#ifdef __cplusplus
8136extern "C"
8137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008138char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008139int
8140main ()
8141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 ;
8144 return 0;
8145}
8146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008149else
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008152rm -f core conftest.err conftest.$ac_objext \
8153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008154LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8157$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008158if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008159 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008160fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008161 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8163$as_echo_n "checking for socket in -lsocket... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008164if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008165 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008166else
Martin v. Löwis11437992002-04-12 09:54:03 +00008167 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008168LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172/* Override any GCC internal prototype to avoid an error.
8173 Use char because int might match the return type of a GCC
8174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008175#ifdef __cplusplus
8176extern "C"
8177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008178char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008179int
8180main ()
8181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008182return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 ;
8184 return 0;
8185}
8186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008187if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008188 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008189else
Matthias Kloseb9621712010-04-24 17:59:49 +00008190 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008192rm -f core conftest.err conftest.$ac_objext \
8193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008194LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8197$as_echo "$ac_cv_lib_socket_socket" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008198if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008199 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008200fi
8201 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008202
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8204$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008207if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8210$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008211LIBS="$withval $LIBS"
8212
8213else
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008216fi
8217
Guido van Rossum7f43da71994-08-01 12:15:30 +00008218
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008219if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008220 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8221set dummy ${ac_tool_prefix}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_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 $PKG_CONFIG in
8228 [\\/]* | ?:[\\/]*)
8229 ac_cv_path_PKG_CONFIG="$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_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
8250PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8251if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8253$as_echo "$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
8260fi
8261if test -z "$ac_cv_path_PKG_CONFIG"; then
8262 ac_pt_PKG_CONFIG=$PKG_CONFIG
8263 # Extract the first word of "pkg-config", so it can be a program name with args.
8264set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8266$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008267if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008269else
8270 case $ac_pt_PKG_CONFIG in
8271 [\\/]* | ?:[\\/]*)
8272 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8273 ;;
8274 *)
8275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8276for as_dir in $PATH
8277do
8278 IFS=$as_save_IFS
8279 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008281 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8282 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008284 break 2
8285 fi
8286done
Matthias Kloseb9621712010-04-24 17:59:49 +00008287 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008288IFS=$as_save_IFS
8289
8290 ;;
8291esac
8292fi
8293ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8294if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8296$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008297else
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8299$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008300fi
8301
8302 if test "x$ac_pt_PKG_CONFIG" = x; then
8303 PKG_CONFIG=""
8304 else
8305 case $cross_compiling:$ac_tool_warned in
8306yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8308$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008309ac_tool_warned=yes ;;
8310esac
8311 PKG_CONFIG=$ac_pt_PKG_CONFIG
8312 fi
8313else
8314 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8315fi
8316
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008317
8318# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8320$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008321
8322# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008323if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008324 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008325else
8326 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008327fi
8328
8329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8331$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008332
8333# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8335$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008336
8337# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008338if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008339 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008340else
8341 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008342fi
8343
8344
8345if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008346 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8347else
8348 LIBFFI_INCLUDEDIR=""
8349fi
8350
8351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8353$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008354
Benjamin Peterson076ed002010-10-31 17:11:02 +00008355# Check for support for loadable sqlite extensions
8356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8357$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8358# Check whether --enable-loadable-sqlite-extensions was given.
8359if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8360 enableval=$enable_loadable_sqlite_extensions;
8361else
8362 enable_loadable_sqlite_extensions="no"
8363fi
8364
8365
8366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8367$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8368
Matthias Klose55708cc2009-04-30 08:06:49 +00008369# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8371$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008372
8373# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008374if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008375 withval=$with_dbmliborder;
8376if test x$with_dbmliborder = xyes
8377then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008378as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008379else
8380 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8381 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8382 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008383 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008384 fi
8385 done
8386fi
8387fi
8388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8390$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008391
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008392# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008393
8394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8396$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008399if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400 withval=$with_signal_module;
8401fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008402
8403
8404if test -z "$with_signal_module"
8405then with_signal_module="yes"
8406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8408$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008409
8410if test "${with_signal_module}" = "yes"; then
8411 USE_SIGNAL_MODULE=""
8412 SIGNAL_OBJS=""
8413else
8414 USE_SIGNAL_MODULE="#"
8415 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8416fi
8417
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008418# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008419
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008420USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008421
Matthias Kloseb9621712010-04-24 17:59:49 +00008422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8423$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008424
Guido van Rossumec2f0731997-01-22 20:54:01 +00008425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008427if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8430$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008431LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008432if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008433 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008434fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008435else
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8437$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438fi
8439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
8441# Templates for things AC_DEFINEd more than once.
8442# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008443
8444
Martin v. Löwis11437992002-04-12 09:54:03 +00008445
8446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8448$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008451if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452 withval=$with_threads;
8453fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008454
8455
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008456# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008459if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460 withval=$with_thread; with_threads=$with_thread
8461fi
8462
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008463
8464if test -z "$with_threads"
8465then with_threads="yes"
8466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8468$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008469
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008470
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008471if test "$with_threads" = "no"
8472then
8473 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008474elif test "$ac_cv_pthread_is_default" = yes
8475then
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008477
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008478 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008480
8481 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008483elif test "$ac_cv_kpthread" = "yes"
8484then
8485 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008486 if test "$ac_cv_cxx_thread" = "yes"; then
8487 CXX="$CXX -Kpthread"
8488 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008490
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008491 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008492 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008493elif test "$ac_cv_kthread" = "yes"
8494then
8495 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008496 if test "$ac_cv_cxx_thread" = "yes"; then
8497 CXX="$CXX -Kthread"
8498 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008500
8501 posix_threads=yes
8502 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008503elif test "$ac_cv_pthread" = "yes"
8504then
8505 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008506 if test "$ac_cv_cxx_thread" = "yes"; then
8507 CXX="$CXX -pthread"
8508 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008510
8511 posix_threads=yes
8512 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008513else
8514 if test ! -z "$with_threads" -a -d "$with_threads"
8515 then LDFLAGS="$LDFLAGS -L$with_threads"
8516 fi
8517 if test ! -z "$withval" -a -d "$withval"
8518 then LDFLAGS="$LDFLAGS -L$withval"
8519 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008520
8521 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008522 # define _POSIX_THREADS in unistd.h. Some apparently don't
8523 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8525$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008527/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008528
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008529#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008530#ifdef _POSIX_THREADS
8531yes
8532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008533
8534_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008537 unistd_defines_pthreads=yes
8538else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008539 unistd_defines_pthreads=no
8540fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008541rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008542
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8544$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008547
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 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 -08008549if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008551
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554
Matthias Kloseb9621712010-04-24 17:59:49 +00008555$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008556
8557 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008558 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008559else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008560
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 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 -08008562if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008564
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567
Matthias Kloseb9621712010-04-24 17:59:49 +00008568$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008569
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008570 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008571else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008572
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008573 # Just looking for pthread_create in libpthread is not enough:
8574 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8575 # So we really have to include pthread.h, and then link.
8576 _libs=$LIBS
8577 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8579$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008581/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008582#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008583
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008584void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008585int
8586main ()
8587{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008588
8589pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 ;
8591 return 0;
8592}
8593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008594if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8597$as_echo "yes" >&6; }
8598 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008599
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008600 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008601 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008602else
Martin v. Löwis11437992002-04-12 09:54:03 +00008603
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008604 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Gregory P. Smith69140482012-01-16 02:05:55 -08008606if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008608
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008609 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008610 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008611else
Guido van Rossumad678af1998-10-02 14:42:15 +00008612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8614$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008615if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008617else
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008619LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623/* Override any GCC internal prototype to avoid an error.
8624 Use char because int might match the return type of a GCC
8625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008626#ifdef __cplusplus
8627extern "C"
8628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008629char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008630int
8631main ()
8632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ;
8635 return 0;
8636}
8637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643rm -f core conftest.err conftest.$ac_objext \
8644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008645LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8648$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008649if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008651
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008652 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008653 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008654 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008655else
Greg Steinadf63d62000-07-05 10:38:09 +00008656
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8658$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008659if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008661else
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008663LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667/* Override any GCC internal prototype to avoid an error.
8668 Use char because int might match the return type of a GCC
8669 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008670#ifdef __cplusplus
8671extern "C"
8672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008673char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008674int
8675main ()
8676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ;
8679 return 0;
8680}
8681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687rm -f core conftest.err conftest.$ac_objext \
8688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008689LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8692$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008693if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008695
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008696 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008697 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008698 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008699else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008700
Matthias Kloseb9621712010-04-24 17:59:49 +00008701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8702$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008703if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008705else
Martin v. Löwis11437992002-04-12 09:54:03 +00008706 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008707LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711/* Override any GCC internal prototype to avoid an error.
8712 Use char because int might match the return type of a GCC
8713 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008714#ifdef __cplusplus
8715extern "C"
8716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008717char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008718int
8719main ()
8720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008722 ;
8723 return 0;
8724}
8725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008726if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008727 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008731rm -f core conftest.err conftest.$ac_objext \
8732 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008733LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8736$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008737if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008739
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008740 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008741 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008742 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008743else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008744
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8746$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008747if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008749else
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008751LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755/* Override any GCC internal prototype to avoid an error.
8756 Use char because int might match the return type of a GCC
8757 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758#ifdef __cplusplus
8759extern "C"
8760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008761char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008762int
8763main ()
8764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ;
8767 return 0;
8768}
8769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775rm -f core conftest.err conftest.$ac_objext \
8776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008777LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8780$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008781if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008783
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008784 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008785 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008786 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008787else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008788
Martin v. Löwis130fb172001-07-19 11:00:41 +00008789 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008790fi
8791
Guido van Rossum627b2d71993-12-24 10:39:16 +00008792
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008793fi
8794
Guido van Rossum0be3e491997-05-22 20:33:33 +00008795fi
8796
Guido van Rossum49545951997-12-02 19:28:29 +00008797fi
8798
Guido van Rossumb93a8621998-05-07 13:27:32 +00008799fi
8800
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802rm -f core conftest.err conftest.$ac_objext \
8803 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804fi
8805
Martin v. Löwis11437992002-04-12 09:54:03 +00008806
8807fi
8808
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008809
Michael W. Hudson54241132001-12-07 15:38:26 +00008810
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8812$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008813if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008815else
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008817LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821/* Override any GCC internal prototype to avoid an error.
8822 Use char because int might match the return type of a GCC
8823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008824#ifdef __cplusplus
8825extern "C"
8826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008827char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008828int
8829main ()
8830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 ;
8833 return 0;
8834}
8835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841rm -f core conftest.err conftest.$ac_objext \
8842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008843LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8846$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008847if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008849
Martin v. Löwis130fb172001-07-19 11:00:41 +00008850 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008851 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008852 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008853fi
8854
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008855
Neal Norwitza978ab02002-11-02 16:58:05 +00008856 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8858$as_echo_n "checking for thr_create in -lthread... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008859if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008861else
Martin v. Löwis11437992002-04-12 09:54:03 +00008862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008863LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867/* Override any GCC internal prototype to avoid an error.
8868 Use char because int might match the return type of a GCC
8869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008870#ifdef __cplusplus
8871extern "C"
8872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008873char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008874int
8875main ()
8876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ;
8879 return 0;
8880}
8881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008884else
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887rm -f core conftest.err conftest.$ac_objext \
8888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008889LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8892$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008893if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008895
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008896 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008897 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008898 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008899fi
8900
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008901 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008902
Martin v. Löwis130fb172001-07-19 11:00:41 +00008903 if test "$USE_THREAD_MODULE" != "#"
8904 then
8905 # If the above checks didn't disable threads, (at least) OSF1
8906 # needs this '-threads' argument during linking.
8907 case $ac_sys_system in
8908 OSF1) LDLAST=-threads;;
8909 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008910 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008911fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008912
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008913if test "$posix_threads" = "yes"; then
8914 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008917
8918 fi
8919
8920 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8921 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008922 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008923$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008924
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008925 ;;
8926 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008927$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008928
8929 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008930 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008931$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008932
8933 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008934 esac
8935
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8937$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08008938 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008940else
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008942 ac_cv_pthread_system_supported=no
8943else
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008945/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008946#include <pthread.h>
8947 void *foo(void *parm) {
8948 return NULL;
8949 }
8950 main() {
8951 pthread_attr_t attr;
8952 pthread_t id;
8953 if (pthread_attr_init(&attr)) exit(-1);
8954 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8955 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8956 exit(0);
8957 }
8958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008959if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008960 ac_cv_pthread_system_supported=yes
8961else
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008966fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968
Guido van Rossum627b2d71993-12-24 10:39:16 +00008969fi
8970
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8972$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008973 if test "$ac_cv_pthread_system_supported" = "yes"; then
8974
Matthias Kloseb9621712010-04-24 17:59:49 +00008975$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008976
8977 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 for ac_func in pthread_sigmask
8979do :
8980 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Gregory P. Smith69140482012-01-16 02:05:55 -08008981if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008982 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008983#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008984_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008985 case $ac_sys_system in
8986 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008987
Matthias Kloseb9621712010-04-24 17:59:49 +00008988$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008989
8990 ;;
8991 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008992fi
8993done
8994
8995fi
8996
8997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008999
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9001$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009003if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008 ipv6=no
9009 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9011$as_echo "yes" >&6; }
9012 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009013
9014 ipv6=yes
9015 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017else
Martin v. Löwis11437992002-04-12 09:54:03 +00009018
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009020
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9022$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023 ipv6=no
9024
9025else
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009027/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028 /* AF_INET6 available check */
9029#include <sys/types.h>
9030#include <sys/socket.h>
9031main()
9032{
9033 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9034 exit(1);
9035 else
9036 exit(0);
9037}
9038
Martin v. Löwis11437992002-04-12 09:54:03 +00009039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009040if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009041
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9043$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009045
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046else
Matthias Kloseb159a552010-04-25 21:00:44 +00009047
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9049$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9054 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055fi
9056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009058if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9060$as_echo_n "checking if RFC2553 API is available... " >&6; }
9061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009062/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009063
9064 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009065#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009066int
9067main ()
9068{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009069struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009070 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 ;
9072 return 0;
9073}
Matthias Kloseb159a552010-04-25 21:00:44 +00009074
Martin v. Löwis11437992002-04-12 09:54:03 +00009075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009076if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009077
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009079$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009080 ipv6=yes
9081
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009082else
Matthias Kloseb159a552010-04-25 21:00:44 +00009083
9084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009085$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009086 ipv6=no
9087
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009090fi
9091
9092if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009094
9095fi
9096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009097fi
9098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099
9100ipv6type=unknown
9101ipv6lib=none
9102ipv6trylibc=no
9103
9104if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9106$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009107 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9108 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009109 case $i in
9110 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009112/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114#include <netinet/in.h>
9115#ifdef IPV6_INRIA_VERSION
9116yes
9117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009118_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009121 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009123rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009124
9125 ;;
9126 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009128/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009129
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130#include <netinet/in.h>
9131#ifdef __KAME__
9132yes
9133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009134_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009137 ipv6type=$i;
9138 ipv6lib=inet6
9139 ipv6libdir=/usr/local/v6/lib
9140 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009142rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009143
9144 ;;
9145 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009147/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009148
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009149#include <features.h>
9150#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9151yes
9152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009153_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009155 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009156 ipv6type=$i;
9157 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009158fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009159rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160
9161 ;;
9162 linux-inet6)
9163 if test -d /usr/inet6; then
9164 ipv6type=$i
9165 ipv6lib=inet6
9166 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009167 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009168 fi
9169 ;;
9170 solaris)
9171 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009172 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009173 ipv6type=$i
9174 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009175 fi
9176 fi
9177 ;;
9178 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009180/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009181
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182#include <sys/param.h>
9183#ifdef _TOSHIBA_INET6
9184yes
9185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009186_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189 ipv6type=$i;
9190 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009191 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009192fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009193rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009194
9195 ;;
9196 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009198/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009199
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009200#include </usr/local/v6/include/sys/v6config.h>
9201#ifdef __V6D__
9202yes
9203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009204_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009207 ipv6type=$i;
9208 ipv6lib=v6;
9209 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009210 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009212rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009213
9214 ;;
9215 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009217/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009218
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009219#include <sys/param.h>
9220#ifdef _ZETA_MINAMI_INET6
9221yes
9222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009223_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009225 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009226 ipv6type=$i;
9227 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009228 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009229fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009230rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009231
9232 ;;
9233 esac
9234 if test "$ipv6type" != "unknown"; then
9235 break
9236 fi
9237 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9239$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240fi
9241
9242if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9243 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9244 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9245 echo "using lib$ipv6lib"
9246 else
9247 if test $ipv6trylibc = "yes"; then
9248 echo "using libc"
9249 else
9250 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9251 echo "You need to fetch lib$ipv6lib.a from appropriate"
9252 echo 'ipv6 kit and compile beforehand.'
9253 exit 1
9254 fi
9255 fi
9256fi
9257
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9259$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009261/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009262
9263 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009264int
9265main ()
9266{
9267FSIORefNum fRef = 0
9268 ;
9269 return 0;
9270}
Matthias Kloseb159a552010-04-25 21:00:44 +00009271
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009273if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009274
Matthias Kloseb159a552010-04-25 21:00:44 +00009275
Matthias Kloseb9621712010-04-24 17:59:49 +00009276$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9279$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009280
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009281else
Matthias Kloseb159a552010-04-25 21:00:44 +00009282
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009285
9286fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9288
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009289# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9291$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009294if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009295 withval=$with_doc_strings;
9296fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009297
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009298
9299if test -z "$with_doc_strings"
9300then with_doc_strings="yes"
9301fi
9302if test "$with_doc_strings" != "no"
9303then
9304
Matthias Kloseb9621712010-04-24 17:59:49 +00009305$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009306
9307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9309$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009310
Antoine Pitrou042b1282010-08-13 21:15:58 +00009311# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9313$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009316if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009318if test "$withval" != no
9319then
9320
Matthias Kloseb9621712010-04-24 17:59:49 +00009321$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009322
Matthias Kloseb9621712010-04-24 17:59:49 +00009323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9324$as_echo "yes" >&6; }
9325else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009327fi
9328else
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9330$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331fi
9332
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009333
9334# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9336$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009338# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009339if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009340 withval=$with_pymalloc;
9341fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009342
Neil Schemenauera35c6882001-02-27 04:45:05 +00009343
Neil Schemenauer16c22972002-03-22 15:34:49 +00009344if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009345then
9346 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009347 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009348fi
9349if test "$with_pymalloc" != "no"
9350then
Martin v. Löwis11437992002-04-12 09:54:03 +00009351
Matthias Kloseb9621712010-04-24 17:59:49 +00009352$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009353
9354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9356$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009357
Benjamin Peterson05159c42009-12-03 03:01:27 +00009358# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9360$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009361
9362# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009363if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009364 withval=$with_valgrind;
9365else
9366 with_valgrind=no
9367fi
9368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9370$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009371if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009372 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 -08009373if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009374
Matthias Kloseb9621712010-04-24 17:59:49 +00009375$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009376
9377else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009378 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009379
9380fi
9381
9382
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009383 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009384fi
9385
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009386# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009387
Guido van Rossum98935bf2001-09-05 19:13:16 +00009388DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009389
Guido van Rossume97ee181999-12-20 21:27:22 +00009390# the dlopen() function means we might want to use dynload_shlib.o. some
9391# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009392for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009393do :
9394 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Gregory P. Smith69140482012-01-16 02:05:55 -08009395if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009396 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009397#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009398_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009399
Guido van Rossume97ee181999-12-20 21:27:22 +00009400fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009401done
Guido van Rossume97ee181999-12-20 21:27:22 +00009402
Michael W. Hudson54241132001-12-07 15:38:26 +00009403
Guido van Rossume97ee181999-12-20 21:27:22 +00009404# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9405# loading of modules.
9406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9408$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009409if test -z "$DYNLOADFILE"
9410then
9411 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009412 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9413 if test "$ac_cv_func_dlopen" = yes
9414 then DYNLOADFILE="dynload_shlib.o"
9415 else DYNLOADFILE="dynload_aix.o"
9416 fi
9417 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009418 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009419 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9420 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009421 *)
9422 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9423 # out any dynamic loading
9424 if test "$ac_cv_func_dlopen" = yes
9425 then DYNLOADFILE="dynload_shlib.o"
9426 else DYNLOADFILE="dynload_stub.o"
9427 fi
9428 ;;
9429 esac
9430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9432$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009433if test "$DYNLOADFILE" != "dynload_stub.o"
9434then
Martin v. Löwis11437992002-04-12 09:54:03 +00009435
Matthias Kloseb9621712010-04-24 17:59:49 +00009436$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009437
9438fi
9439
Neil Schemenauer4e425612001-06-19 15:44:15 +00009440# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9441
Michael W. Hudson54241132001-12-07 15:38:26 +00009442
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9444$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009445if test -z "$MACHDEP_OBJS"
9446then
Jack Jansene578a632001-08-15 01:27:14 +00009447 MACHDEP_OBJS=$extra_machdep_objs
9448else
9449 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9452$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009453
Guido van Rossum627b2d71993-12-24 10:39:16 +00009454# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009455for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009456 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009457 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009458 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009459 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009460 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009461 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009462 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9463 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009464 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009465 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009466 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009467 truncate uname unsetenv utimes waitpid wait3 wait4 \
9468 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009469do :
9470 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9471ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009472if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009474#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009476
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009477fi
9478done
9479
Michael W. Hudson54241132001-12-07 15:38:26 +00009480
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009481ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9482 #include <dirent.h>
9483"
9484if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9485
9486$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9487
9488fi
9489
9490
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009491# For some functions, having a definition is not sufficient, since
9492# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9494$as_echo_n "checking for chroot... " >&6; }
9495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009497#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009498int
9499main ()
9500{
9501void *x=chroot
9502 ;
9503 return 0;
9504}
9505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009507
Matthias Kloseb9621712010-04-24 17:59:49 +00009508$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009509
Matthias Kloseb159a552010-04-25 21:00:44 +00009510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009511$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009512else
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9514$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009515
9516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9519$as_echo_n "checking for link... " >&6; }
9520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009521/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009522#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009523int
9524main ()
9525{
9526void *x=link
9527 ;
9528 return 0;
9529}
9530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009532
Matthias Kloseb9621712010-04-24 17:59:49 +00009533$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009534
Matthias Kloseb159a552010-04-25 21:00:44 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009536$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009537else
Matthias Kloseb9621712010-04-24 17:59:49 +00009538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009540
9541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9544$as_echo_n "checking for symlink... " >&6; }
9545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009547#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009548int
9549main ()
9550{
9551void *x=symlink
9552 ;
9553 return 0;
9554}
9555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009557
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009559
Matthias Kloseb159a552010-04-25 21:00:44 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009561$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009562else
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009565
9566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9569$as_echo_n "checking for fchdir... " >&6; }
9570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009571/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009572#include <unistd.h>
9573int
9574main ()
9575{
9576void *x=fchdir
9577 ;
9578 return 0;
9579}
9580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009582
Matthias Kloseb9621712010-04-24 17:59:49 +00009583$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009584
Matthias Kloseb159a552010-04-25 21:00:44 +00009585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009586$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009587else
Matthias Kloseb9621712010-04-24 17:59:49 +00009588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009590
9591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9594$as_echo_n "checking for fsync... " >&6; }
9595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009596/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009597#include <unistd.h>
9598int
9599main ()
9600{
9601void *x=fsync
9602 ;
9603 return 0;
9604}
9605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009607
Matthias Kloseb9621712010-04-24 17:59:49 +00009608$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009609
Matthias Kloseb159a552010-04-25 21:00:44 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009611$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009612else
Matthias Kloseb9621712010-04-24 17:59:49 +00009613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9614$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009615
9616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9619$as_echo_n "checking for fdatasync... " >&6; }
9620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009621/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009622#include <unistd.h>
9623int
9624main ()
9625{
9626void *x=fdatasync
9627 ;
9628 return 0;
9629}
9630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009632
Matthias Kloseb9621712010-04-24 17:59:49 +00009633$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009634
Matthias Kloseb159a552010-04-25 21:00:44 +00009635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009636$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009637else
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9639$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009640
9641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9644$as_echo_n "checking for epoll... " >&6; }
9645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009646/* end confdefs.h. */
9647#include <sys/epoll.h>
9648int
9649main ()
9650{
9651void *x=epoll_create
9652 ;
9653 return 0;
9654}
9655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009657
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009659
Matthias Kloseb159a552010-04-25 21:00:44 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009661$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009662else
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009665
9666fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9669$as_echo_n "checking for kqueue... " >&6; }
9670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009671/* end confdefs.h. */
9672
9673#include <sys/types.h>
9674#include <sys/event.h>
9675
9676int
9677main ()
9678{
9679int x=kqueue()
9680 ;
9681 return 0;
9682}
9683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009684if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009685
Matthias Kloseb9621712010-04-24 17:59:49 +00009686$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009687
Matthias Kloseb159a552010-04-25 21:00:44 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009689$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009690else
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9692$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009693
9694fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009696# On some systems (eg. FreeBSD 5), we would find a definition of the
9697# functions ctermid_r, setgroups in the library, but no prototype
9698# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9699# address to avoid compiler warnings and potential miscompilations
9700# because of the missing prototypes.
9701
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9703$as_echo_n "checking for ctermid_r... " >&6; }
9704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009705/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009706
Martin v. Löwisd5843682002-11-21 20:41:28 +00009707#include <stdio.h>
9708
Martin v. Löwisd5843682002-11-21 20:41:28 +00009709int
9710main ()
9711{
9712void* p = ctermid_r
9713 ;
9714 return 0;
9715}
9716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009717if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009718
Matthias Kloseb9621712010-04-24 17:59:49 +00009719$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009720
Matthias Kloseb159a552010-04-25 21:00:44 +00009721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009722$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009723else
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9725$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009726
9727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9729
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9731$as_echo_n "checking for flock declaration... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009732if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009733 $as_echo_n "(cached) " >&6
9734else
9735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009736/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009737#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009738int
9739main ()
9740{
9741void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009742
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009743 ;
9744 return 0;
9745}
9746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009747if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009748 ac_cv_flock_decl=yes
9749else
9750 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009751
9752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009754
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009755fi
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9757$as_echo "$ac_cv_flock_decl" >&6; }
9758if test "x${ac_cv_flock_decl}" = xyes; then
9759 for ac_func in flock
9760do :
9761 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Gregory P. Smith69140482012-01-16 02:05:55 -08009762if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009763 cat >>confdefs.h <<_ACEOF
9764#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009765_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009766
Antoine Pitroua3000072010-09-07 14:52:42 +00009767else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009769$as_echo_n "checking for flock in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009770if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009771 $as_echo_n "(cached) " >&6
9772else
9773 ac_check_lib_save_LIBS=$LIBS
9774LIBS="-lbsd $LIBS"
9775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776/* end confdefs.h. */
9777
9778/* Override any GCC internal prototype to avoid an error.
9779 Use char because int might match the return type of a GCC
9780 builtin and then its argument prototype would still apply. */
9781#ifdef __cplusplus
9782extern "C"
9783#endif
9784char flock ();
9785int
9786main ()
9787{
9788return flock ();
9789 ;
9790 return 0;
9791}
9792_ACEOF
9793if ac_fn_c_try_link "$LINENO"; then :
9794 ac_cv_lib_bsd_flock=yes
9795else
9796 ac_cv_lib_bsd_flock=no
9797fi
9798rm -f core conftest.err conftest.$ac_objext \
9799 conftest$ac_exeext conftest.$ac_ext
9800LIBS=$ac_check_lib_save_LIBS
9801fi
9802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9803$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009804if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009805 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009806
9807
9808$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9809
9810
9811fi
9812
9813
9814fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009815done
9816
Antoine Pitroua3000072010-09-07 14:52:42 +00009817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818
Matthias Kloseb9621712010-04-24 17:59:49 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9820$as_echo_n "checking for getpagesize... " >&6; }
9821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009822/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009823
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009824#include <unistd.h>
9825
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009826int
9827main ()
9828{
9829void* p = getpagesize
9830 ;
9831 return 0;
9832}
9833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009835
Matthias Kloseb9621712010-04-24 17:59:49 +00009836$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009837
Matthias Kloseb159a552010-04-25 21:00:44 +00009838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009839$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009840else
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009843
9844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009846
Charles-François Natali6613c182011-11-27 12:41:06 +01009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9848$as_echo_n "checking for broken unsetenv... " >&6; }
9849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9850/* end confdefs.h. */
9851
9852#include <stdlib.h>
9853
9854int
9855main ()
9856{
9857int res = unsetenv("DUMMY")
9858 ;
9859 return 0;
9860}
9861_ACEOF
9862if ac_fn_c_try_compile "$LINENO"; then :
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864$as_echo "no" >&6; }
9865else
9866
9867$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9868
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9870$as_echo "yes" >&6; }
9871
9872fi
9873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9874
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009875for ac_prog in true
9876do
9877 # Extract the first word of "$ac_prog", so it can be a program name with args.
9878set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9880$as_echo_n "checking for $ac_word... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009881if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009883else
9884 if test -n "$TRUE"; then
9885 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9886else
9887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9888for as_dir in $PATH
9889do
9890 IFS=$as_save_IFS
9891 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893 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 +00009894 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 $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 +00009896 break 2
9897 fi
9898done
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009901
9902fi
9903fi
9904TRUE=$ac_cv_prog_TRUE
9905if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9907$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009908else
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9910$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009911fi
9912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009914 test -n "$TRUE" && break
9915done
9916test -n "$TRUE" || TRUE="/bin/true"
9917
9918
Matthias Kloseb9621712010-04-24 17:59:49 +00009919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9920$as_echo_n "checking for inet_aton in -lc... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009921if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009923else
9924 ac_check_lib_save_LIBS=$LIBS
9925LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009929/* Override any GCC internal prototype to avoid an error.
9930 Use char because int might match the return type of a GCC
9931 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009932#ifdef __cplusplus
9933extern "C"
9934#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009935char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009936int
9937main ()
9938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009940 ;
9941 return 0;
9942}
9943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009944if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009945 ac_cv_lib_c_inet_aton=yes
9946else
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009949rm -f core conftest.err conftest.$ac_objext \
9950 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009951LIBS=$ac_check_lib_save_LIBS
9952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9954$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009955if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009956 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009957else
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9959$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009960if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009962else
9963 ac_check_lib_save_LIBS=$LIBS
9964LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009966/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968/* Override any GCC internal prototype to avoid an error.
9969 Use char because int might match the return type of a GCC
9970 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009971#ifdef __cplusplus
9972extern "C"
9973#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009974char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009975int
9976main ()
9977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009979 ;
9980 return 0;
9981}
9982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009983if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009984 ac_cv_lib_resolv_inet_aton=yes
9985else
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009988rm -f core conftest.err conftest.$ac_objext \
9989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009990LIBS=$ac_check_lib_save_LIBS
9991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9993$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -08009994if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009995 cat >>confdefs.h <<_ACEOF
9996#define HAVE_LIBRESOLV 1
9997_ACEOF
9998
9999 LIBS="-lresolv $LIBS"
10000
10001fi
10002
10003
10004fi
10005
10006
Christian Heimesd0764e22007-12-04 15:00:33 +000010007# On Tru64, chflags seems to be present, but calling it will
10008# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10010$as_echo_n "checking for chflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010011if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010013else
Matthias Kloseb9621712010-04-24 17:59:49 +000010014 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010015 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010016else
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010018/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010019
Christian Heimesd0764e22007-12-04 15:00:33 +000010020#include <sys/stat.h>
10021#include <unistd.h>
10022int main(int argc, char*argv[])
10023{
10024 if(chflags(argv[0], 0) != 0)
10025 return 1;
10026 return 0;
10027}
Ned Deily3eb67d52011-06-28 00:00:28 -070010028
Christian Heimesd0764e22007-12-04 15:00:33 +000010029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010030if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010031 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010032else
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010037fi
10038
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010039
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10042$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010043if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010044 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010045if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010046 ac_cv_have_chflags="yes"
10047else
10048 ac_cv_have_chflags="no"
10049fi
10050
10051fi
10052if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010055
10056fi
10057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10059$as_echo_n "checking for lchflags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010060if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010062else
Matthias Kloseb9621712010-04-24 17:59:49 +000010063 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010064 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010065else
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010067/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010068
Christian Heimesd0764e22007-12-04 15:00:33 +000010069#include <sys/stat.h>
10070#include <unistd.h>
10071int main(int argc, char*argv[])
10072{
10073 if(lchflags(argv[0], 0) != 0)
10074 return 1;
10075 return 0;
10076}
Ned Deily3eb67d52011-06-28 00:00:28 -070010077
Christian Heimesd0764e22007-12-04 15:00:33 +000010078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010079if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010080 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010081else
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010086fi
10087
10088
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10091$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010092if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010093 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Gregory P. Smith69140482012-01-16 02:05:55 -080010094if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010095 ac_cv_have_lchflags="yes"
10096else
10097 ac_cv_have_lchflags="no"
10098fi
10099
10100fi
10101if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010102
Matthias Kloseb9621712010-04-24 17:59:49 +000010103$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010104
10105fi
10106
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010107case $ac_sys_system/$ac_sys_release in
10108Darwin/*)
10109 _CUR_CFLAGS="${CFLAGS}"
10110 _CUR_LDFLAGS="${LDFLAGS}"
10111 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10112 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10113 ;;
10114esac
10115
Matthias Kloseb9621712010-04-24 17:59:49 +000010116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10117$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010118if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010119 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010120else
10121 ac_check_lib_save_LIBS=$LIBS
10122LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010124/* end confdefs.h. */
10125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126/* Override any GCC internal prototype to avoid an error.
10127 Use char because int might match the return type of a GCC
10128 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010129#ifdef __cplusplus
10130extern "C"
10131#endif
10132char inflateCopy ();
10133int
10134main ()
10135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010136return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010137 ;
10138 return 0;
10139}
10140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010141if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010142 ac_cv_lib_z_inflateCopy=yes
10143else
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010146rm -f core conftest.err conftest.$ac_objext \
10147 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010148LIBS=$ac_check_lib_save_LIBS
10149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10151$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010152if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010153
Matthias Kloseb9621712010-04-24 17:59:49 +000010154$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010155
10156fi
10157
10158
10159case $ac_sys_system/$ac_sys_release in
10160Darwin/*)
10161 CFLAGS="${_CUR_CFLAGS}"
10162 LDFLAGS="${_CUR_LDFLAGS}"
10163 ;;
10164esac
10165
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10167$as_echo_n "checking for hstrerror... " >&6; }
10168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010169/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010170
Martin v. Löwise9416172003-05-03 10:12:45 +000010171#include <netdb.h>
10172
Martin v. Löwise9416172003-05-03 10:12:45 +000010173int
10174main ()
10175{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010176void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010177 ;
10178 return 0;
10179}
10180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010182
Matthias Kloseb9621712010-04-24 17:59:49 +000010183$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010184
Matthias Kloseb159a552010-04-25 21:00:44 +000010185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010186$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010187else
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10189$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010190
10191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194
Matthias Kloseb9621712010-04-24 17:59:49 +000010195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10196$as_echo_n "checking for inet_aton... " >&6; }
10197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010198/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010199
Martin v. Löwis86d66262006-02-17 08:40:11 +000010200#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010201#include <sys/socket.h>
10202#include <netinet/in.h>
10203#include <arpa/inet.h>
10204
Martin v. Löwise9416172003-05-03 10:12:45 +000010205int
10206main ()
10207{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010208void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010209 ;
10210 return 0;
10211}
10212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010214
Matthias Kloseb9621712010-04-24 17:59:49 +000010215$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010216
Matthias Kloseb159a552010-04-25 21:00:44 +000010217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010218$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010219else
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010222
10223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010224rm -f core conftest.err conftest.$ac_objext \
10225 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226
Matthias Kloseb9621712010-04-24 17:59:49 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10228$as_echo_n "checking for inet_pton... " >&6; }
10229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010230/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010231
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010232#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010233#include <sys/socket.h>
10234#include <netinet/in.h>
10235#include <arpa/inet.h>
10236
Martin v. Löwise9416172003-05-03 10:12:45 +000010237int
10238main ()
10239{
10240void* p = inet_pton
10241 ;
10242 return 0;
10243}
10244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010245if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010246
Matthias Kloseb9621712010-04-24 17:59:49 +000010247$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010248
Matthias Kloseb159a552010-04-25 21:00:44 +000010249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010250$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010251else
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10253$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010254
10255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010257
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010258# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10260$as_echo_n "checking for setgroups... " >&6; }
10261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010262/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010263
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010264#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010265#ifdef HAVE_GRP_H
10266#include <grp.h>
10267#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010268
Martin v. Löwisd5843682002-11-21 20:41:28 +000010269int
10270main ()
10271{
10272void* p = setgroups
10273 ;
10274 return 0;
10275}
10276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010278
Matthias Kloseb9621712010-04-24 17:59:49 +000010279$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010280
Matthias Kloseb159a552010-04-25 21:00:44 +000010281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010282$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010283else
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10285$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010286
10287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010289
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010290# check for openpty and forkpty
10291
10292for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010293do :
10294 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010295if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010297#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010298_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010299
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010300else
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10302$as_echo_n "checking for openpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010303if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010305else
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010307LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311/* Override any GCC internal prototype to avoid an error.
10312 Use char because int might match the return type of a GCC
10313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314#ifdef __cplusplus
10315extern "C"
10316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010317char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010318int
10319main ()
10320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ;
10323 return 0;
10324}
10325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010328else
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010331rm -f core conftest.err conftest.$ac_objext \
10332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010333LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10336$as_echo "$ac_cv_lib_util_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010337if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010339 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010340else
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10342$as_echo_n "checking for openpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010343if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010345else
10346 ac_check_lib_save_LIBS=$LIBS
10347LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010349/* end confdefs.h. */
10350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351/* Override any GCC internal prototype to avoid an error.
10352 Use char because int might match the return type of a GCC
10353 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010354#ifdef __cplusplus
10355extern "C"
10356#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010357char openpty ();
10358int
10359main ()
10360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010361return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010362 ;
10363 return 0;
10364}
10365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010366if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010367 ac_cv_lib_bsd_openpty=yes
10368else
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010371rm -f core conftest.err conftest.$ac_objext \
10372 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010373LIBS=$ac_check_lib_save_LIBS
10374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10376$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010377if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010379 LIBS="$LIBS -lbsd"
10380fi
10381
10382
10383fi
10384
Fred Drake8cef4cf2000-06-28 16:40:38 +000010385
10386fi
10387done
10388
10389for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010390do :
10391 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Gregory P. Smith69140482012-01-16 02:05:55 -080010392if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010394#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010395_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010396
Fred Drake8cef4cf2000-06-28 16:40:38 +000010397else
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10399$as_echo_n "checking for forkpty in -lutil... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010400if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010402else
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010404LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408/* Override any GCC internal prototype to avoid an error.
10409 Use char because int might match the return type of a GCC
10410 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010411#ifdef __cplusplus
10412extern "C"
10413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010414char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010415int
10416main ()
10417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428rm -f core conftest.err conftest.$ac_objext \
10429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010430LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10433$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010434if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010436 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010437else
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10439$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010440if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010442else
10443 ac_check_lib_save_LIBS=$LIBS
10444LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010446/* end confdefs.h. */
10447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448/* Override any GCC internal prototype to avoid an error.
10449 Use char because int might match the return type of a GCC
10450 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010451#ifdef __cplusplus
10452extern "C"
10453#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010454char forkpty ();
10455int
10456main ()
10457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010459 ;
10460 return 0;
10461}
10462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010464 ac_cv_lib_bsd_forkpty=yes
10465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010468rm -f core conftest.err conftest.$ac_objext \
10469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010470LIBS=$ac_check_lib_save_LIBS
10471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10473$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010474if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010476 LIBS="$LIBS -lbsd"
10477fi
10478
10479
10480fi
10481
Fred Drake8cef4cf2000-06-28 16:40:38 +000010482
10483fi
10484done
10485
Jack Jansendd19cf82001-12-06 22:36:17 +000010486
Christian Heimesb186d002008-03-18 15:15:01 +000010487# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010488for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010489do :
10490 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Gregory P. Smith69140482012-01-16 02:05:55 -080010491if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010492 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010493#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010494_ACEOF
10495
10496fi
10497done
10498
10499
Michael W. Hudson54241132001-12-07 15:38:26 +000010500# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010501for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010502do :
10503 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10504ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010505if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010508_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010509
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010510fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010511done
10512
Michael W. Hudson54241132001-12-07 15:38:26 +000010513
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010514ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Gregory P. Smith69140482012-01-16 02:05:55 -080010515if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010516 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010517
Martin v. Löwis1142de32002-03-29 16:28:31 +000010518else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010520 *" dup2.$ac_objext "* ) ;;
10521 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010523esac
10524
Martin v. Löwis1142de32002-03-29 16:28:31 +000010525fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010526
10527ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Gregory P. Smith69140482012-01-16 02:05:55 -080010528if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010529 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10530
10531else
10532 case " $LIBOBJS " in
10533 *" getcwd.$ac_objext "* ) ;;
10534 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10535 ;;
10536esac
10537
10538fi
10539
10540ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Gregory P. Smith69140482012-01-16 02:05:55 -080010541if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010542 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10543
10544else
10545 case " $LIBOBJS " in
10546 *" strdup.$ac_objext "* ) ;;
10547 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10548 ;;
10549esac
10550
10551fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010552
10553
10554for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010555do :
10556 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010557if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010559#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010562/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010563#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010564int
10565main ()
10566{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ;
10569 return 0;
10570}
10571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010573
Matthias Kloseb9621712010-04-24 17:59:49 +000010574$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010575
Guido van Rossum627b2d71993-12-24 10:39:16 +000010576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010578
Guido van Rossum627b2d71993-12-24 10:39:16 +000010579fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010580done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010581
Jack Jansen150753c2003-03-29 22:07:47 +000010582for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010583do :
10584 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Gregory P. Smith69140482012-01-16 02:05:55 -080010585if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010586 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010590/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010591#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010592int
10593main ()
10594{
10595setpgrp(0,0);
10596 ;
10597 return 0;
10598}
10599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010601
Matthias Kloseb9621712010-04-24 17:59:49 +000010602$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010603
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010606
10607fi
10608done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010609
Thomas Wouters3a584202000-08-05 23:28:51 +000010610for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010611do :
10612 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Gregory P. Smith69140482012-01-16 02:05:55 -080010613if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010615#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010618/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010619#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010620int
10621main ()
10622{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010623gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 ;
10625 return 0;
10626}
10627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if ac_fn_c_try_compile "$LINENO"; then :
10629
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630else
Skip Montanaro6dead952003-09-25 14:50:04 +000010631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010633
Martin v. Löwis11437992002-04-12 09:54:03 +000010634
Guido van Rossum627b2d71993-12-24 10:39:16 +000010635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010637
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010638fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010639done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010640
Michael W. Hudson54241132001-12-07 15:38:26 +000010641
Matthias Kloseb9621712010-04-24 17:59:49 +000010642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10643$as_echo_n "checking for major... " >&6; }
10644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010645/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010646
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010647#if defined(MAJOR_IN_MKDEV)
10648#include <sys/mkdev.h>
10649#elif defined(MAJOR_IN_SYSMACROS)
10650#include <sys/sysmacros.h>
10651#else
10652#include <sys/types.h>
10653#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010654
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010655int
10656main ()
10657{
10658
10659 makedev(major(0),minor(0));
10660
10661 ;
10662 return 0;
10663}
10664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010666
10667
Matthias Kloseb9621712010-04-24 17:59:49 +000010668$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10671$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010672
10673else
Skip Montanaro6dead952003-09-25 14:50:04 +000010674
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10676$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010677
10678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010679rm -f core conftest.err conftest.$ac_objext \
10680 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010681
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010682# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010683# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10685$as_echo_n "checking for getaddrinfo... " >&6; }
10686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010687/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010688
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010689#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010690#include <sys/socket.h>
10691#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010692#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010693
Martin v. Löwis11437992002-04-12 09:54:03 +000010694int
10695main ()
10696{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010697getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 ;
10699 return 0;
10700}
10701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010702if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010703 have_getaddrinfo=yes
10704else
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010707rm -f core conftest.err conftest.$ac_objext \
10708 conftest$ac_exeext conftest.$ac_ext
10709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10710$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010711if test $have_getaddrinfo = yes
10712then
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10714$as_echo_n "checking getaddrinfo bug... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010715 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010717else
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010719 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010720else
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010722/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010723
10724#include <sys/types.h>
10725#include <netdb.h>
10726#include <string.h>
10727#include <sys/socket.h>
10728#include <netinet/in.h>
10729
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010730int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010731{
10732 int passive, gaierr, inet4 = 0, inet6 = 0;
10733 struct addrinfo hints, *ai, *aitop;
10734 char straddr[INET6_ADDRSTRLEN], strport[16];
10735
10736 for (passive = 0; passive <= 1; passive++) {
10737 memset(&hints, 0, sizeof(hints));
10738 hints.ai_family = AF_UNSPEC;
10739 hints.ai_flags = passive ? AI_PASSIVE : 0;
10740 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010741 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010742 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10743 (void)gai_strerror(gaierr);
10744 goto bad;
10745 }
10746 for (ai = aitop; ai; ai = ai->ai_next) {
10747 if (ai->ai_addr == NULL ||
10748 ai->ai_addrlen == 0 ||
10749 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10750 straddr, sizeof(straddr), strport, sizeof(strport),
10751 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10752 goto bad;
10753 }
10754 switch (ai->ai_family) {
10755 case AF_INET:
10756 if (strcmp(strport, "54321") != 0) {
10757 goto bad;
10758 }
10759 if (passive) {
10760 if (strcmp(straddr, "0.0.0.0") != 0) {
10761 goto bad;
10762 }
10763 } else {
10764 if (strcmp(straddr, "127.0.0.1") != 0) {
10765 goto bad;
10766 }
10767 }
10768 inet4++;
10769 break;
10770 case AF_INET6:
10771 if (strcmp(strport, "54321") != 0) {
10772 goto bad;
10773 }
10774 if (passive) {
10775 if (strcmp(straddr, "::") != 0) {
10776 goto bad;
10777 }
10778 } else {
10779 if (strcmp(straddr, "::1") != 0) {
10780 goto bad;
10781 }
10782 }
10783 inet6++;
10784 break;
10785 case AF_UNSPEC:
10786 goto bad;
10787 break;
10788 default:
10789 /* another family support? */
10790 break;
10791 }
10792 }
10793 }
10794
10795 if (!(inet4 == 0 || inet4 == 2))
10796 goto bad;
10797 if (!(inet6 == 0 || inet6 == 2))
10798 goto bad;
10799
10800 if (aitop)
10801 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010802 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010803
10804 bad:
10805 if (aitop)
10806 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010807 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010808}
10809
Martin v. Löwis11437992002-04-12 09:54:03 +000010810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010811if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010812 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010813else
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10817 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010819
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010820fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010821
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10825$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10826
Mark Dickinson2df5d282009-12-31 21:22:50 +000010827if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010828then
10829 if test $ipv6 = yes
10830 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010831 echo 'Fatal: You must get working getaddrinfo() function.'
10832 echo ' or you can specify "--disable-ipv6"'.
10833 exit 1
10834 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010835else
Martin v. Löwis11437992002-04-12 09:54:03 +000010836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010838
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010839fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010840
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010841for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010842do :
10843 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Gregory P. Smith69140482012-01-16 02:05:55 -080010844if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010847_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010848
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010849fi
10850done
10851
Michael W. Hudson54241132001-12-07 15:38:26 +000010852
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010853# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10855$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010856if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010858else
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010861#include <sys/types.h>
10862#include <sys/time.h>
10863#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010864
Martin v. Löwis11437992002-04-12 09:54:03 +000010865int
10866main ()
10867{
10868if ((struct tm *) 0)
10869return 0;
10870 ;
10871 return 0;
10872}
10873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010874if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010875 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010876else
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10882$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010883if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010884
Matthias Kloseb9621712010-04-24 17:59:49 +000010885$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010886
10887fi
10888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10890$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010891if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010893else
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010895/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010896#include <sys/types.h>
10897#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010898
Martin v. Löwis11437992002-04-12 09:54:03 +000010899int
10900main ()
10901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010902struct tm tm;
10903 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ;
10906 return 0;
10907}
10908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010909if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010910 ac_cv_struct_tm=time.h
10911else
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10917$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010918if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010921
10922fi
10923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924ac_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 +000010925#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010926
Matthias Kloseb9621712010-04-24 17:59:49 +000010927"
Gregory P. Smith69140482012-01-16 02:05:55 -080010928if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010929
10930cat >>confdefs.h <<_ACEOF
10931#define HAVE_STRUCT_TM_TM_ZONE 1
10932_ACEOF
10933
10934
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010936
Martin v. Löwis11437992002-04-12 09:54:03 +000010937if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010940
10941else
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10943"
Gregory P. Smith69140482012-01-16 02:05:55 -080010944if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010946else
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948fi
10949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010951#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952_ACEOF
10953
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10955$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080010956if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010961#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962#if !HAVE_DECL_TZNAME
10963extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010965
Martin v. Löwis11437992002-04-12 09:54:03 +000010966int
10967main ()
10968{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 ;
10971 return 0;
10972}
10973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010974if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010975 ac_cv_var_tzname=yes
10976else
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010979rm -f core conftest.err conftest.$ac_objext \
10980 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10983$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010984 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010987
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010988 fi
10989fi
10990
Matthias Kloseb9621712010-04-24 17:59:49 +000010991ac_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 -080010992if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010993
10994cat >>confdefs.h <<_ACEOF
10995#define HAVE_STRUCT_STAT_ST_RDEV 1
10996_ACEOF
10997
10998
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010999fi
11000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001ac_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 -080011002if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011003
Martin v. Löwis11437992002-04-12 09:54:03 +000011004cat >>confdefs.h <<_ACEOF
11005#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11006_ACEOF
11007
11008
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011009fi
11010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011ac_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 -080011012if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011013
11014cat >>confdefs.h <<_ACEOF
11015#define HAVE_STRUCT_STAT_ST_FLAGS 1
11016_ACEOF
11017
11018
11019fi
11020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021ac_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 -080011022if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011023
11024cat >>confdefs.h <<_ACEOF
11025#define HAVE_STRUCT_STAT_ST_GEN 1
11026_ACEOF
11027
11028
11029fi
11030
Matthias Kloseb9621712010-04-24 17:59:49 +000011031ac_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 -080011032if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011033
11034cat >>confdefs.h <<_ACEOF
11035#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11036_ACEOF
11037
11038
11039fi
11040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041ac_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 -080011042if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011043
Martin v. Löwis11437992002-04-12 09:54:03 +000011044cat >>confdefs.h <<_ACEOF
11045#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11046_ACEOF
11047
11048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011050
11051else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011053 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11055 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011056esac
11057
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011058fi
11059
Michael W. Hudson54241132001-12-07 15:38:26 +000011060
Martin v. Löwis11437992002-04-12 09:54:03 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11063$as_echo_n "checking for time.h that defines altzone... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011064if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011066else
Matthias Kloseb159a552010-04-25 21:00:44 +000011067
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011069/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011070#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011071int
11072main ()
11073{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011074return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ;
11076 return 0;
11077}
11078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011079if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011080 ac_cv_header_time_altzone=yes
11081else
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086fi
11087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11089$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011090if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011091
Matthias Kloseb9621712010-04-24 17:59:49 +000011092$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011093
11094fi
11095
Guido van Rossumda88dad1995-01-26 00:46:29 +000011096was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11098$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011100/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011101
11102#include <sys/types.h>
11103#include <sys/select.h>
11104#include <sys/time.h>
11105
Martin v. Löwis11437992002-04-12 09:54:03 +000011106int
11107main ()
11108{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109;
Martin v. Löwis11437992002-04-12 09:54:03 +000011110 ;
11111 return 0;
11112}
11113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011115
11116
Matthias Kloseb9621712010-04-24 17:59:49 +000011117$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011118
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011119 was_it_defined=yes
11120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11124$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11127$as_echo_n "checking for addrinfo... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011128if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011130else
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011132/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011133#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011134int
11135main ()
11136{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011137struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 ;
11139 return 0;
11140}
11141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011142if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011143 ac_cv_struct_addrinfo=yes
11144else
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11148fi
11149
Matthias Kloseb9621712010-04-24 17:59:49 +000011150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11151$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011152if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011153
Matthias Kloseb9621712010-04-24 17:59:49 +000011154$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011155
11156fi
11157
Matthias Kloseb9621712010-04-24 17:59:49 +000011158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11159$as_echo_n "checking for sockaddr_storage... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011160if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011161 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011162else
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011164/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011165
11166# include <sys/types.h>
11167# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011168int
11169main ()
11170{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011171struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 ;
11173 return 0;
11174}
11175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011177 ac_cv_struct_sockaddr_storage=yes
11178else
Matthias Kloseb9621712010-04-24 17:59:49 +000011179 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11182fi
11183
Matthias Kloseb9621712010-04-24 17:59:49 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11185$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011186if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011189
11190fi
11191
Guido van Rossum627b2d71993-12-24 10:39:16 +000011192# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011193
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11195$as_echo_n "checking whether char is unsigned... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011196if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011198else
Matthias Kloseb9621712010-04-24 17:59:49 +000011199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011201$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011202int
11203main ()
11204{
11205static int test_array [1 - 2 * !(((char) -1) < 0)];
11206test_array [0] = 0
11207
11208 ;
11209 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011210}
Martin v. Löwis11437992002-04-12 09:54:03 +000011211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011212if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011213 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011214else
Matthias Kloseb9621712010-04-24 17:59:49 +000011215 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11220$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011221if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011222 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223
11224fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11227$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011228if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011229 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011230else
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011232/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011233
Martin v. Löwis11437992002-04-12 09:54:03 +000011234int
11235main ()
11236{
11237/* FIXME: Include the comments suggested by Paul. */
11238#ifndef __cplusplus
11239 /* Ultrix mips cc rejects this. */
11240 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243 char const *const *pcpcc;
11244 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 /* NEC SVR4.0.2 mips cc rejects this. */
11246 struct point {int x, y;};
11247 static struct point const zero = {0,0};
11248 /* AIX XL C 1.02.0.0 rejects this.
11249 It does not let you subtract one const X* pointer from another in
11250 an arm of an if-expression whose if-part is not a constant
11251 expression */
11252 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011253 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011255 ++pcpcc;
11256 ppc = (char**) pcpcc;
11257 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 { /* SCO 3.2v4 cc rejects this. */
11259 char *t;
11260 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011261
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 }
11265 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11266 int x[] = {25, 17};
11267 const int *foo = &x[0];
11268 ++foo;
11269 }
11270 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11271 typedef const int *iptr;
11272 iptr p = 0;
11273 ++p;
11274 }
11275 { /* AIX XL C 1.02.0.0 rejects this saying
11276 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11277 struct s { int j; const int *ap[3]; };
11278 struct s *b; b->j = 5;
11279 }
11280 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11281 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011283 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011285#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011286
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 ;
11288 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011289}
Martin v. Löwis11437992002-04-12 09:54:03 +000011290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011291if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011292 ac_cv_c_const=yes
11293else
Matthias Kloseb9621712010-04-24 17:59:49 +000011294 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11299$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011300if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011303
11304fi
11305
Michael W. Hudson54241132001-12-07 15:38:26 +000011306
Guido van Rossumda88dad1995-01-26 00:46:29 +000011307works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11309$as_echo_n "checking for working volatile... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011312
Martin v. Löwis11437992002-04-12 09:54:03 +000011313int
11314main ()
11315{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011316volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 ;
11318 return 0;
11319}
11320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011321if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011322 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011323else
Skip Montanaro6dead952003-09-25 14:50:04 +000011324
Matthias Kloseb9621712010-04-24 17:59:49 +000011325$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011327
Guido van Rossum627b2d71993-12-24 10:39:16 +000011328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11331$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011332
Guido van Rossumda88dad1995-01-26 00:46:29 +000011333works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11335$as_echo_n "checking for working signed char... " >&6; }
11336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011337/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011338
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ;
11344 return 0;
11345}
11346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011347if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011348 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011349else
Skip Montanaro6dead952003-09-25 14:50:04 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011352
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011353
Guido van Rossum7f43da71994-08-01 12:15:30 +000011354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11357$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011358
Guido van Rossumda88dad1995-01-26 00:46:29 +000011359have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11361$as_echo_n "checking for prototypes... " >&6; }
11362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011363/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011364int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ;
11370 return 0;
11371}
11372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Matthias Kloseb9621712010-04-24 17:59:49 +000011375$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
Matthias Kloseb159a552010-04-25 21:00:44 +000011377 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11381$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011382
Guido van Rossumda88dad1995-01-26 00:46:29 +000011383works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11385$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011387/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011388
11389#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011390int foo(int x, ...) {
11391 va_list va;
11392 va_start(va, x);
11393 va_arg(va, int);
11394 va_arg(va, char *);
11395 va_arg(va, double);
11396 return 0;
11397}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011398
Martin v. Löwis11437992002-04-12 09:54:03 +000011399int
11400main ()
11401{
Guido van Rossum90eea071996-08-30 20:58:57 +000011402return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 ;
11404 return 0;
11405}
11406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011408
11409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011411
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011412 works=yes
11413
Guido van Rossum627b2d71993-12-24 10:39:16 +000011414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11417$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011418
Martin v. Löwisd6320502004-08-12 13:45:08 +000011419# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11421$as_echo_n "checking for socketpair... " >&6; }
11422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011423/* end confdefs.h. */
11424
11425#include <sys/types.h>
11426#include <sys/socket.h>
11427
11428int
11429main ()
11430{
11431void *x=socketpair
11432 ;
11433 return 0;
11434}
11435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011437
Matthias Kloseb9621712010-04-24 17:59:49 +000011438$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011439
Matthias Kloseb159a552010-04-25 21:00:44 +000011440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011441$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011442else
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11444$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011445
11446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011448
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011449# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11451$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011453/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011454#include <sys/types.h>
11455#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011456int
11457main ()
11458{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011459struct sockaddr x;
11460x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 ;
11462 return 0;
11463}
11464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011465if ac_fn_c_try_compile "$LINENO"; then :
11466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11467$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011470
11471else
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11473$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011474
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011477
Guido van Rossumda88dad1995-01-26 00:46:29 +000011478va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11480$as_echo_n "checking whether va_list is an array... " >&6; }
11481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011483
11484#ifdef HAVE_STDARG_PROTOTYPES
11485#include <stdarg.h>
11486#else
11487#include <varargs.h>
11488#endif
11489
Martin v. Löwis11437992002-04-12 09:54:03 +000011490int
11491main ()
11492{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011493va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 ;
11495 return 0;
11496}
11497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011498if ac_fn_c_try_compile "$LINENO"; then :
11499
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500else
Skip Montanaro6dead952003-09-25 14:50:04 +000011501
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
Guido van Rossumda88dad1995-01-26 00:46:29 +000011505 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011506
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11510$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011512# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
11514
Matthias Kloseb9621712010-04-24 17:59:49 +000011515ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Gregory P. Smith69140482012-01-16 02:05:55 -080011516if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517
Matthias Kloseb9621712010-04-24 17:59:49 +000011518 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11521$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011522 OLD_CFLAGS=$CFLAGS
11523 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011525/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011526
11527# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011528
Martin v. Löwis11437992002-04-12 09:54:03 +000011529int
11530main ()
11531{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011532
11533 char *name;
11534 struct hostent *he, *res;
11535 char buffer[2048];
11536 int buflen = 2048;
11537 int h_errnop;
11538
11539 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011540
11541 ;
11542 return 0;
11543}
11544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Matthias Kloseb9621712010-04-24 17:59:49 +000011550$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11553$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011555else
Skip Montanaro6dead952003-09-25 14:50:04 +000011556
Matthias Kloseb9621712010-04-24 17:59:49 +000011557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11558$as_echo "no" >&6; }
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11560$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011564# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011565
Martin v. Löwis11437992002-04-12 09:54:03 +000011566int
11567main ()
11568{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011569
11570 char *name;
11571 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011572 char buffer[2048];
11573 int buflen = 2048;
11574 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011575
Matthias Kloseb159a552010-04-25 21:00:44 +000011576 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011577
11578 ;
11579 return 0;
11580}
11581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011583
Matthias Kloseb9621712010-04-24 17:59:49 +000011584 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011585
Martin v. Löwis11437992002-04-12 09:54:03 +000011586
Matthias Kloseb159a552010-04-25 21:00:44 +000011587$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11590$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011592else
Skip Montanaro6dead952003-09-25 14:50:04 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11595$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11597$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11599/* end confdefs.h. */
11600
11601# include <netdb.h>
11602
11603int
11604main ()
11605{
11606
11607 char *name;
11608 struct hostent *he;
11609 struct hostent_data data;
11610
11611 (void) gethostbyname_r(name, he, &data);
11612
11613 ;
11614 return 0;
11615}
11616_ACEOF
11617if ac_fn_c_try_compile "$LINENO"; then :
11618
11619 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11620
11621
11622$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11623
11624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11625$as_echo "yes" >&6; }
11626
11627else
11628
11629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11630$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011634
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011640 CFLAGS=$OLD_CFLAGS
11641
11642else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 for ac_func in gethostbyname
11645do :
11646 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Gregory P. Smith69140482012-01-16 02:05:55 -080011647if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011649#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011650_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011651
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011652fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011653done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011654
Michael W. Hudson54241132001-12-07 15:38:26 +000011655
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011656fi
11657
Michael W. Hudson54241132001-12-07 15:38:26 +000011658
11659
11660
11661
11662
11663
Guido van Rossum627b2d71993-12-24 10:39:16 +000011664# checks for system services
11665# (none yet)
11666
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011667# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011668ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Gregory P. Smith69140482012-01-16 02:05:55 -080011669if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011670
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011671else
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11673$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011674if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011676else
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011678LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011682/* Override any GCC internal prototype to avoid an error.
11683 Use char because int might match the return type of a GCC
11684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011685#ifdef __cplusplus
11686extern "C"
11687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011688char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011689int
11690main ()
11691{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 ;
11694 return 0;
11695}
11696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011697if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011698 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011702rm -f core conftest.err conftest.$ac_objext \
11703 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011704LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11707$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011708if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 cat >>confdefs.h <<_ACEOF
11710#define HAVE_LIBIEEE 1
11711_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011712
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011713 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011714
Guido van Rossum627b2d71993-12-24 10:39:16 +000011715fi
11716
Michael W. Hudson54241132001-12-07 15:38:26 +000011717
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011718fi
11719
Michael W. Hudson54241132001-12-07 15:38:26 +000011720
Guido van Rossum7f253911997-05-09 02:42:48 +000011721# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11723$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011726if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011727 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011728if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011729then
11730
Matthias Kloseb9621712010-04-24 17:59:49 +000011731$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11734$as_echo "yes" >&6; }
11735else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011737fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011738else
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11740$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011741fi
11742
Guido van Rossum7f253911997-05-09 02:42:48 +000011743
Guido van Rossum7f43da71994-08-01 12:15:30 +000011744# check for --with-libm=...
11745
Guido van Rossum563e7081996-09-10 18:20:48 +000011746case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011747Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011748*) LIBM=-lm
11749esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11751$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011753# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011754if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011755 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011756if test "$withval" = no
11757then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11759$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011760elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011761then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11763$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011764else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011765fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11768$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011769fi
11770
Guido van Rossum7f43da71994-08-01 12:15:30 +000011771
11772# check for --with-libc=...
11773
Matthias Kloseb9621712010-04-24 17:59:49 +000011774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11775$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011777# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011778if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011780if test "$withval" = no
11781then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11783$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011784elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011785then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11787$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011788else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011789fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11792$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793fi
11794
Guido van Rossum7f43da71994-08-01 12:15:30 +000011795
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011796# **************************************************
11797# * Check for various properties of floating point *
11798# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011799
Matthias Kloseb9621712010-04-24 17:59:49 +000011800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11801$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011802if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011804else
11805
Matthias Kloseb9621712010-04-24 17:59:49 +000011806if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807 ac_cv_little_endian_double=no
11808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011810/* end confdefs.h. */
11811
11812#include <string.h>
11813int main() {
11814 double x = 9006104071832581.0;
11815 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11816 return 0;
11817 else
11818 return 1;
11819}
11820
11821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011822if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011823 ac_cv_little_endian_double=yes
11824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011829fi
11830
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831fi
11832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11834$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011835if test "$ac_cv_little_endian_double" = yes
11836then
11837
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839
11840fi
11841
Matthias Kloseb9621712010-04-24 17:59:49 +000011842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11843$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011844if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846else
11847
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011849 ac_cv_big_endian_double=no
11850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011852/* end confdefs.h. */
11853
11854#include <string.h>
11855int main() {
11856 double x = 9006104071832581.0;
11857 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11858 return 0;
11859 else
11860 return 1;
11861}
11862
11863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011864if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011865 ac_cv_big_endian_double=yes
11866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011871fi
11872
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011873fi
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11876$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011877if test "$ac_cv_big_endian_double" = yes
11878then
11879
Matthias Kloseb9621712010-04-24 17:59:49 +000011880$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011881
11882fi
11883
11884# Some ARM platforms use a mixed-endian representation for doubles.
11885# While Python doesn't currently have full support for these platforms
11886# (see e.g., issue 1762561), we can at least make sure that float <-> string
11887# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11889$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080011890if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011892else
11893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011895 ac_cv_mixed_endian_double=no
11896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011898/* end confdefs.h. */
11899
11900#include <string.h>
11901int main() {
11902 double x = 9006104071832581.0;
11903 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11904 return 0;
11905 else
11906 return 1;
11907}
11908
11909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011910if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011911 ac_cv_mixed_endian_double=yes
11912else
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11916 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011917fi
11918
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011919fi
11920
Matthias Kloseb9621712010-04-24 17:59:49 +000011921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11922$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011923if test "$ac_cv_mixed_endian_double" = yes
11924then
11925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011927
11928fi
11929
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011930# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011931# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011932# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011933# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011934# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011935# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011936
11937# This inline assembler syntax may also work for suncc and icc,
11938# so we try it on all platforms.
11939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11941$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011943/* end confdefs.h. */
11944
11945int
11946main ()
11947{
11948
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011949 unsigned short cw;
11950 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11951 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011952
11953 ;
11954 return 0;
11955}
11956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011957if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011958 have_gcc_asm_for_x87=yes
11959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011961fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11964$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011965if test "$have_gcc_asm_for_x87" = yes
11966then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011967
Matthias Kloseb9621712010-04-24 17:59:49 +000011968$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011969
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011971
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011972# Detect whether system arithmetic is subject to x87-style double
11973# rounding issues. The result of this test has little meaning on non
11974# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11975# mode is round-to-nearest and double rounding issues are present, and
11976# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11978$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011979# $BASECFLAGS may affect the result
11980ac_save_cc="$CC"
11981CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011983 ac_cv_x87_double_rounding=no
11984else
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011986/* end confdefs.h. */
11987
11988#include <stdlib.h>
11989#include <math.h>
11990int main() {
11991 volatile double x, y, z;
11992 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11993 x = 0.99999999999999989; /* 1-2**-53 */
11994 y = 1./x;
11995 if (y != 1.)
11996 exit(0);
11997 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11998 x = 1e16;
11999 y = 2.99999;
12000 z = x + y;
12001 if (z != 1e16+4.)
12002 exit(0);
12003 /* both tests show evidence of double rounding */
12004 exit(1);
12005}
12006
12007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012008if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012009 ac_cv_x87_double_rounding=no
12010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012015fi
12016
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012017CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12019$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012020if test "$ac_cv_x87_double_rounding" = yes
12021then
12022
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012024
12025fi
12026
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012027# ************************************
12028# * Check for mathematical functions *
12029# ************************************
12030
12031LIBS_SAVE=$LIBS
12032LIBS="$LIBS $LIBM"
12033
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012034for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12035do :
12036 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12037ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012038if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012039 cat >>confdefs.h <<_ACEOF
12040#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12041_ACEOF
12042
12043fi
12044done
12045
12046for ac_func in hypot lgamma log1p round tgamma
12047do :
12048 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12049ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012050if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012051 cat >>confdefs.h <<_ACEOF
12052#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12053_ACEOF
12054
12055fi
12056done
12057
12058ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12059"
Gregory P. Smith69140482012-01-16 02:05:55 -080012060if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012061 ac_have_decl=1
12062else
12063 ac_have_decl=0
12064fi
12065
12066cat >>confdefs.h <<_ACEOF
12067#define HAVE_DECL_ISINF $ac_have_decl
12068_ACEOF
12069ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12070"
Gregory P. Smith69140482012-01-16 02:05:55 -080012071if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012072 ac_have_decl=1
12073else
12074 ac_have_decl=0
12075fi
12076
12077cat >>confdefs.h <<_ACEOF
12078#define HAVE_DECL_ISNAN $ac_have_decl
12079_ACEOF
12080ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12081"
Gregory P. Smith69140482012-01-16 02:05:55 -080012082if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012083 ac_have_decl=1
12084else
12085 ac_have_decl=0
12086fi
12087
12088cat >>confdefs.h <<_ACEOF
12089#define HAVE_DECL_ISFINITE $ac_have_decl
12090_ACEOF
12091
12092
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012093# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12094# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12096$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012097if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012099else
12100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012102 ac_cv_tanh_preserves_zero_sign=no
12103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012105/* end confdefs.h. */
12106
12107#include <math.h>
12108#include <stdlib.h>
12109int main() {
12110 /* return 0 if either negative zeros don't exist
12111 on this platform or if negative zeros exist
12112 and tanh(-0.) == -0. */
12113 if (atan2(0., -1.) == atan2(-0., -1.) ||
12114 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12115 else exit(1);
12116}
12117
12118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012119if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012120 ac_cv_tanh_preserves_zero_sign=yes
12121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12125 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012126fi
12127
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012128fi
12129
Matthias Kloseb9621712010-04-24 17:59:49 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12131$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012132if test "$ac_cv_tanh_preserves_zero_sign" = yes
12133then
12134
Matthias Kloseb9621712010-04-24 17:59:49 +000012135$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012136
12137fi
12138
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012139if test "$ac_cv_func_log1p" = yes
12140then
12141 # On some versions of AIX, log1p(-0.) returns 0. instead of
12142 # -0. See issue #9920.
12143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12144$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012145 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012146 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012147else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012148
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012149 if test "$cross_compiling" = yes; then :
12150 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012151else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12153/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012154
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012155 #include <math.h>
12156 #include <stdlib.h>
12157 int main() {
12158 /* Fail if the signs of log1p(-0.) and -0. can be
12159 distinguished. */
12160 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12161 return 0;
12162 else
12163 return 1;
12164 }
12165
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012166_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012167if ac_fn_c_try_run "$LINENO"; then :
12168 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012169else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012170 ac_cv_log1p_drops_zero_sign=yes
12171fi
12172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012174fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012175
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012176fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012177
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12179$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12180fi
12181if test "$ac_cv_log1p_drops_zero_sign" = yes
12182then
12183
12184$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12185
12186fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012187
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012188LIBS=$LIBS_SAVE
12189
Mark Dickinsona614f042009-11-28 12:48:43 +000012190# For multiprocessing module, check that sem_open
12191# actually works. For FreeBSD versions <= 7.2,
12192# the kernel module that provides POSIX semaphores
12193# isn't loaded by default, so an attempt to call
12194# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12196$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012197if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012199else
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012201 ac_cv_posix_semaphores_enabled=yes
12202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012204/* end confdefs.h. */
12205
12206#include <unistd.h>
12207#include <fcntl.h>
12208#include <stdio.h>
12209#include <semaphore.h>
12210#include <sys/stat.h>
12211
12212int main(void) {
12213 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12214 if (a == SEM_FAILED) {
12215 perror("sem_open");
12216 return 1;
12217 }
12218 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012219 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012220 return 0;
12221}
12222
12223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012225 ac_cv_posix_semaphores_enabled=yes
12226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12230 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012231fi
12232
12233
Mark Dickinsona614f042009-11-28 12:48:43 +000012234fi
12235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12237$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012238if test $ac_cv_posix_semaphores_enabled = no
12239then
12240
Matthias Kloseb9621712010-04-24 17:59:49 +000012241$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012242
12243fi
12244
Mark Dickinson10683072009-04-18 21:18:19 +000012245# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12247$as_echo_n "checking for broken sem_getvalue... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012248if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012250else
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012252 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012253else
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012255/* end confdefs.h. */
12256
12257#include <unistd.h>
12258#include <fcntl.h>
12259#include <stdio.h>
12260#include <semaphore.h>
12261#include <sys/stat.h>
12262
12263int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012264 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012265 int count;
12266 int res;
12267 if(a==SEM_FAILED){
12268 perror("sem_open");
12269 return 1;
12270
12271 }
12272 res = sem_getvalue(a, &count);
12273 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012274 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012275 return res==-1 ? 1 : 0;
12276}
12277
Mark Dickinson10683072009-04-18 21:18:19 +000012278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012279if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012280 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012281else
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12285 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012286fi
12287
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012288
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012289fi
12290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12292$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012293if test $ac_cv_broken_sem_getvalue = yes
12294then
12295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012297
12298fi
12299
Mark Dickinsonbd792642009-03-18 20:06:12 +000012300# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12302$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012303# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012304if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012305 enableval=$enable_big_digits; case $enable_big_digits in
12306yes)
12307 enable_big_digits=30 ;;
12308no)
12309 enable_big_digits=15 ;;
1231015|30)
12311 ;;
12312*)
Gregory P. Smith69140482012-01-16 02:05:55 -080012313 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 +000012314esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12316$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012317
12318cat >>confdefs.h <<_ACEOF
12319#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12320_ACEOF
12321
12322
12323else
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12325$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012326fi
12327
12328
Guido van Rossumef2255b2000-03-10 22:30:29 +000012329# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012330ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Gregory P. Smith69140482012-01-16 02:05:55 -080012331if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
12333
Matthias Kloseb9621712010-04-24 17:59:49 +000012334$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012335
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012336 wchar_h="yes"
12337
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338else
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012340
12341fi
12342
Michael W. Hudson54241132001-12-07 15:38:26 +000012343
Martin v. Löwis11437992002-04-12 09:54:03 +000012344
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012345# determine wchar_t size
12346if test "$wchar_h" = yes
12347then
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12350# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12351# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12353$as_echo_n "checking size of wchar_t... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012354if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012356else
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12358"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
Martin v. Löwis11437992002-04-12 09:54:03 +000012360else
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 if test "$ac_cv_type_wchar_t" = yes; then
12362 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12363$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012364as_fn_error 77 "cannot compute sizeof (wchar_t)
Gregory P. Smith69140482012-01-16 02:05:55 -080012365See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366 else
12367 ac_cv_sizeof_wchar_t=0
12368 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012370
Martin v. Löwis11437992002-04-12 09:54:03 +000012371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12373$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
12375
12376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012378#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012379_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012380
Michael W. Hudson54241132001-12-07 15:38:26 +000012381
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012382fi
12383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12385$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012386have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012388/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012389
12390#include <tcl.h>
12391#if TCL_UTF_MAX != 6
12392# error "NOT UCS4_TCL"
12393#endif
12394int
12395main ()
12396{
12397
12398 ;
12399 return 0;
12400}
12401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012403
12404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012406
12407 have_ucs4_tcl=yes
12408
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12412$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012413
Skip Montanaro6dead952003-09-25 14:50:04 +000012414# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012415if test "$wchar_h" = yes
12416then
12417 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12419$as_echo_n "checking whether wchar_t is signed... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012420 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012422else
12423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012425 ac_cv_wchar_t_signed=yes
12426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012428/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012429
12430 #include <wchar.h>
12431 int main()
12432 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012433 /* Success: exit code 0 */
12434 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012435 }
12436
12437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012439 ac_cv_wchar_t_signed=yes
12440else
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12444 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012445fi
12446
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012447fi
12448
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12450$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451fi
12452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12454$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012455
12456# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012457if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012458 withval=$with_wide_unicode;
12459if test "$withval" != no
12460then unicode_size="4"
12461else unicode_size="2"
12462fi
12463
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012464else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465
Georg Brandl52d168a2008-01-07 18:10:24 +000012466case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012467 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012468 *) unicode_size="2" ;;
12469esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012470
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012471fi
12472
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012473
12474
Georg Brandl52d168a2008-01-07 18:10:24 +000012475case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012476 4)
12477 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12478
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012479 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012480 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012482 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012483esac
12484
Michael W. Hudson54241132001-12-07 15:38:26 +000012485
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Georg Brandl52d168a2008-01-07 18:10:24 +000012487# wchar_t is only usable if it maps to an unsigned type
12488if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012489 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012490then
12491 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012494
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012496
Georg Brandl52d168a2008-01-07 18:10:24 +000012497elif test "$ac_cv_sizeof_short" = "$unicode_size"
12498then
12499 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012501
Georg Brandl52d168a2008-01-07 18:10:24 +000012502elif test "$ac_cv_sizeof_long" = "$unicode_size"
12503then
12504 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012506
Georg Brandl52d168a2008-01-07 18:10:24 +000012507else
12508 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12511$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012512
12513# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12515$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012516if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012518else
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 ac_cv_c_bigendian=unknown
12520 # See if we're dealing with a universal compiler.
12521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12522/* end confdefs.h. */
12523#ifndef __APPLE_CC__
12524 not a universal capable compiler
12525 #endif
12526 typedef int dummy;
12527
Skip Montanaro6dead952003-09-25 14:50:04 +000012528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012529if ac_fn_c_try_compile "$LINENO"; then :
12530
12531 # Check for potential -arch flags. It is not universal unless
12532 # there are at least two -arch flags with different values.
12533 ac_arch=
12534 ac_prev=
12535 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12536 if test -n "$ac_prev"; then
12537 case $ac_word in
12538 i?86 | x86_64 | ppc | ppc64)
12539 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12540 ac_arch=$ac_word
12541 else
12542 ac_cv_c_bigendian=universal
12543 break
12544 fi
12545 ;;
12546 esac
12547 ac_prev=
12548 elif test "x$ac_word" = "x-arch"; then
12549 ac_prev=arch
12550 fi
12551 done
12552fi
12553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12554 if test $ac_cv_c_bigendian = unknown; then
12555 # See if sys/param.h defines the BYTE_ORDER macro.
12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012557/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012558#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012560
Martin v. Löwis11437992002-04-12 09:54:03 +000012561int
12562main ()
12563{
Matthias Kloseb9621712010-04-24 17:59:49 +000012564#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12565 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12566 && LITTLE_ENDIAN)
12567 bogus endian macros
12568 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
12570 ;
12571 return 0;
12572}
12573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012574if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012575 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012578#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012580
Martin v. Löwis11437992002-04-12 09:54:03 +000012581int
12582main ()
12583{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012584#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012585 not big endian
12586 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012587
12588 ;
12589 return 0;
12590}
12591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012592if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012593 ac_cv_c_bigendian=yes
12594else
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012598fi
12599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12600 fi
12601 if test $ac_cv_c_bigendian = unknown; then
12602 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012605#include <limits.h>
12606
Martin v. Löwis11437992002-04-12 09:54:03 +000012607int
12608main ()
12609{
Matthias Kloseb9621712010-04-24 17:59:49 +000012610#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12611 bogus endian macros
12612 #endif
12613
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 ;
12615 return 0;
12616}
12617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012618if ac_fn_c_try_compile "$LINENO"; then :
12619 # It does; now see whether it defined to _BIG_ENDIAN or not.
12620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12621/* end confdefs.h. */
12622#include <limits.h>
12623
12624int
12625main ()
12626{
12627#ifndef _BIG_ENDIAN
12628 not big endian
12629 #endif
12630
12631 ;
12632 return 0;
12633}
12634_ACEOF
12635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012637else
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12641fi
12642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12643 fi
12644 if test $ac_cv_c_bigendian = unknown; then
12645 # Compile a test program.
12646 if test "$cross_compiling" = yes; then :
12647 # Try to guess by grepping values from an object file.
12648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12649/* end confdefs.h. */
12650short int ascii_mm[] =
12651 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12652 short int ascii_ii[] =
12653 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12654 int use_ascii (int i) {
12655 return ascii_mm[i] + ascii_ii[i];
12656 }
12657 short int ebcdic_ii[] =
12658 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12659 short int ebcdic_mm[] =
12660 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12661 int use_ebcdic (int i) {
12662 return ebcdic_mm[i] + ebcdic_ii[i];
12663 }
12664 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666int
12667main ()
12668{
12669return use_ascii (foo) == use_ebcdic (foo);
12670 ;
12671 return 0;
12672}
12673_ACEOF
12674if ac_fn_c_try_compile "$LINENO"; then :
12675 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12676 ac_cv_c_bigendian=yes
12677 fi
12678 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12679 if test "$ac_cv_c_bigendian" = unknown; then
12680 ac_cv_c_bigendian=no
12681 else
12682 # finding both strings is unlikely to happen, but who knows?
12683 ac_cv_c_bigendian=unknown
12684 fi
12685 fi
12686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012688else
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012690/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012691$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012692int
12693main ()
12694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 /* Are we little or big endian? From Harbison&Steele. */
12697 union
12698 {
12699 long int l;
12700 char c[sizeof (long int)];
12701 } u;
12702 u.l = 1;
12703 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704
12705 ;
12706 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012707}
Martin v. Löwis11437992002-04-12 09:54:03 +000012708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012709if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012710 ac_cv_c_bigendian=no
12711else
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12721$as_echo "$ac_cv_c_bigendian" >&6; }
12722 case $ac_cv_c_bigendian in #(
12723 yes)
12724 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12725;; #(
12726 no)
12727 ;; #(
12728 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012731
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 ;; #(
12733 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012734 as_fn_error $? "unknown endianness
Gregory P. Smith69140482012-01-16 02:05:55 -080012735 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012737
Michael W. Hudson54241132001-12-07 15:38:26 +000012738
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012739# ABI version string for Python extension modules. This appears between the
12740# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12741# from the following attributes which affect the ABI of this Python build (in
12742# this order):
12743#
12744# * The Python implementation (always 'cpython-' for us)
12745# * The major and minor version numbers
12746# * --with-pydebug (adds a 'd')
12747# * --with-pymalloc (adds a 'm')
12748# * --with-wide-unicode (adds a 'u')
12749#
12750# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012751# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12752# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012753
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12755$as_echo_n "checking ABIFLAGS... " >&6; }
12756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12757$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12759$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012760SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12762$as_echo "$SOABI" >&6; }
12763
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12765$as_echo_n "checking LDVERSION... " >&6; }
12766LDVERSION='$(VERSION)$(ABIFLAGS)'
12767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12768$as_echo "$LDVERSION" >&6; }
12769
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012770# SO is the extension of shared libraries `(including the dot!)
12771# -- usually .so, .sl on HP-UX, .dll on Cygwin
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12773$as_echo_n "checking SO... " >&6; }
12774if test -z "$SO"
12775then
12776 case $ac_sys_system in
12777 hp*|HP*)
12778 case `uname -m` in
12779 ia64) SO=.so;;
12780 *) SO=.sl;;
12781 esac
12782 ;;
12783 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012784 Linux*|GNU*)
12785 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012786 *) SO=.so;;
12787 esac
12788else
12789 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012790 echo
12791 echo '====================================================================='
12792 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012793 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012794 echo '+ Do you really mean to change the extension for shared libraries? +'
12795 echo '+ Continuing in 10 seconds to let you to ponder. +'
12796 echo '+ +'
12797 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012798 sleep 10
12799fi
12800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12801$as_echo "$SO" >&6; }
12802
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012803# Check whether right shifting a negative integer extends the sign bit
12804# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12806$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012807if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012809else
Martin v. Löwis11437992002-04-12 09:54:03 +000012810
Matthias Kloseb9621712010-04-24 17:59:49 +000012811if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012812 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012815/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012816
12817int main()
12818{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012819 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012820}
12821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012823if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012824 ac_cv_rshift_extends_sign=yes
12825else
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012830fi
12831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832fi
12833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12835$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012836if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012837then
Martin v. Löwis11437992002-04-12 09:54:03 +000012838
Matthias Kloseb9621712010-04-24 17:59:49 +000012839$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012840
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012841fi
12842
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012843# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12845$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012846if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012848else
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012851/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012852#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012853int
12854main ()
12855{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012856
12857 FILE *f = fopen("/dev/null", "r");
12858 flockfile(f);
12859 getc_unlocked(f);
12860 funlockfile(f);
12861
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ;
12863 return 0;
12864}
12865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012866if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012867 ac_cv_have_getc_unlocked=yes
12868else
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 ac_cv_have_getc_unlocked=no
12870fi
12871rm -f core conftest.err conftest.$ac_objext \
12872 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12876$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012877if test "$ac_cv_have_getc_unlocked" = yes
12878then
Martin v. Löwis11437992002-04-12 09:54:03 +000012879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012881
12882fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012883
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012884# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012885# save the value of LIBS so we don't actually link Python with readline
12886LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012887
Gregory P. Smith18820942008-09-07 06:24:49 +000012888# On some systems we need to link readline to a termcap compatible
12889# library. NOTE: Keep the precedence of listed libraries synchronised
12890# with setup.py.
12891py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12893$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012894for py_libtermcap in "" ncursesw ncurses curses termcap; do
12895 if test -z "$py_libtermcap"; then
12896 READLINE_LIBS="-lreadline"
12897 else
12898 READLINE_LIBS="-lreadline -l$py_libtermcap"
12899 fi
12900 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012902/* end confdefs.h. */
12903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904/* Override any GCC internal prototype to avoid an error.
12905 Use char because int might match the return type of a GCC
12906 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012907#ifdef __cplusplus
12908extern "C"
12909#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012910char readline ();
12911int
12912main ()
12913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012915 ;
12916 return 0;
12917}
12918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012919if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012920 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012922rm -f core conftest.err conftest.$ac_objext \
12923 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012924 if test $py_cv_lib_readline = yes; then
12925 break
12926 fi
12927done
12928# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12929#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012930if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12932$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012933else
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12935$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012938
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012939fi
12940
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012941# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12943$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012944if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012946else
12947 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012948LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012950/* end confdefs.h. */
12951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952/* Override any GCC internal prototype to avoid an error.
12953 Use char because int might match the return type of a GCC
12954 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012955#ifdef __cplusplus
12956extern "C"
12957#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012958char rl_callback_handler_install ();
12959int
12960main ()
12961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012963 ;
12964 return 0;
12965}
12966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012967if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012968 ac_cv_lib_readline_rl_callback_handler_install=yes
12969else
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012972rm -f core conftest.err conftest.$ac_objext \
12973 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012974LIBS=$ac_check_lib_save_LIBS
12975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12977$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080012978if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012979
Matthias Kloseb9621712010-04-24 17:59:49 +000012980$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012981
12982fi
12983
12984
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012985# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012987/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012988#include <readline/readline.h>
12989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012990if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012991 have_readline=yes
12992else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012993 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012994
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012995fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012996rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012997if test $have_readline = yes
12998then
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013000/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013001#include <readline/readline.h>
13002
13003_ACEOF
13004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013008
13009fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013010rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013013/* end confdefs.h. */
13014#include <readline/readline.h>
13015
13016_ACEOF
13017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013019
Matthias Kloseb9621712010-04-24 17:59:49 +000013020$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013021
13022fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013023rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013024
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013025fi
13026
Martin v. Löwis0daad592001-09-30 21:09:59 +000013027# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13029$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013030if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013031 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013032else
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013034LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038/* Override any GCC internal prototype to avoid an error.
13039 Use char because int might match the return type of a GCC
13040 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013041#ifdef __cplusplus
13042extern "C"
13043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013044char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013045int
13046main ()
13047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 ;
13050 return 0;
13051}
13052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013055else
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013058rm -f core conftest.err conftest.$ac_objext \
13059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013060LIBS=$ac_check_lib_save_LIBS
13061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13063$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013064if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013067
Martin v. Löwis0daad592001-09-30 21:09:59 +000013068fi
13069
Michael W. Hudson54241132001-12-07 15:38:26 +000013070
Thomas Wouters89d996e2007-09-08 17:39:28 +000013071# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13073$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013074if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013076else
13077 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013078LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013080/* end confdefs.h. */
13081
13082/* Override any GCC internal prototype to avoid an error.
13083 Use char because int might match the return type of a GCC
13084 builtin and then its argument prototype would still apply. */
13085#ifdef __cplusplus
13086extern "C"
13087#endif
13088char rl_completion_display_matches_hook ();
13089int
13090main ()
13091{
13092return rl_completion_display_matches_hook ();
13093 ;
13094 return 0;
13095}
13096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013097if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013098 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013102rm -f core conftest.err conftest.$ac_objext \
13103 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013104LIBS=$ac_check_lib_save_LIBS
13105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13107$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013108if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013109
Matthias Kloseb9621712010-04-24 17:59:49 +000013110$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013111
13112fi
13113
13114
Martin v. Löwis0daad592001-09-30 21:09:59 +000013115# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13117$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013118if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013120else
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013122LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126/* Override any GCC internal prototype to avoid an error.
13127 Use char because int might match the return type of a GCC
13128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013129#ifdef __cplusplus
13130extern "C"
13131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013132char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013133int
13134main ()
13135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013136return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 ;
13138 return 0;
13139}
13140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013141if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013143else
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013146rm -f core conftest.err conftest.$ac_objext \
13147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013148LIBS=$ac_check_lib_save_LIBS
13149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13151$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013152if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013155
Guido van Rossum353ae582001-07-10 16:45:32 +000013156fi
13157
Jack Jansendd19cf82001-12-06 22:36:17 +000013158
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013159# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013161/* end confdefs.h. */
13162#include <readline/readline.h>
13163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013164if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013165 have_readline=yes
13166else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013167 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013168
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013169fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013170rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013171if test $have_readline = yes
13172then
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013174/* end confdefs.h. */
13175#include <readline/readline.h>
13176
13177_ACEOF
13178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013182
13183fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013184rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013185
13186fi
13187
Martin v. Löwis82bca632006-02-10 20:49:30 +000013188# End of readline checks: restore LIBS
13189LIBS=$LIBS_no_readline
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13192$as_echo_n "checking for broken nice()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013193if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013195else
Martin v. Löwis11437992002-04-12 09:54:03 +000013196
Matthias Kloseb9621712010-04-24 17:59:49 +000013197if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013198 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013199else
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013201/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013202
13203int main()
13204{
13205 int val1 = nice(1);
13206 if (val1 != -1 && val1 == nice(2))
13207 exit(0);
13208 exit(1);
13209}
13210
Martin v. Löwis11437992002-04-12 09:54:03 +000013211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013212if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013213 ac_cv_broken_nice=yes
13214else
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013219fi
13220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221fi
13222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13224$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013225if test "$ac_cv_broken_nice" = yes
13226then
Martin v. Löwis11437992002-04-12 09:54:03 +000013227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013229
13230fi
13231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13233$as_echo_n "checking for broken poll()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013234if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013236else
Matthias Kloseb9621712010-04-24 17:59:49 +000013237 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013238 ac_cv_broken_poll=no
13239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013241/* end confdefs.h. */
13242
13243#include <poll.h>
13244
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013245int main()
13246{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013247 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013249
13250 close (42);
13251
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013252 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013253 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013254 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013255 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013256 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013257 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013258 return 1;
13259}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013260
13261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013262if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013263 ac_cv_broken_poll=yes
13264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13268 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271fi
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13274$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013275if test "$ac_cv_broken_poll" = yes
13276then
13277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013279
13280fi
13281
Brett Cannon43802422005-02-10 20:48:03 +000013282# 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 +000013283# (which is not required by ISO C or UNIX spec) and/or if we support
13284# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013285ac_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 +000013286#include <$ac_cv_struct_tm>
13287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288"
Gregory P. Smith69140482012-01-16 02:05:55 -080013289if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013290
13291cat >>confdefs.h <<_ACEOF
13292#define HAVE_STRUCT_TM_TM_ZONE 1
13293_ACEOF
13294
13295
13296fi
13297
13298if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013301
13302else
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13304"
Gregory P. Smith69140482012-01-16 02:05:55 -080013305if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309fi
13310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013312#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013313_ACEOF
13314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13316$as_echo_n "checking for tzname... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013317if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013321/* end confdefs.h. */
13322#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323#if !HAVE_DECL_TZNAME
13324extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013325#endif
13326
13327int
13328main ()
13329{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013331 ;
13332 return 0;
13333}
13334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013335if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013336 ac_cv_var_tzname=yes
13337else
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013340rm -f core conftest.err conftest.$ac_objext \
13341 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13344$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013345 if test $ac_cv_var_tzname = yes; then
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013348
13349 fi
13350fi
13351
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013352
Martin v. Löwis1d459062005-03-14 21:23:33 +000013353# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13355$as_echo_n "checking for working tzset()... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013356if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013358else
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013361 ac_cv_working_tzset=no
13362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013364/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013365
13366#include <stdlib.h>
13367#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013368#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013369
13370#if HAVE_TZNAME
13371extern char *tzname[];
13372#endif
13373
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013374int main()
13375{
Brett Cannon18367812003-09-19 00:59:16 +000013376 /* Note that we need to ensure that not only does tzset(3)
13377 do 'something' with localtime, but it works as documented
13378 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013379 This includes making sure that tzname is set properly if
13380 tm->tm_zone does not exist since it is the alternative way
13381 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013382
13383 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013384 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013385 */
13386
Martin v. Löwis1d459062005-03-14 21:23:33 +000013387 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013388 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13389
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013390 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013391 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013392 if (localtime(&groundhogday)->tm_hour != 0)
13393 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013394#if HAVE_TZNAME
13395 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13396 if (strcmp(tzname[0], "UTC") ||
13397 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13398 exit(1);
13399#endif
Brett Cannon18367812003-09-19 00:59:16 +000013400
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013401 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013402 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013403 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013404 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013405#if HAVE_TZNAME
13406 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13407 exit(1);
13408#endif
Brett Cannon18367812003-09-19 00:59:16 +000013409
13410 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13411 tzset();
13412 if (localtime(&groundhogday)->tm_hour != 11)
13413 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013414#if HAVE_TZNAME
13415 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13416 exit(1);
13417#endif
13418
13419#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013420 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13421 exit(1);
13422 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13423 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013424#endif
Brett Cannon18367812003-09-19 00:59:16 +000013425
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013426 exit(0);
13427}
13428
13429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013430if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013431 ac_cv_working_tzset=yes
13432else
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13436 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013437fi
13438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013439fi
13440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13442$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013443if test "$ac_cv_working_tzset" = yes
13444then
13445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013447
13448fi
13449
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013450# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13452$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013453if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013454 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013457/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013458#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013459int
13460main ()
13461{
13462
13463struct stat st;
13464st.st_mtim.tv_nsec = 1;
13465
13466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013471 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13476fi
13477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13479$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013480if test "$ac_cv_stat_tv_nsec" = yes
13481then
13482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013484
13485fi
13486
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013487# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13489$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013490if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013492else
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013494/* end confdefs.h. */
13495#include <sys/stat.h>
13496int
13497main ()
13498{
13499
13500struct stat st;
13501st.st_mtimespec.tv_nsec = 1;
13502
13503 ;
13504 return 0;
13505}
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013508 ac_cv_stat_tv_nsec2=yes
13509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13513fi
13514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13516$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013517if test "$ac_cv_stat_tv_nsec2" = yes
13518then
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013521
13522fi
13523
Jack Jansen666b1e72001-10-31 12:11:48 +000013524# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13526$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013527if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013529else
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013531/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013532#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013533int
13534main ()
13535{
Jack Jansen666b1e72001-10-31 12:11:48 +000013536
13537 int rtn;
13538 rtn = mvwdelch(0,0,0);
13539
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 ;
13541 return 0;
13542}
13543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013544if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013545 ac_cv_mvwdelch_is_expression=yes
13546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13550fi
13551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13553$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013554
13555if test "$ac_cv_mvwdelch_is_expression" = yes
13556then
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013559
13560fi
13561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13563$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013564if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013566else
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013568/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013569#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013570int
13571main ()
13572{
Jack Jansen666b1e72001-10-31 12:11:48 +000013573
13574 WINDOW *w;
13575 w->_flags = 0;
13576
Martin v. Löwis11437992002-04-12 09:54:03 +000013577 ;
13578 return 0;
13579}
13580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013581if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013582 ac_cv_window_has_flags=yes
13583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13587fi
13588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13590$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013591
Jack Jansen666b1e72001-10-31 12:11:48 +000013592
13593if test "$ac_cv_window_has_flags" = yes
13594then
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013597
13598fi
13599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13601$as_echo_n "checking for is_term_resized... " >&6; }
13602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013603/* end confdefs.h. */
13604#include <curses.h>
13605int
13606main ()
13607{
13608void *x=is_term_resized
13609 ;
13610 return 0;
13611}
13612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013616
Matthias Kloseb159a552010-04-25 21:00:44 +000013617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013619else
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13621$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013622
13623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13627$as_echo_n "checking for resize_term... " >&6; }
13628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013629/* end confdefs.h. */
13630#include <curses.h>
13631int
13632main ()
13633{
13634void *x=resize_term
13635 ;
13636 return 0;
13637}
13638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013639if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013642
Matthias Kloseb159a552010-04-25 21:00:44 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013644$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013645else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13647$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013648
13649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13653$as_echo_n "checking for resizeterm... " >&6; }
13654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013655/* end confdefs.h. */
13656#include <curses.h>
13657int
13658main ()
13659{
13660void *x=resizeterm
13661 ;
13662 return 0;
13663}
13664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013665if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013668
Matthias Kloseb159a552010-04-25 21:00:44 +000013669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013670$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013671else
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13673$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013674
13675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13679$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013680
13681if test -r /dev/ptmx
13682then
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13684$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013687
Thomas Wouters89f507f2006-12-13 04:49:30 +000013688else
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13690$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013691fi
13692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13694$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013695
13696if test -r /dev/ptc
13697then
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13699$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013702
Thomas Wouters89f507f2006-12-13 04:49:30 +000013703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13705$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013706fi
13707
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013708if test "$have_long_long" = yes
13709then
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13711$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013712 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013716 ac_cv_have_long_long_format=no
13717else
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013719/* end confdefs.h. */
13720
13721 #include <stdio.h>
13722 #include <stddef.h>
13723 #include <string.h>
13724
13725 #ifdef HAVE_SYS_TYPES_H
13726 #include <sys/types.h>
13727 #endif
13728
13729 int main()
13730 {
13731 char buffer[256];
13732
13733 if (sprintf(buffer, "%lld", (long long)123) < 0)
13734 return 1;
13735 if (strcmp(buffer, "123"))
13736 return 1;
13737
13738 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13739 return 1;
13740 if (strcmp(buffer, "-123"))
13741 return 1;
13742
13743 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13744 return 1;
13745 if (strcmp(buffer, "123"))
13746 return 1;
13747
13748 return 0;
13749 }
13750
13751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013752if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013753 ac_cv_have_long_long_format=yes
13754else
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013759fi
13760
13761
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013762fi
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13765$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013766fi
13767
Mark Dickinson89d7d412009-12-31 20:50:59 +000013768if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013769then
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013772
13773fi
13774
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013775if test $ac_sys_system = Darwin
13776then
13777 LIBS="$LIBS -framework CoreFoundation"
13778fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13781$as_echo_n "checking for %zd printf() format support... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013782if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013784else
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013786 ac_cv_have_size_t_format="cross -- assuming yes"
13787
Thomas Wouters477c8d52006-05-27 19:21:47 +000013788else
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013790/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013791
Thomas Wouters477c8d52006-05-27 19:21:47 +000013792#include <stdio.h>
13793#include <stddef.h>
13794#include <string.h>
13795
Christian Heimes2c181612007-12-17 20:04:13 +000013796#ifdef HAVE_SYS_TYPES_H
13797#include <sys/types.h>
13798#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013799
13800#ifdef HAVE_SSIZE_T
13801typedef ssize_t Py_ssize_t;
13802#elif SIZEOF_VOID_P == SIZEOF_LONG
13803typedef long Py_ssize_t;
13804#else
13805typedef int Py_ssize_t;
13806#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013807
Christian Heimes2c181612007-12-17 20:04:13 +000013808int main()
13809{
13810 char buffer[256];
13811
Thomas Wouters477c8d52006-05-27 19:21:47 +000013812 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13813 return 1;
13814
Thomas Wouters89f507f2006-12-13 04:49:30 +000013815 if (strcmp(buffer, "123"))
13816 return 1;
13817
13818 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13819 return 1;
13820
13821 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013822 return 1;
13823
13824 return 0;
13825}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013826
Thomas Wouters477c8d52006-05-27 19:21:47 +000013827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013828if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013829 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013830else
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13834 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013835fi
13836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13839$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013840if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013841
Matthias Kloseb9621712010-04-24 17:59:49 +000013842$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013843
13844fi
13845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013847#ifdef HAVE_SYS_TYPES_H
13848#include <sys/types.h>
13849#endif
13850#ifdef HAVE_SYS_SOCKET_H
13851#include <sys/socket.h>
13852#endif
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854"
Gregory P. Smith69140482012-01-16 02:05:55 -080013855if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013860
13861fi
13862
Michael W. Hudson54241132001-12-07 15:38:26 +000013863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13865$as_echo_n "checking for broken mbstowcs... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013866if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013868else
Matthias Kloseb9621712010-04-24 17:59:49 +000013869 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013870 ac_cv_broken_mbstowcs=no
13871else
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013873/* end confdefs.h. */
13874
13875#include<stdlib.h>
13876int main() {
13877 size_t len = -1;
13878 const char *str = "text";
13879 len = mbstowcs(NULL, str, 0);
13880 return (len != 4);
13881}
13882
13883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013884if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013885 ac_cv_broken_mbstowcs=no
13886else
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013891fi
13892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013893fi
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13896$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013897if test "$ac_cv_broken_mbstowcs" = yes
13898then
13899
Matthias Kloseb9621712010-04-24 17:59:49 +000013900$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013901
13902fi
13903
Antoine Pitrou042b1282010-08-13 21:15:58 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13905$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Gregory P. Smith69140482012-01-16 02:05:55 -080013906if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013907 $as_echo_n "(cached) " >&6
13908else
13909 if test "$cross_compiling" = yes; then :
13910 ac_cv_computed_gotos=no
13911else
13912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13913/* end confdefs.h. */
13914
13915int main(int argc, char **argv)
13916{
13917 static void *targets[1] = { &&LABEL1 };
13918 goto LABEL2;
13919LABEL1:
13920 return 0;
13921LABEL2:
13922 goto *targets[0];
13923 return 1;
13924}
13925
13926_ACEOF
13927if ac_fn_c_try_run "$LINENO"; then :
13928 ac_cv_computed_gotos=yes
13929else
13930 ac_cv_computed_gotos=no
13931fi
13932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13933 conftest.$ac_objext conftest.beam conftest.$ac_ext
13934fi
13935
13936fi
13937
13938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13939$as_echo "$ac_cv_computed_gotos" >&6; }
13940if test "$ac_cv_computed_gotos" = yes
13941then
13942
13943$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13944
13945fi
13946
Antoine Pitroub52ec782009-01-25 16:34:23 +000013947# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13949$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013950
13951# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013952if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013953 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013954if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013955then
13956
Matthias Kloseb9621712010-04-24 17:59:49 +000013957$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13960$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013961fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013962if test "$withval" = no
13963then
13964
13965$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13968$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013969fi
13970
Antoine Pitrou042b1282010-08-13 21:15:58 +000013971else
13972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13973$as_echo "no value specified" >&6; }
13974fi
13975
Antoine Pitroub52ec782009-01-25 16:34:23 +000013976
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013977case $ac_sys_system in
13978AIX*)
13979
13980$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13981 ;;
13982esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013983
Michael W. Hudson54241132001-12-07 15:38:26 +000013984
Jesus Cea6a792292010-05-03 21:18:48 +000013985case $ac_sys_system in
Gregory P. Smith69140482012-01-16 02:05:55 -080013986 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 +000013987esac
13988
Gregory P. Smith138fa432010-12-13 08:00:52 +000013989ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Gregory P. Smith69140482012-01-16 02:05:55 -080013990if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013991
13992$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13993
13994fi
Jesus Cea6a792292010-05-03 21:18:48 +000013995
13996
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013997
13998
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013999for h in `(cd $srcdir;echo Python/thread_*.h)`
14000do
14001 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14002done
14003
Michael W. Hudson54241132001-12-07 15:38:26 +000014004
Neal Norwitzd24499d2005-12-18 21:36:39 +000014005SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14007$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014008for dir in $SRCDIRS; do
14009 if test ! -d $dir; then
14010 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014011 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014012done
Matthias Kloseb9621712010-04-24 17:59:49 +000014013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14014$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014015
Guido van Rossum627b2d71993-12-24 10:39:16 +000014016# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014017ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014018
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014019ac_config_files="$ac_config_files Modules/ld_so_aix"
14020
Martin v. Löwis11437992002-04-12 09:54:03 +000014021cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014022# This file is a shell script that caches the results of configure
14023# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014024# scripts and configure runs, see configure's option --config-cache.
14025# It is not useful on other systems. If it contains results you don't
14026# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014027#
Martin v. Löwis11437992002-04-12 09:54:03 +000014028# config.status only pays attention to the cache file if you give it
14029# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014030#
Skip Montanaro6dead952003-09-25 14:50:04 +000014031# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014032# loading this file, other *unset* `ac_cv_foo' will be assigned the
14033# following values.
14034
14035_ACEOF
14036
Guido van Rossumf78abae1997-01-21 22:02:36 +000014037# The following way of writing the cache mishandles newlines in values,
14038# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014040# Ultrix sh set writes to stderr and can't be redirected directly,
14041# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014042(
14043 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14044 eval ac_val=\$$ac_var
14045 case $ac_val in #(
14046 *${as_nl}*)
14047 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14049$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014050 esac
14051 case $ac_var in #(
14052 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014053 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14054 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055 esac ;;
14056 esac
14057 done
14058
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14061 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014062 # `set' does not quote correctly, so add quotes: double-quote
14063 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014065 "s/'/'\\\\''/g;
14066 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014067 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 *)
14069 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014070 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014071 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072 esac |
14073 sort
14074) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014076 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14080 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14082 :end' >>confcache
14083if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14084 if test -w "$cache_file"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014085 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014086 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14087$as_echo "$as_me: updating cache $cache_file" >&6;}
Gregory P. Smith69140482012-01-16 02:05:55 -080014088 if test ! -f "$cache_file" || test -h "$cache_file"; then
14089 cat confcache >"$cache_file"
14090 else
14091 case $cache_file in #(
14092 */* | ?:*)
14093 mv -f confcache "$cache_file"$$ &&
14094 mv -f "$cache_file"$$ "$cache_file" ;; #(
14095 *)
14096 mv -f confcache "$cache_file" ;;
14097 esac
14098 fi
14099 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014100 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14102$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014103 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014104fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014105rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014106
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014107test "x$prefix" = xNONE && prefix=$ac_default_prefix
14108# Let make expand exec_prefix.
14109test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014110
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111DEFS=-DHAVE_CONFIG_H
14112
Skip Montanaro6dead952003-09-25 14:50:04 +000014113ac_libobjs=
14114ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014115U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014116for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14117 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14121 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14123 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014124done
14125LIBOBJS=$ac_libobjs
14126
14127LTLIBOBJS=$ac_ltlibobjs
14128
14129
Martin v. Löwis11437992002-04-12 09:54:03 +000014130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131
Gregory P. Smith69140482012-01-16 02:05:55 -080014132: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014133ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014134ac_clean_files_save=$ac_clean_files
14135ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014136{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14137$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14138as_write_fail=0
14139cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014140#! $SHELL
14141# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014142# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014143# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014144# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014145
Martin v. Löwis11437992002-04-12 09:54:03 +000014146debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014147ac_cs_recheck=false
14148ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014149
Matthias Kloseb9621712010-04-24 17:59:49 +000014150SHELL=\${CONFIG_SHELL-$SHELL}
14151export SHELL
14152_ASEOF
14153cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14154## -------------------- ##
14155## M4sh Initialization. ##
14156## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158# Be more Bourne compatible
14159DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014160if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 emulate sh
14162 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014164 # is contrary to our usage. Disable this feature.
14165 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014167else
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 case `(set -o) 2>/dev/null` in #(
14169 *posix*) :
14170 set -o posix ;; #(
14171 *) :
14172 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014173esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014174fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014175
14176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177as_nl='
14178'
14179export as_nl
14180# Printing a long string crashes Solaris 7 /usr/bin/printf.
14181as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14182as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14183as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14184# Prefer a ksh shell builtin over an external printf program on Solaris,
14185# but without wasting forks for bash or zsh.
14186if test -z "$BASH_VERSION$ZSH_VERSION" \
14187 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14188 as_echo='print -r --'
14189 as_echo_n='print -rn --'
14190elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14191 as_echo='printf %s\n'
14192 as_echo_n='printf %s'
14193else
14194 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14195 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14196 as_echo_n='/usr/ucb/echo -n'
14197 else
14198 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14199 as_echo_n_body='eval
14200 arg=$1;
14201 case $arg in #(
14202 *"$as_nl"*)
14203 expr "X$arg" : "X\\(.*\\)$as_nl";
14204 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14205 esac;
14206 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14207 '
14208 export as_echo_n_body
14209 as_echo_n='sh -c $as_echo_n_body as_echo'
14210 fi
14211 export as_echo_body
14212 as_echo='sh -c $as_echo_body as_echo'
14213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014214
14215# The user is always right.
14216if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 PATH_SEPARATOR=:
14218 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14219 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14220 PATH_SEPARATOR=';'
14221 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224
14225# IFS
14226# We need space, tab and new line, in precisely that order. Quoting is
14227# there to prevent editors from complaining about space-tab.
14228# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14229# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230IFS=" "" $as_nl"
14231
14232# Find who we are. Look in the path if we contain no directory separator.
Gregory P. Smith69140482012-01-16 02:05:55 -080014233as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014234case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235 *[\\/]* ) as_myself=$0 ;;
14236 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014237for as_dir in $PATH
14238do
14239 IFS=$as_save_IFS
14240 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14242 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245 ;;
14246esac
14247# We did not find ourselves, most probably we were run as `sh COMMAND'
14248# in which case we are not to be found in the path.
14249if test "x$as_myself" = x; then
14250 as_myself=$0
14251fi
14252if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014253 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14254 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255fi
14256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257# Unset variables that we do not need and which cause bugs (e.g. in
14258# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14259# suppresses any "Segmentation fault" message there. '((' could
14260# trigger a bug in pdksh 5.2.14.
14261for as_var in BASH_ENV ENV MAIL MAILPATH
14262do eval test x\${$as_var+set} = xset \
14263 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014264done
14265PS1='$ '
14266PS2='> '
14267PS4='+ '
14268
14269# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014270LC_ALL=C
14271export LC_ALL
14272LANGUAGE=C
14273export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274
Matthias Kloseb9621712010-04-24 17:59:49 +000014275# CDPATH.
14276(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14277
14278
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014279# as_fn_error STATUS ERROR [LINENO LOG_FD]
14280# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014281# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14282# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014283# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014284as_fn_error ()
14285{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014286 as_status=$1; test $as_status -eq 0 && as_status=1
14287 if test "$4"; then
14288 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14289 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014291 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 as_fn_exit $as_status
14293} # as_fn_error
14294
14295
14296# as_fn_set_status STATUS
14297# -----------------------
14298# Set $? to STATUS, without forking.
14299as_fn_set_status ()
14300{
14301 return $1
14302} # as_fn_set_status
14303
14304# as_fn_exit STATUS
14305# -----------------
14306# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14307as_fn_exit ()
14308{
14309 set +e
14310 as_fn_set_status $1
14311 exit $1
14312} # as_fn_exit
14313
14314# as_fn_unset VAR
14315# ---------------
14316# Portably unset VAR.
14317as_fn_unset ()
14318{
14319 { eval $1=; unset $1;}
14320}
14321as_unset=as_fn_unset
14322# as_fn_append VAR VALUE
14323# ----------------------
14324# Append the text in VALUE to the end of the definition contained in VAR. Take
14325# advantage of any shell optimizations that allow amortized linear growth over
14326# repeated appends, instead of the typical quadratic growth present in naive
14327# implementations.
14328if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14329 eval 'as_fn_append ()
14330 {
14331 eval $1+=\$2
14332 }'
14333else
14334 as_fn_append ()
14335 {
14336 eval $1=\$$1\$2
14337 }
14338fi # as_fn_append
14339
14340# as_fn_arith ARG...
14341# ------------------
14342# Perform arithmetic evaluation on the ARGs, and store the result in the
14343# global $as_val. Take advantage of shells that can avoid forks. The arguments
14344# must be portable across $(()) and expr.
14345if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14346 eval 'as_fn_arith ()
14347 {
14348 as_val=$(( $* ))
14349 }'
14350else
14351 as_fn_arith ()
14352 {
14353 as_val=`expr "$@" || test $? -eq 1`
14354 }
14355fi # as_fn_arith
14356
14357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014358if expr a : '\(a\)' >/dev/null 2>&1 &&
14359 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14360 as_expr=expr
14361else
14362 as_expr=false
14363fi
14364
14365if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14366 as_basename=basename
14367else
14368 as_basename=false
14369fi
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14372 as_dirname=dirname
14373else
14374 as_dirname=false
14375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014377as_me=`$as_basename -- "$0" ||
14378$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14379 X"$0" : 'X\(//\)$' \| \
14380 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014381$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382 sed '/^.*\/\([^/][^/]*\)\/*$/{
14383 s//\1/
14384 q
14385 }
14386 /^X\/\(\/\/\)$/{
14387 s//\1/
14388 q
14389 }
14390 /^X\/\(\/\).*/{
14391 s//\1/
14392 q
14393 }
14394 s/.*/./; q'`
14395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396# Avoid depending upon Character Ranges.
14397as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14398as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14399as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14400as_cr_digits='0123456789'
14401as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014402
14403ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014404case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 xy) ECHO_C='\c';;
14409 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14410 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014411 esac;;
14412*)
14413 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014414esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014415
Martin v. Löwis11437992002-04-12 09:54:03 +000014416rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417if test -d conf$$.dir; then
14418 rm -f conf$$.dir/conf$$.file
14419else
14420 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014423if (echo >conf$$.file) 2>/dev/null; then
14424 if ln -s conf$$.file conf$$ 2>/dev/null; then
14425 as_ln_s='ln -s'
14426 # ... but there are two gotchas:
14427 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14428 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14429 # In both cases, we have to default to `cp -p'.
14430 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14431 as_ln_s='cp -p'
14432 elif ln conf$$.file conf$$ 2>/dev/null; then
14433 as_ln_s=ln
14434 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014437else
14438 as_ln_s='cp -p'
14439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14441rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443
14444# as_fn_mkdir_p
14445# -------------
14446# Create "$as_dir" as a directory, including parents if necessary.
14447as_fn_mkdir_p ()
14448{
14449
14450 case $as_dir in #(
14451 -*) as_dir=./$as_dir;;
14452 esac
14453 test -d "$as_dir" || eval $as_mkdir_p || {
14454 as_dirs=
14455 while :; do
14456 case $as_dir in #(
14457 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14458 *) as_qdir=$as_dir;;
14459 esac
14460 as_dirs="'$as_qdir' $as_dirs"
14461 as_dir=`$as_dirname -- "$as_dir" ||
14462$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14463 X"$as_dir" : 'X\(//\)[^/]' \| \
14464 X"$as_dir" : 'X\(//\)$' \| \
14465 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14466$as_echo X"$as_dir" |
14467 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14468 s//\1/
14469 q
14470 }
14471 /^X\(\/\/\)[^/].*/{
14472 s//\1/
14473 q
14474 }
14475 /^X\(\/\/\)$/{
14476 s//\1/
14477 q
14478 }
14479 /^X\(\/\).*/{
14480 s//\1/
14481 q
14482 }
14483 s/.*/./; q'`
14484 test -d "$as_dir" && break
14485 done
14486 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014487 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014488
14489
14490} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014491if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014493else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014494 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014495 as_mkdir_p=false
14496fi
14497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014498if test -x / >/dev/null 2>&1; then
14499 as_test_x='test -x'
14500else
14501 if ls -dL / >/dev/null 2>&1; then
14502 as_ls_L_option=L
14503 else
14504 as_ls_L_option=
14505 fi
14506 as_test_x='
14507 eval sh -c '\''
14508 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 case $1 in #(
14512 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515 ???[sx]*):;;*)false;;esac;fi
14516 '\'' sh
14517 '
14518fi
14519as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
14521# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014522as_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 +000014523
14524# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014525as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014526
14527
Martin v. Löwis11437992002-04-12 09:54:03 +000014528exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014529## ----------------------------------- ##
14530## Main body of $CONFIG_STATUS script. ##
14531## ----------------------------------- ##
14532_ASEOF
14533test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14536# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014537# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538# values after options handling.
14539ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014540This file was extended by python $as_me 3.2, which was
Gregory P. Smith69140482012-01-16 02:05:55 -080014541generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014542
14543 CONFIG_FILES = $CONFIG_FILES
14544 CONFIG_HEADERS = $CONFIG_HEADERS
14545 CONFIG_LINKS = $CONFIG_LINKS
14546 CONFIG_COMMANDS = $CONFIG_COMMANDS
14547 $ $0 $@
14548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549on `(hostname || uname -n) 2>/dev/null | sed 1q`
14550"
14551
Martin v. Löwis11437992002-04-12 09:54:03 +000014552_ACEOF
14553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554case $ac_config_files in *"
14555"*) set x $ac_config_files; shift; ac_config_files=$*;;
14556esac
14557
14558case $ac_config_headers in *"
14559"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14560esac
14561
14562
14563cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014564# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014565config_files="$ac_config_files"
14566config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014569
Matthias Kloseb9621712010-04-24 17:59:49 +000014570cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014571ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014572\`$as_me' instantiates files and other configuration actions
14573from templates according to the current configuration. Unless the files
14574and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
14578 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 --config print configuration, then exit
14581 -q, --quiet, --silent
14582 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 -d, --debug don't remove temporary files
14584 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 --file=FILE[:TEMPLATE]
14586 instantiate the configuration file FILE
14587 --header=FILE[:TEMPLATE]
14588 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
14590Configuration files:
14591$config_files
14592
14593Configuration headers:
14594$config_headers
14595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014599cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14600ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014601ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014602python config.status 3.2
Gregory P. Smith69140482012-01-16 02:05:55 -080014603configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014605
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014606Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014607This config.status script is free software; the Free Software Foundation
14608gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609
14610ac_pwd='$ac_pwd'
14611srcdir='$srcdir'
14612INSTALL='$INSTALL'
Trent Nelsona45afca2012-08-30 14:32:02 +000014613MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014614test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014615_ACEOF
14616
Matthias Kloseb9621712010-04-24 17:59:49 +000014617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14618# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014619ac_need_defaults=:
14620while test $# != 0
14621do
14622 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014623 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014624 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14625 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014626 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014628 --*=)
14629 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14630 ac_optarg=
14631 ac_shift=:
14632 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014634 ac_option=$1
14635 ac_optarg=$2
14636 ac_shift=shift
14637 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 esac
14639
Skip Montanaro6dead952003-09-25 14:50:04 +000014640 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014641 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014642 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14643 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 $as_echo "$ac_cs_version"; exit ;;
14646 --config | --confi | --conf | --con | --co | --c )
14647 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 debug=: ;;
14650 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014651 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 case $ac_optarg in
14653 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014654 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 esac
14656 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 ac_need_defaults=false;;
14658 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014659 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014660 case $ac_optarg in
14661 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14662 esac
14663 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014664 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665 --he | --h)
14666 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014667 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014668Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014671 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14672 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14673 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014674
14675 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014676 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014677Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014681
14682 esac
14683 shift
14684done
14685
Skip Montanaro6dead952003-09-25 14:50:04 +000014686ac_configure_extra_args=
14687
14688if $ac_cs_silent; then
14689 exec 6>/dev/null
14690 ac_configure_extra_args="$ac_configure_extra_args --silent"
14691fi
14692
14693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014695if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14697 shift
14698 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14699 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014702fi
14703
Martin v. Löwis11437992002-04-12 09:54:03 +000014704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706exec 5>>config.log
14707{
14708 echo
14709 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14710## Running $as_me. ##
14711_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
Matthias Kloseb9621712010-04-24 17:59:49 +000014719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720
14721# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014722for ac_config_target in $ac_config_targets
14723do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724 case $ac_config_target in
14725 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14726 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14727 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014728 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14729 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14731 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014732 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014733 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734
Gregory P. Smith69140482012-01-16 02:05:55 -080014735 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 esac
14737done
14738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739
Martin v. Löwis11437992002-04-12 09:54:03 +000014740# If the user did not use the arguments to specify the items to instantiate,
14741# then the envvar interface is used. Set only those that are not.
14742# We use the long form for the default assignment because of an extremely
14743# bizarre bug on SunOS 4.1.3.
14744if $ac_need_defaults; then
14745 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14746 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14747fi
14748
Skip Montanaro6dead952003-09-25 14:50:04 +000014749# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014751# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752# Hook for its removal unless debugging.
14753# Note that there is a small window in which the directory will not be cleaned:
14754# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014755$debug ||
14756{
Gregory P. Smith69140482012-01-16 02:05:55 -080014757 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014758 trap 'exit_status=$?
Gregory P. Smith69140482012-01-16 02:05:55 -080014759 : "${ac_tmp:=$tmp}"
14760 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014761' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014763}
Martin v. Löwis11437992002-04-12 09:54:03 +000014764# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014765
Martin v. Löwis11437992002-04-12 09:54:03 +000014766{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Gregory P. Smith69140482012-01-16 02:05:55 -080014768 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014769} ||
14770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771 tmp=./conf$$-$RANDOM
14772 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014773} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080014774ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014775
Matthias Kloseb9621712010-04-24 17:59:49 +000014776# Set up the scripts for CONFIG_FILES section.
14777# No need to generate them if there are no CONFIG_FILES.
14778# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014780
Matthias Kloseb9621712010-04-24 17:59:49 +000014781
14782ac_cr=`echo X | tr X '\015'`
14783# On cygwin, bash can eat \r inside `` if the user requested igncr.
14784# But we know of no other shell where ac_cr would be empty at this
14785# point, so we can use a bashism as a fallback.
14786if test "x$ac_cr" = x; then
14787 eval ac_cr=\$\'\\r\'
14788fi
14789ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14790if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014791 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014792else
14793 ac_cs_awk_cr=$ac_cr
14794fi
14795
Gregory P. Smith69140482012-01-16 02:05:55 -080014796echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014797_ACEOF
14798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800{
14801 echo "cat >conf$$subs.awk <<_ACEOF" &&
14802 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14803 echo "_ACEOF"
14804} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014805 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14806ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807ac_delim='%!_!# '
14808for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014810 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14813 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014814 break
14815 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014816 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817 else
14818 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014819 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820done
Matthias Kloseb9621712010-04-24 17:59:49 +000014821rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822
Matthias Kloseb9621712010-04-24 17:59:49 +000014823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Gregory P. Smith69140482012-01-16 02:05:55 -080014824cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014826sed -n '
14827h
14828s/^/S["/; s/!.*/"]=/
14829p
14830g
14831s/^[^!]*!//
14832:repl
14833t repl
14834s/'"$ac_delim"'$//
14835t delim
14836:nl
14837h
14838s/\(.\{148\}\)..*/\1/
14839t more1
14840s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14841p
14842n
14843b repl
14844:more1
14845s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14846p
14847g
14848s/.\{148\}//
14849t nl
14850:delim
14851h
14852s/\(.\{148\}\)..*/\1/
14853t more2
14854s/["\\]/\\&/g; s/^/"/; s/$/"/
14855p
14856b
14857:more2
14858s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14859p
14860g
14861s/.\{148\}//
14862t delim
14863' <conf$$subs.awk | sed '
14864/^[^""]/{
14865 N
14866 s/\n//
14867}
14868' >>$CONFIG_STATUS || ac_write_fail=1
14869rm -f conf$$subs.awk
14870cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14871_ACAWK
Gregory P. Smith69140482012-01-16 02:05:55 -080014872cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 for (key in S) S_is_set[key] = 1
14874 FS = ""
14875
14876}
14877{
14878 line = $ 0
14879 nfields = split(line, field, "@")
14880 substed = 0
14881 len = length(field[1])
14882 for (i = 2; i < nfields; i++) {
14883 key = field[i]
14884 keylen = length(key)
14885 if (S_is_set[key]) {
14886 value = S[key]
14887 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14888 len += length(value) + length(field[++i])
14889 substed = 1
14890 } else
14891 len += 1 + keylen
14892 }
14893
14894 print line
14895}
14896
14897_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014899cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14900if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14901 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14902else
14903 cat
Gregory P. Smith69140482012-01-16 02:05:55 -080014904fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014905 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014906_ACEOF
14907
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014908# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14909# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910# trailing colons and then remove the whole line if VPATH becomes empty
14911# (actually we leave an empty line to preserve line numbers).
14912if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014913 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14914h
14915s///
14916s/^/:/
14917s/[ ]*$/:/
14918s/:\$(srcdir):/:/g
14919s/:\${srcdir}:/:/g
14920s/:@srcdir@:/:/g
14921s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014923x
14924s/\(=[ ]*\).*/\1/
14925G
14926s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927s/^[^=]*=[ ]*$//
14928}'
14929fi
14930
Matthias Kloseb9621712010-04-24 17:59:49 +000014931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014932fi # test -n "$CONFIG_FILES"
14933
Matthias Kloseb9621712010-04-24 17:59:49 +000014934# Set up the scripts for CONFIG_HEADERS section.
14935# No need to generate them if there are no CONFIG_HEADERS.
14936# This happens for instance with `./config.status Makefile'.
14937if test -n "$CONFIG_HEADERS"; then
Gregory P. Smith69140482012-01-16 02:05:55 -080014938cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014939BEGIN {
14940_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942# Transform confdefs.h into an awk script `defines.awk', embedded as
14943# here-document in config.status, that substitutes the proper values into
14944# config.h.in to produce config.h.
14945
14946# Create a delimiter string that does not exist in confdefs.h, to ease
14947# handling of long lines.
14948ac_delim='%!_!# '
14949for ac_last_try in false false :; do
Gregory P. Smith69140482012-01-16 02:05:55 -080014950 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14951 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 break
14953 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014954 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 else
14956 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14957 fi
14958done
14959
14960# For the awk script, D is an array of macro values keyed by name,
14961# likewise P contains macro parameters if any. Preserve backslash
14962# newline sequences.
14963
14964ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14965sed -n '
14966s/.\{148\}/&'"$ac_delim"'/g
14967t rset
14968:rset
14969s/^[ ]*#[ ]*define[ ][ ]*/ /
14970t def
14971d
14972:def
14973s/\\$//
14974t bsnl
14975s/["\\]/\\&/g
14976s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14977D["\1"]=" \3"/p
14978s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14979d
14980:bsnl
14981s/["\\]/\\&/g
14982s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14983D["\1"]=" \3\\\\\\n"\\/p
14984t cont
14985s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14986t cont
14987d
14988:cont
14989n
14990s/.\{148\}/&'"$ac_delim"'/g
14991t clear
14992:clear
14993s/\\$//
14994t bsnlc
14995s/["\\]/\\&/g; s/^/"/; s/$/"/p
14996d
14997:bsnlc
14998s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14999b cont
15000' <confdefs.h | sed '
15001s/'"$ac_delim"'/"\\\
15002"/g' >>$CONFIG_STATUS || ac_write_fail=1
15003
15004cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15005 for (key in D) D_is_set[key] = 1
15006 FS = ""
15007}
15008/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15009 line = \$ 0
15010 split(line, arg, " ")
15011 if (arg[1] == "#") {
15012 defundef = arg[2]
15013 mac1 = arg[3]
15014 } else {
15015 defundef = substr(arg[1], 2)
15016 mac1 = arg[2]
15017 }
15018 split(mac1, mac2, "(") #)
15019 macro = mac2[1]
15020 prefix = substr(line, 1, index(line, defundef) - 1)
15021 if (D_is_set[macro]) {
15022 # Preserve the white space surrounding the "#".
15023 print prefix "define", macro P[macro] D[macro]
15024 next
15025 } else {
15026 # Replace #undef with comments. This is necessary, for example,
15027 # in the case of _POSIX_SOURCE, which is predefined and required
15028 # on some systems where configure will not decide to define it.
15029 if (defundef == "undef") {
15030 print "/*", prefix defundef, macro, "*/"
15031 next
15032 }
15033 }
15034}
15035{ print }
15036_ACAWK
15037_ACEOF
15038cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015039 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015040fi # test -n "$CONFIG_HEADERS"
15041
15042
15043eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15044shift
15045for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046do
15047 case $ac_tag in
15048 :[FHLC]) ac_mode=$ac_tag; continue;;
15049 esac
15050 case $ac_mode$ac_tag in
15051 :[FHL]*:*);;
Gregory P. Smith69140482012-01-16 02:05:55 -080015052 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053 :[FH]-) ac_tag=-:-;;
15054 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15055 esac
15056 ac_save_IFS=$IFS
15057 IFS=:
15058 set x $ac_tag
15059 IFS=$ac_save_IFS
15060 shift
15061 ac_file=$1
15062 shift
15063
15064 case $ac_mode in
15065 :L) ac_source=$1;;
15066 :[FH])
15067 ac_file_inputs=
15068 for ac_f
15069 do
15070 case $ac_f in
Gregory P. Smith69140482012-01-16 02:05:55 -080015071 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072 *) # Look for the file first in the build tree, then in the source tree
15073 # (if the path is not absolute). The absolute path cannot be DOS-style,
15074 # because $ac_f cannot contain `:'.
15075 test -f "$ac_f" ||
15076 case $ac_f in
15077 [\\/$]*) false;;
15078 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15079 esac ||
Gregory P. Smith69140482012-01-16 02:05:55 -080015080 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15083 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084 done
15085
15086 # Let's still pretend it is `configure' which instantiates (i.e., don't
15087 # use $as_me), people would be surprised to read:
15088 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 configure_input='Generated from '`
15090 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15091 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 if test x"$ac_file" != x-; then
15093 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015094 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15095$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 # Neutralize special characters interpreted by sed in replacement strings.
15098 case $configure_input in #(
15099 *\&* | *\|* | *\\* )
15100 ac_sed_conf_input=`$as_echo "$configure_input" |
15101 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15102 *) ac_sed_conf_input=$configure_input;;
15103 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104
15105 case $ac_tag in
Gregory P. Smith69140482012-01-16 02:05:55 -080015106 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15107 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108 esac
15109 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 esac
15111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015113$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015114 X"$ac_file" : 'X\(//\)[^/]' \| \
15115 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015117$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15119 s//\1/
15120 q
15121 }
15122 /^X\(\/\/\)[^/].*/{
15123 s//\1/
15124 q
15125 }
15126 /^X\(\/\/\)$/{
15127 s//\1/
15128 q
15129 }
15130 /^X\(\/\).*/{
15131 s//\1/
15132 q
15133 }
15134 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 ac_builddir=.
15137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138case "$ac_dir" in
15139.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15140*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015141 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 case $ac_top_builddir_sub in
15145 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15146 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15147 esac ;;
15148esac
15149ac_abs_top_builddir=$ac_pwd
15150ac_abs_builddir=$ac_pwd$ac_dir_suffix
15151# for backward compatibility:
15152ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015153
15154case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157 ac_top_srcdir=$ac_top_builddir_sub
15158 ac_abs_top_srcdir=$ac_pwd ;;
15159 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161 ac_top_srcdir=$srcdir
15162 ac_abs_top_srcdir=$srcdir ;;
15163 *) # Relative name.
15164 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15165 ac_top_srcdir=$ac_top_build_prefix$srcdir
15166 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015167esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015169
Martin v. Löwis11437992002-04-12 09:54:03 +000015170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171 case $ac_mode in
15172 :F)
15173 #
15174 # CONFIG_FILE
15175 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015176
15177 case $INSTALL in
15178 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 esac
Trent Nelsona45afca2012-08-30 14:32:02 +000015181 ac_MKDIR_P=$MKDIR_P
15182 case $MKDIR_P in
15183 [\\/$]* | ?:[\\/]* ) ;;
15184 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15185 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015186_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187
Matthias Kloseb9621712010-04-24 17:59:49 +000015188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189# If the template does not know about datarootdir, expand it.
15190# FIXME: This hack should be removed a few years after 2.60.
15191ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015192ac_sed_dataroot='
15193/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 p
15195 q
15196}
15197/@datadir@/p
15198/@docdir@/p
15199/@infodir@/p
15200/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015201/@mandir@/p'
15202case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203*datarootdir*) ac_datarootdir_seen=yes;;
15204*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15206$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209 ac_datarootdir_hack='
15210 s&@datadir@&$datadir&g
15211 s&@docdir@&$docdir&g
15212 s&@infodir@&$infodir&g
15213 s&@localedir@&$localedir&g
15214 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216esac
15217_ACEOF
15218
15219# Neutralize VPATH when `$srcdir' = `.'.
15220# Shell code in configure.ac might set extrasub.
15221# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015222cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15223ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015224$extrasub
15225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015227:t
15228/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015229s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015231s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232s&@srcdir@&$ac_srcdir&;t t
15233s&@abs_srcdir@&$ac_abs_srcdir&;t t
15234s&@top_srcdir@&$ac_top_srcdir&;t t
15235s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15236s&@builddir@&$ac_builddir&;t t
15237s&@abs_builddir@&$ac_abs_builddir&;t t
15238s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15239s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsona45afca2012-08-30 14:32:02 +000015240s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015242"
Gregory P. Smith69140482012-01-16 02:05:55 -080015243eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15244 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015246test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Gregory P. Smith69140482012-01-16 02:05:55 -080015247 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15248 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15249 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 { $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 +000015251which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015252$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015253which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015254
Gregory P. Smith69140482012-01-16 02:05:55 -080015255 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 case $ac_file in
Gregory P. Smith69140482012-01-16 02:05:55 -080015257 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15258 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015260 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261 ;;
15262 :H)
15263 #
15264 # CONFIG_HEADER
15265 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 {
15268 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015269 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15270 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015271 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Gregory P. Smith69140482012-01-16 02:05:55 -080015272 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15274$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 rm -f "$ac_file"
Gregory P. Smith69140482012-01-16 02:05:55 -080015277 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015278 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 fi
15280 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 $as_echo "/* $configure_input */" \
Gregory P. Smith69140482012-01-16 02:05:55 -080015282 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015283 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287
15288 esac
15289
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015290
15291 case $ac_file$ac_mode in
15292 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15293
15294 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295done # for ac_tag
15296
Guido van Rossum627b2d71993-12-24 10:39:16 +000015297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015299_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015300ac_clean_files=$ac_clean_files_save
15301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015303 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015304
Martin v. Löwis11437992002-04-12 09:54:03 +000015305
15306# configure is writing to config.log, and then calls config.status.
15307# config.status does its own redirection, appending to config.log.
15308# Unfortunately, on DOS this fails, as config.log is still kept open
15309# by configure, so config.status won't be able to write to it; its
15310# output is simply discarded. So we exec the FD to /dev/null,
15311# effectively closing config.log, so it can be properly (re)opened and
15312# appended to by config.status. When coming back to configure, we
15313# need to make the FD available again.
15314if test "$no_create" != yes; then
15315 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015316 ac_config_status_args=
15317 test "$silent" = yes &&
15318 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015320 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 exec 5>>config.log
15322 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15323 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015324 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015325fi
15326if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15328$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015329fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015330
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015331
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015332echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015333if test ! -f Modules/Setup
15334then
15335 cp $srcdir/Modules/Setup.dist Modules/Setup
15336fi
15337
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015338echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015339if test ! -f Modules/Setup.local
15340then
15341 echo "# Edit this file for local setup changes" >Modules/Setup.local
15342fi
15343
15344echo "creating Makefile"
15345$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15346 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015347 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015348mv config.c Modules