blob: 7b0c6a92948bef89e42bd42da6714df006c36396 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003# Generated by GNU Autoconf 2.69 for python 3.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $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 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_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 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Larry Hastingsf5002bd2014-03-16 23:05:59 -0700583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000667ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100669MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000670INSTALL_DATA
671INSTALL_SCRIPT
672INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530673OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200674PYTHON
675ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200676ac_ct_READELF
677READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000678ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200679ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000680AR
681RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000682USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000683GNULD
684LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000686RUNSHARED
687INSTSONAME
688LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000689PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BLDLIBRARY
691DLLLIBRARY
692LDLIBRARY
693LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100694MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000695BUILDEXEEXT
696EGREP
697GREP
698CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000701MAINCC
702CXX
703OBJEXT
704EXEEXT
705ac_ct_CC
706CPPFLAGS
707LDFLAGS
708CFLAGS
709CC
710EXPORT_MACOSX_DEPLOYMENT_TARGET
711CONFIGURE_MACOSX_DEPLOYMENT_TARGET
712SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200713_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000715FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800717FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKALTINSTALLLAST
719FRAMEWORKALTINSTALLFIRST
720FRAMEWORKINSTALLLAST
721FRAMEWORKINSTALLFIRST
722PYTHONFRAMEWORKINSTALLDIR
723PYTHONFRAMEWORKPREFIX
724PYTHONFRAMEWORKDIR
725PYTHONFRAMEWORKIDENTIFIER
726PYTHONFRAMEWORK
727LIPO_32BIT_FLAGS
728ARCH_RUN_32BIT
729UNIVERSALSDK
730CONFIG_ARGS
731SOVERSION
732VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500742HAS_HG
743HGBRANCH
744HGTAG
745HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400746BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000747target_alias
748host_alias
749build_alias
750LIBS
751ECHO_T
752ECHO_N
753ECHO_C
754DEFS
755mandir
756localedir
757libdir
758psdir
759pdfdir
760dvidir
761htmldir
762infodir
763docdir
764oldincludedir
765includedir
766localstatedir
767sharedstatedir
768sysconfdir
769datadir
770datarootdir
771libexecdir
772sbindir
773bindir
774program_transform_name
775prefix
776exec_prefix
777PACKAGE_URL
778PACKAGE_BUGREPORT
779PACKAGE_STRING
780PACKAGE_VERSION
781PACKAGE_TARNAME
782PACKAGE_NAME
783PATH_SEPARATOR
784SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000785ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_user_opts='
787enable_option_checking
788enable_universalsdk
789with_universal_archs
790with_framework_name
791enable_framework
792with_gcc
793with_cxx_main
794with_suffix
795enable_shared
796enable_profiling
797with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100798with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000799with_libs
800with_system_expat
801with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100802with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000803enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700804with_tcltk_includes
805with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_dbmliborder
807with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_threads
809with_thread
810enable_ipv6
811with_doc_strings
812with_tsc
813with_pymalloc
814with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_fpectl
816with_libm
817with_libc
818enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000819with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800820with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000821'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 ac_precious_vars='build_alias
823host_alias
824target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100825MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826CC
827CFLAGS
828LDFLAGS
829LIBS
830CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200831CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000835ac_init_help=
836ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000837ac_unrecognized_opts=
838ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839# The variables have the same names as the options, with
840# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000841cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844no_recursion=
845prefix=NONE
846program_prefix=NONE
847program_suffix=NONE
848program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853x_includes=NONE
854x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000855
856# Installation directory options.
857# These are left unexpanded so users can "make install exec_prefix=/foo"
858# and all the variables that are supposed to be based on exec_prefix
859# by default will actually change.
860# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862bindir='${exec_prefix}/bin'
863sbindir='${exec_prefix}/sbin'
864libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865datarootdir='${prefix}/share'
866datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867sysconfdir='${prefix}/etc'
868sharedstatedir='${prefix}/com'
869localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870includedir='${prefix}/include'
871oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
873infodir='${datarootdir}/info'
874htmldir='${docdir}'
875dvidir='${docdir}'
876pdfdir='${docdir}'
877psdir='${docdir}'
878libdir='${exec_prefix}/lib'
879localedir='${datarootdir}/locale'
880mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000885do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 # If the previous option needs an argument, assign it.
887 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889 ac_prev=
890 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000891 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200894 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
895 *=) ac_optarg= ;;
896 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899 # Accept the important Cygnus configure options, so we can diagnose typos.
900
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901 case $ac_dashdash$ac_option in
902 --)
903 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905 -bindir | --bindir | --bindi | --bind | --bin | --bi)
906 ac_prev=bindir ;;
907 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909
910 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 -cache-file | --cache-file | --cache-fil | --cache-fi \
916 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
917 ac_prev=cache_file ;;
918 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
919 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 cache_file=$ac_optarg ;;
921
922 --config-cache | -C)
923 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
931 | --dataroo | --dataro | --datar)
932 ac_prev=datarootdir ;;
933 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
934 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
935 datarootdir=$ac_optarg ;;
936
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000938 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000940 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200941 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000942 ac_useropt_orig=$ac_useropt
943 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
944 case $ac_user_opts in
945 *"
946"enable_$ac_useropt"
947"*) ;;
948 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
949 ac_unrecognized_sep=', ';;
950 esac
951 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952
953 -docdir | --docdir | --docdi | --doc | --do)
954 ac_prev=docdir ;;
955 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
956 docdir=$ac_optarg ;;
957
958 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
959 ac_prev=dvidir ;;
960 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
961 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
963 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200967 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
976 esac
977 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
980 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
981 | --exec | --exe | --ex)
982 ac_prev=exec_prefix ;;
983 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
984 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
985 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Obsolete; use --with-gas.
990 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 -help | --help | --hel | --he | -h)
993 ac_init_help=long ;;
994 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
995 ac_init_help=recursive ;;
996 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
997 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
999 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001004 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1005 ac_prev=htmldir ;;
1006 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1007 | --ht=*)
1008 htmldir=$ac_optarg ;;
1009
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010 -includedir | --includedir | --includedi | --included | --include \
1011 | --includ | --inclu | --incl | --inc)
1012 ac_prev=includedir ;;
1013 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1014 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -infodir | --infodir | --infodi | --infod | --info | --inf)
1018 ac_prev=infodir ;;
1019 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -libdir | --libdir | --libdi | --libd)
1023 ac_prev=libdir ;;
1024 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1028 | --libexe | --libex | --libe)
1029 ac_prev=libexecdir ;;
1030 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1031 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -localedir | --localedir | --localedi | --localed | --locale)
1035 ac_prev=localedir ;;
1036 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1037 localedir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 ac_prev=localstatedir ;;
1042 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1047 ac_prev=mandir ;;
1048 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052 # Obsolete; use --without-fp.
1053 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054
1055 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 no_create=yes ;;
1058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001059 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1060 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1061 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1064 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1065 | --oldin | --oldi | --old | --ol | --o)
1066 ac_prev=oldincludedir ;;
1067 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1068 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1069 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1073 ac_prev=prefix ;;
1074 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1078 | --program-pre | --program-pr | --program-p)
1079 ac_prev=program_prefix ;;
1080 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1081 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1085 | --program-suf | --program-su | --program-s)
1086 ac_prev=program_suffix ;;
1087 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1088 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -program-transform-name | --program-transform-name \
1092 | --program-transform-nam | --program-transform-na \
1093 | --program-transform-n | --program-transform- \
1094 | --program-transform | --program-transfor \
1095 | --program-transfo | --program-transf \
1096 | --program-trans | --program-tran \
1097 | --progr-tra | --program-tr | --program-t)
1098 ac_prev=program_transform_name ;;
1099 -program-transform-name=* | --program-transform-name=* \
1100 | --program-transform-nam=* | --program-transform-na=* \
1101 | --program-transform-n=* | --program-transform-=* \
1102 | --program-transform=* | --program-transfor=* \
1103 | --program-transfo=* | --program-transf=* \
1104 | --program-trans=* | --program-tran=* \
1105 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001108 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1109 ac_prev=pdfdir ;;
1110 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1111 pdfdir=$ac_optarg ;;
1112
1113 -psdir | --psdir | --psdi | --psd | --ps)
1114 ac_prev=psdir ;;
1115 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1116 psdir=$ac_optarg ;;
1117
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1119 | -silent | --silent | --silen | --sile | --sil)
1120 silent=yes ;;
1121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1123 ac_prev=sbindir ;;
1124 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1125 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127
1128 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1129 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1130 | --sharedst | --shareds | --shared | --share | --shar \
1131 | --sha | --sh)
1132 ac_prev=sharedstatedir ;;
1133 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1134 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1135 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1136 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 -site | --site | --sit)
1140 ac_prev=site ;;
1141 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1145 ac_prev=srcdir ;;
1146 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1150 | --syscon | --sysco | --sysc | --sys | --sy)
1151 ac_prev=sysconfdir ;;
1152 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1153 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160
1161 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1162 verbose=yes ;;
1163
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 -version | --version | --versio | --versi | --vers | -V)
1165 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001171 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 ac_useropt_orig=$ac_useropt
1173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1174 case $ac_user_opts in
1175 *"
1176"with_$ac_useropt"
1177"*) ;;
1178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1179 ac_unrecognized_sep=', ';;
1180 esac
1181 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
1183 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001187 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 ac_useropt_orig=$ac_useropt
1189 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1190 case $ac_user_opts in
1191 *"
1192"with_$ac_useropt"
1193"*) ;;
1194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1195 ac_unrecognized_sep=', ';;
1196 esac
1197 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 --x)
1200 # Obsolete; use --with-x.
1201 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1204 | --x-incl | --x-inc | --x-in | --x-i)
1205 ac_prev=x_includes ;;
1206 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1207 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1211 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1212 ac_prev=x_libraries ;;
1213 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1214 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1218Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219 ;;
1220
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 *=*)
1222 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 case $ac_envvar in #(
1225 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001228 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 export $ac_envvar ;;
1230
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001231 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001236 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 ;;
1238
1239 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240done
1241
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245fi
1246
Matthias Kloseb9621712010-04-24 17:59:49 +00001247if test -n "$ac_unrecognized_opts"; then
1248 case $enable_option_checking in
1249 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1252 esac
1253fi
1254
1255# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1257 datadir sysconfdir sharedstatedir localstatedir includedir \
1258 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1259 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001260do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 # Remove trailing slashes.
1263 case $ac_val in
1264 */ )
1265 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1266 eval $ac_var=\$ac_val;;
1267 esac
1268 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 [\\/$]* | ?:[\\/]* ) continue;;
1271 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001274done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276# There might be people who depend on the old broken behavior: `$host'
1277# used to hold the argument of --host etc.
1278# FIXME: To remove some day.
1279build=$build_alias
1280host=$host_alias
1281target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283# FIXME: To remove some day.
1284if test "x$host_alias" != x; then
1285 if test "x$build_alias" = x; then
1286 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 elif test "x$build_alias" != "x$host_alias"; then
1288 cross_compiling=yes
1289 fi
1290fi
1291
1292ac_tool_prefix=
1293test -n "$host_alias" && ac_tool_prefix=$host_alias-
1294
1295test "$silent" = yes && exec 6>/dev/null
1296
Guido van Rossum627b2d71993-12-24 10:39:16 +00001297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298ac_pwd=`pwd` && test -n "$ac_pwd" &&
1299ac_ls_di=`ls -di .` &&
1300ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304
1305
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306# Find the source files, if location was not specified.
1307if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001310 ac_confdir=`$as_dirname -- "$as_myself" ||
1311$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1312 X"$as_myself" : 'X\(//\)[^/]' \| \
1313 X"$as_myself" : 'X\(//\)$' \| \
1314 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1315$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1317 s//\1/
1318 q
1319 }
1320 /^X\(\/\/\)[^/].*/{
1321 s//\1/
1322 q
1323 }
1324 /^X\(\/\/\)$/{
1325 s//\1/
1326 q
1327 }
1328 /^X\(\/\).*/{
1329 s//\1/
1330 q
1331 }
1332 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335 srcdir=..
1336 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001337else
1338 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340if test ! -r "$srcdir/$ac_unique_file"; then
1341 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1345ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001346 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 pwd)`
1348# When building in place, set srcdir=.
1349if test "$ac_abs_confdir" = "$ac_pwd"; then
1350 srcdir=.
1351fi
1352# Remove unnecessary trailing slashes from srcdir.
1353# Double slashes in file names in object file debugging info
1354# mess up M-x gdb in Emacs.
1355case $srcdir in
1356*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1357esac
1358for ac_var in $ac_precious_vars; do
1359 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1360 eval ac_env_${ac_var}_value=\$${ac_var}
1361 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1363done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364
Martin v. Löwis11437992002-04-12 09:54:03 +00001365#
1366# Report the --help message.
1367#
1368if test "$ac_init_help" = "long"; then
1369 # Omit some internal or obsolete options to make the list less imposing.
1370 # This message is too long to be a string in the A/UX 3.1 sh.
1371 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001372\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373
1374Usage: $0 [OPTION]... [VAR=VALUE]...
1375
1376To assign environment variables (e.g., CC, CFLAGS...), specify them as
1377VAR=VALUE. See below for descriptions of some of the useful variables.
1378
1379Defaults for the options are specified in brackets.
1380
1381Configuration:
1382 -h, --help display this help and exit
1383 --help=short display options specific to this package
1384 --help=recursive display the short help of all the included packages
1385 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 --cache-file=FILE cache test results in FILE [disabled]
1388 -C, --config-cache alias for \`--cache-file=config.cache'
1389 -n, --no-create do not create output files
1390 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392Installation directories:
1393 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001394 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398By default, \`make install' will install all the files in
1399\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1400an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1401for instance \`--prefix=\$HOME'.
1402
1403For better control, use the options below.
1404
1405Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001406 --bindir=DIR user executables [EPREFIX/bin]
1407 --sbindir=DIR system admin executables [EPREFIX/sbin]
1408 --libexecdir=DIR program executables [EPREFIX/libexec]
1409 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1410 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1411 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1412 --libdir=DIR object code libraries [EPREFIX/lib]
1413 --includedir=DIR C header files [PREFIX/include]
1414 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1415 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1416 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1417 --infodir=DIR info documentation [DATAROOTDIR/info]
1418 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1419 --mandir=DIR man documentation [DATAROOTDIR/man]
1420 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1421 --htmldir=DIR html documentation [DOCDIR]
1422 --dvidir=DIR dvi documentation [DOCDIR]
1423 --pdfdir=DIR pdf documentation [DOCDIR]
1424 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425_ACEOF
1426
1427 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001428
1429System types:
1430 --build=BUILD configure for building on BUILD [guessed]
1431 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432_ACEOF
1433fi
1434
1435if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001436 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001437 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001438 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 cat <<\_ACEOF
1440
1441Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1444 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001445 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001446 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001447 --enable-framework[=INSTALLDIR]
1448 Build (MacOSX|Darwin) framework
1449 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001450 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001451 --enable-loadable-sqlite-extensions
1452 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --enable-ipv6 Enable ipv6 (with ipv4) support
1454 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001455 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458Optional Packages:
1459 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1460 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001461 --with-universal-archs=ARCH
1462 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001463 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001464 --with-framework-name=FRAMEWORK
1465 specify an alternate name of the framework built
1466 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001468 --with-cxx-main=<compiler>
1469 compile main() and link python executable with C++
1470 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with-suffix=.exe set executable suffix
1472 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001473 --with-hash-algorithm=[fnv|siphash24]
1474 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001476 --with-system-expat build pyexpat module using an installed expat
1477 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001478 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001479 --with-system-libmpdec build _decimal module using an installed libmpdec
1480 library
Ned Deilyd819b932013-09-06 01:07:05 -07001481 --with-tcltk-includes='-I...'
1482 override search for Tcl and Tk include files
1483 --with-tcltk-libs='-L...'
1484 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001485 --with-dbmliborder=db1:db2:...
1486 order to check db backends for dbm. Valid value is a
1487 colon separated string with the backend names
1488 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with(out)-threads[=DIRECTORY]
1491 disable/enable thread support
1492 --with(out)-thread[=DIRECTORY]
1493 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001495 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001497 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-fpectl enable SIGFPE catching
1499 --with-libm=STRING math library
1500 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001501 --with(out)-computed-gotos
1502 Use computed gotos in evaluation loop (enabled by
1503 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001504 --with(out)-ensurepip=[=upgrade]
1505 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
1507Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001508 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 CC C compiler command
1510 CFLAGS C compiler flags
1511 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1512 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 CPP C preprocessor
1517
1518Use these variables to override the choices made by `configure' or to help
1519it to find libraries and programs with nonstandard names/locations.
1520
Georg Brandle2e15612009-05-20 18:25:10 +00001521Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001524fi
1525
1526if test "$ac_init_help" = "recursive"; then
1527 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001529 test -d "$ac_dir" ||
1530 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1531 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 ac_builddir=.
1533
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534case "$ac_dir" in
1535.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1536*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001539 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 case $ac_top_builddir_sub in
1541 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1542 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1543 esac ;;
1544esac
1545ac_abs_top_builddir=$ac_pwd
1546ac_abs_builddir=$ac_pwd$ac_dir_suffix
1547# for backward compatibility:
1548ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
1550case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_top_srcdir=$ac_top_builddir_sub
1554 ac_abs_top_srcdir=$ac_pwd ;;
1555 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 ac_top_srcdir=$srcdir
1558 ac_abs_top_srcdir=$srcdir ;;
1559 *) # Relative name.
1560 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1561 ac_top_srcdir=$ac_top_build_prefix$srcdir
1562 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001563esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 cd "$ac_dir" || { ac_status=$?; continue; }
1567 # Check for guested configure.
1568 if test -f "$ac_srcdir/configure.gnu"; then
1569 echo &&
1570 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1571 elif test -f "$ac_srcdir/configure"; then
1572 echo &&
1573 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001575 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576 fi || ac_status=$?
1577 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 done
1579fi
1580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001582if $ac_init_version; then
1583 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001584python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001585generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001587Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001588This configure script is free software; the Free Software Foundation
1589gives unlimited permission to copy, distribute and modify it.
1590_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001593
1594## ------------------------ ##
1595## Autoconf initialization. ##
1596## ------------------------ ##
1597
1598# ac_fn_c_try_compile LINENO
1599# --------------------------
1600# Try to compile conftest.$ac_ext, and return whether this succeeded.
1601ac_fn_c_try_compile ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1604 rm -f conftest.$ac_objext
1605 if { { ac_try="$ac_compile"
1606case "(($ac_try" in
1607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1608 *) ac_try_echo=$ac_try;;
1609esac
1610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1611$as_echo "$ac_try_echo"; } >&5
1612 (eval "$ac_compile") 2>conftest.err
1613 ac_status=$?
1614 if test -s conftest.err; then
1615 grep -v '^ *+' conftest.err >conftest.er1
1616 cat conftest.er1 >&5
1617 mv -f conftest.er1 conftest.err
1618 fi
1619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1620 test $ac_status = 0; } && {
1621 test -z "$ac_c_werror_flag" ||
1622 test ! -s conftest.err
1623 } && test -s conftest.$ac_objext; then :
1624 ac_retval=0
1625else
1626 $as_echo "$as_me: failed program was:" >&5
1627sed 's/^/| /' conftest.$ac_ext >&5
1628
1629 ac_retval=1
1630fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001631 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 as_fn_set_status $ac_retval
1633
1634} # ac_fn_c_try_compile
1635
Matthias Kloseb9621712010-04-24 17:59:49 +00001636# ac_fn_c_try_link LINENO
1637# -----------------------
1638# Try to link conftest.$ac_ext, and return whether this succeeded.
1639ac_fn_c_try_link ()
1640{
1641 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1642 rm -f conftest.$ac_objext conftest$ac_exeext
1643 if { { ac_try="$ac_link"
1644case "(($ac_try" in
1645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1646 *) ac_try_echo=$ac_try;;
1647esac
1648eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1649$as_echo "$ac_try_echo"; } >&5
1650 (eval "$ac_link") 2>conftest.err
1651 ac_status=$?
1652 if test -s conftest.err; then
1653 grep -v '^ *+' conftest.err >conftest.er1
1654 cat conftest.er1 >&5
1655 mv -f conftest.er1 conftest.err
1656 fi
1657 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1658 test $ac_status = 0; } && {
1659 test -z "$ac_c_werror_flag" ||
1660 test ! -s conftest.err
1661 } && test -s conftest$ac_exeext && {
1662 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001663 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001664 }; then :
1665 ac_retval=0
1666else
1667 $as_echo "$as_me: failed program was:" >&5
1668sed 's/^/| /' conftest.$ac_ext >&5
1669
1670 ac_retval=1
1671fi
1672 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1673 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1674 # interfere with the next link command; also delete a directory that is
1675 # left behind by Apple's compiler. We do this before executing the actions.
1676 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001677 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_link
1681
Matthias Kloseb9621712010-04-24 17:59:49 +00001682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688 if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001703 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
1719# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1720# -------------------------------------------------------
1721# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1722# the include files in INCLUDES and setting the cache variable VAR
1723# accordingly.
1724ac_fn_c_check_header_mongrel ()
1725{
1726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001727 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1729$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001730if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 $as_echo_n "(cached) " >&6
1732fi
1733eval ac_res=\$$3
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1735$as_echo "$ac_res" >&6; }
1736else
1737 # Is the header compilable?
1738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1739$as_echo_n "checking $2 usability... " >&6; }
1740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742$4
1743#include <$2>
1744_ACEOF
1745if ac_fn_c_try_compile "$LINENO"; then :
1746 ac_header_compiler=yes
1747else
1748 ac_header_compiler=no
1749fi
1750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1752$as_echo "$ac_header_compiler" >&6; }
1753
1754# Is the header present?
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1756$as_echo_n "checking $2 presence... " >&6; }
1757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h. */
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_cpp "$LINENO"; then :
1762 ac_header_preproc=yes
1763else
1764 ac_header_preproc=no
1765fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001766rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1768$as_echo "$ac_header_preproc" >&6; }
1769
1770# So? What about this header?
1771case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1772 yes:no: )
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1774$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1776$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1777 ;;
1778 no:yes:* )
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1780$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1782$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1784$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1786$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1788$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001789( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001790## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001791## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 ) | sed "s/^/$as_me: WARNING: /" >&2
1793 ;;
1794esac
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001797if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001798 $as_echo_n "(cached) " >&6
1799else
1800 eval "$3=\$ac_header_compiler"
1801fi
1802eval ac_res=\$$3
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1804$as_echo "$ac_res" >&6; }
1805fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001806 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001807
1808} # ac_fn_c_check_header_mongrel
1809
1810# ac_fn_c_try_run LINENO
1811# ----------------------
1812# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1813# that executables *can* be run.
1814ac_fn_c_try_run ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 if { { ac_try="$ac_link"
1818case "(($ac_try" in
1819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1820 *) ac_try_echo=$ac_try;;
1821esac
1822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1823$as_echo "$ac_try_echo"; } >&5
1824 (eval "$ac_link") 2>&5
1825 ac_status=$?
1826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1828 { { case "(($ac_try" in
1829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1830 *) ac_try_echo=$ac_try;;
1831esac
1832eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1833$as_echo "$ac_try_echo"; } >&5
1834 (eval "$ac_try") 2>&5
1835 ac_status=$?
1836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837 test $ac_status = 0; }; }; then :
1838 ac_retval=0
1839else
1840 $as_echo "$as_me: program exited with status $ac_status" >&5
1841 $as_echo "$as_me: failed program was:" >&5
1842sed 's/^/| /' conftest.$ac_ext >&5
1843
1844 ac_retval=$ac_status
1845fi
1846 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001847 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 as_fn_set_status $ac_retval
1849
1850} # ac_fn_c_try_run
1851
1852# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1853# -------------------------------------------------------
1854# Tests whether HEADER exists and can be compiled using the include files in
1855# INCLUDES, setting the cache variable VAR accordingly.
1856ac_fn_c_check_header_compile ()
1857{
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1860$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001861if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001862 $as_echo_n "(cached) " >&6
1863else
1864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1865/* end confdefs.h. */
1866$4
1867#include <$2>
1868_ACEOF
1869if ac_fn_c_try_compile "$LINENO"; then :
1870 eval "$3=yes"
1871else
1872 eval "$3=no"
1873fi
1874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875fi
1876eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001879 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001880
1881} # ac_fn_c_check_header_compile
1882
Matthias Kloseb9621712010-04-24 17:59:49 +00001883# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1884# -------------------------------------------
1885# Tests whether TYPE exists after having included INCLUDES, setting cache
1886# variable VAR accordingly.
1887ac_fn_c_check_type ()
1888{
1889 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001892if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 $as_echo_n "(cached) " >&6
1894else
1895 eval "$3=no"
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$4
1899int
1900main ()
1901{
1902if (sizeof ($2))
1903 return 0;
1904 ;
1905 return 0;
1906}
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912int
1913main ()
1914{
1915if (sizeof (($2)))
1916 return 0;
1917 ;
1918 return 0;
1919}
1920_ACEOF
1921if ac_fn_c_try_compile "$LINENO"; then :
1922
1923else
1924 eval "$3=yes"
1925fi
1926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1927fi
1928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1929fi
1930eval ac_res=\$$3
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1932$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001933 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001934
1935} # ac_fn_c_check_type
1936
1937# ac_fn_c_find_uintX_t LINENO BITS VAR
1938# ------------------------------------
1939# Finds an unsigned integer type with width BITS, setting cache variable VAR
1940# accordingly.
1941ac_fn_c_find_uintX_t ()
1942{
1943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1945$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001946if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001947 $as_echo_n "(cached) " >&6
1948else
1949 eval "$3=no"
1950 # Order is important - never check a type that is potentially smaller
1951 # than half of the expected target width.
1952 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1953 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$ac_includes_default
1957int
1958main ()
1959{
1960static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001961test_array [0] = 0;
1962return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001963
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969 case $ac_type in #(
1970 uint$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001977 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001978
1979else
1980 break
1981fi
1982 done
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001987 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989} # ac_fn_c_find_uintX_t
1990
1991# ac_fn_c_find_intX_t LINENO BITS VAR
1992# -----------------------------------
1993# Finds a signed integer type with width BITS, setting cache variable VAR
1994# accordingly.
1995ac_fn_c_find_intX_t ()
1996{
1997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1999$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002000if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002001 $as_echo_n "(cached) " >&6
2002else
2003 eval "$3=no"
2004 # Order is important - never check a type that is potentially smaller
2005 # than half of the expected target width.
2006 for ac_type in int$2_t 'int' 'long int' \
2007 'long long int' 'short int' 'signed char'; do
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002011 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002012int
2013main ()
2014{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002015static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002027 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002028int
2029main ()
2030{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002032 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002033test_array [0] = 0;
2034return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041
2042else
2043 case $ac_type in #(
2044 int$2_t) :
2045 eval "$3=yes" ;; #(
2046 *) :
2047 eval "$3=\$ac_type" ;;
2048esac
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002053 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002054
2055else
2056 break
2057fi
2058 done
2059fi
2060eval ac_res=\$$3
2061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2062$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002063 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065} # ac_fn_c_find_intX_t
2066
2067# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2068# --------------------------------------------
2069# Tries to find the compile-time value of EXPR in a program that includes
2070# INCLUDES, setting VAR accordingly. Returns whether the value could be
2071# computed
2072ac_fn_c_compute_int ()
2073{
2074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075 if test "$cross_compiling" = yes; then
2076 # Depending upon the size, compute the lo and hi bounds.
2077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002084test_array [0] = 0;
2085return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002086
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_lo=0 ac_mid=0
2093 while :; do
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid; break
2110else
2111 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2112 if test $ac_lo -le $ac_mid; then
2113 ac_lo= ac_hi=
2114 break
2115 fi
2116 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 done
2120else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002128test_array [0] = 0;
2129return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002130
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=-1 ac_mid=-1
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002145test_array [0] = 0;
2146return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_lo=$ac_mid; break
2154else
2155 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2156 if test $ac_mid -le $ac_hi; then
2157 ac_lo= ac_hi=
2158 break
2159 fi
2160 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2161fi
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
2164else
2165 ac_lo= ac_hi=
2166fi
2167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170# Binary search between lo and hi bounds.
2171while test "x$ac_lo" != "x$ac_hi"; do
2172 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h. */
2175$4
2176int
2177main ()
2178{
2179static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002180test_array [0] = 0;
2181return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002182
2183 ;
2184 return 0;
2185}
2186_ACEOF
2187if ac_fn_c_try_compile "$LINENO"; then :
2188 ac_hi=$ac_mid
2189else
2190 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2191fi
2192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193done
2194case $ac_lo in #((
2195?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2196'') ac_retval=1 ;;
2197esac
2198 else
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h. */
2201$4
2202static long int longval () { return $2; }
2203static unsigned long int ulongval () { return $2; }
2204#include <stdio.h>
2205#include <stdlib.h>
2206int
2207main ()
2208{
2209
2210 FILE *f = fopen ("conftest.val", "w");
2211 if (! f)
2212 return 1;
2213 if (($2) < 0)
2214 {
2215 long int i = longval ();
2216 if (i != ($2))
2217 return 1;
2218 fprintf (f, "%ld", i);
2219 }
2220 else
2221 {
2222 unsigned long int i = ulongval ();
2223 if (i != ($2))
2224 return 1;
2225 fprintf (f, "%lu", i);
2226 }
2227 /* Do not output a trailing newline, as this causes \r\n confusion
2228 on some platforms. */
2229 return ferror (f) || fclose (f) != 0;
2230
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_run "$LINENO"; then :
2236 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2237else
2238 ac_retval=1
2239fi
2240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2241 conftest.$ac_objext conftest.beam conftest.$ac_ext
2242rm -f conftest.val
2243
2244 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002246 as_fn_set_status $ac_retval
2247
2248} # ac_fn_c_compute_int
2249
2250# ac_fn_c_check_func LINENO FUNC VAR
2251# ----------------------------------
2252# Tests whether FUNC exists, setting the cache variable VAR accordingly
2253ac_fn_c_check_func ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002258if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002259 $as_echo_n "(cached) " >&6
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2264 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2265#define $2 innocuous_$2
2266
2267/* System header to define __stub macros and hopefully few prototypes,
2268 which can conflict with char $2 (); below.
2269 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2270 <limits.h> exists even on freestanding compilers. */
2271
2272#ifdef __STDC__
2273# include <limits.h>
2274#else
2275# include <assert.h>
2276#endif
2277
2278#undef $2
2279
2280/* Override any GCC internal prototype to avoid an error.
2281 Use char because int might match the return type of a GCC
2282 builtin and then its argument prototype would still apply. */
2283#ifdef __cplusplus
2284extern "C"
2285#endif
2286char $2 ();
2287/* The GNU C library defines this for functions which it implements
2288 to always fail with ENOSYS. Some functions are actually named
2289 something starting with __ and the normal name is an alias. */
2290#if defined __stub_$2 || defined __stub___$2
2291choke me
2292#endif
2293
2294int
2295main ()
2296{
2297return $2 ();
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302if ac_fn_c_try_link "$LINENO"; then :
2303 eval "$3=yes"
2304else
2305 eval "$3=no"
2306fi
2307rm -f core conftest.err conftest.$ac_objext \
2308 conftest$ac_exeext conftest.$ac_ext
2309fi
2310eval ac_res=\$$3
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002313 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002314
2315} # ac_fn_c_check_func
2316
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002317# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2318# ---------------------------------------------
2319# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2320# accordingly.
2321ac_fn_c_check_decl ()
2322{
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2324 as_decl_name=`echo $2|sed 's/ *(.*//'`
2325 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2327$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2328if eval \${$3+:} false; then :
2329 $as_echo_n "(cached) " >&6
2330else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h. */
2333$4
2334int
2335main ()
2336{
2337#ifndef $as_decl_name
2338#ifdef __cplusplus
2339 (void) $as_decl_use;
2340#else
2341 (void) $as_decl_name;
2342#endif
2343#endif
2344
2345 ;
2346 return 0;
2347}
2348_ACEOF
2349if ac_fn_c_try_compile "$LINENO"; then :
2350 eval "$3=yes"
2351else
2352 eval "$3=no"
2353fi
2354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355fi
2356eval ac_res=\$$3
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2358$as_echo "$ac_res" >&6; }
2359 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2360
2361} # ac_fn_c_check_decl
2362
Matthias Kloseb9621712010-04-24 17:59:49 +00002363# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2364# ----------------------------------------------------
2365# Tries to find if the field MEMBER exists in type AGGR, after including
2366# INCLUDES, setting cache variable VAR accordingly.
2367ac_fn_c_check_member ()
2368{
2369 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2371$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002372if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002373 $as_echo_n "(cached) " >&6
2374else
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$5
2378int
2379main ()
2380{
2381static $2 ac_aggr;
2382if (ac_aggr.$3)
2383return 0;
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$4=yes"
2390else
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$5
2394int
2395main ()
2396{
2397static $2 ac_aggr;
2398if (sizeof ac_aggr.$3)
2399return 0;
2400 ;
2401 return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"; then :
2405 eval "$4=yes"
2406else
2407 eval "$4=no"
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410fi
2411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2412fi
2413eval ac_res=\$$4
2414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2415$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002416 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002417
2418} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002420This file contains any messages produced by compilers while
2421running configure, to aid debugging if configure makes a mistake.
2422
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002423It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002424generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426 $ $0 $@
2427
2428_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002430{
2431cat <<_ASUNAME
2432## --------- ##
2433## Platform. ##
2434## --------- ##
2435
2436hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2437uname -m = `(uname -m) 2>/dev/null || echo unknown`
2438uname -r = `(uname -r) 2>/dev/null || echo unknown`
2439uname -s = `(uname -s) 2>/dev/null || echo unknown`
2440uname -v = `(uname -v) 2>/dev/null || echo unknown`
2441
2442/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2443/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2444
2445/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2446/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2447/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002449/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2450/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2451/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2452
2453_ASUNAME
2454
2455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2456for as_dir in $PATH
2457do
2458 IFS=$as_save_IFS
2459 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 $as_echo "PATH: $as_dir"
2461 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002463
2464} >&5
2465
2466cat >&5 <<_ACEOF
2467
2468
2469## ----------- ##
2470## Core tests. ##
2471## ----------- ##
2472
2473_ACEOF
2474
2475
2476# Keep a trace of the command line.
2477# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002478# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002479# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002480# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002481ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002482ac_configure_args0=
2483ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002484ac_must_keep_next=false
2485for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002486do
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 for ac_arg
2488 do
2489 case $ac_arg in
2490 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2491 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2492 | -silent | --silent | --silen | --sile | --sil)
2493 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 esac
2497 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002504 case $ac_arg in
2505 *=* | --config-cache | -C | -disable-* | --disable-* \
2506 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2507 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2508 | -with-* | --with-* | -without-* | --without-* | --x)
2509 case "$ac_configure_args0 " in
2510 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2511 esac
2512 ;;
2513 -* ) ac_must_keep_next=true ;;
2514 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 ;;
2518 esac
2519 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002520done
Matthias Kloseb9621712010-04-24 17:59:49 +00002521{ ac_configure_args0=; unset ac_configure_args0;}
2522{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002523
2524# When interrupted or exit'd, cleanup temporary files, and complete
2525# config.log. We remove comments because anyway the quotes in there
2526# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527# WARNING: Use '\'' to represent an apostrophe within the trap.
2528# 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 +00002529trap 'exit_status=$?
2530 # Save into config.log some information that might help in debugging.
2531 {
2532 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002533
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002535## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539(
2540 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2541 eval ac_val=\$$ac_var
2542 case $ac_val in #(
2543 *${as_nl}*)
2544 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2546$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac
2548 case $ac_var in #(
2549 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2551 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 esac ;;
2553 esac
2554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2557 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 "s/'\''/'\''\\\\'\'''\''/g;
2560 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2561 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002562 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002564 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 esac |
2566 sort
2567)
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002569
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002570 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002571## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002572## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002573 echo
2574 for ac_var in $ac_subst_vars
2575 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 eval ac_val=\$$ac_var
2577 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002581 done | sort
2582 echo
2583
2584 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002588 echo
2589 for ac_var in $ac_subst_files
2590 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 eval ac_val=\$$ac_var
2592 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002596 done | sort
2597 echo
2598 fi
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002602## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002603## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 echo
2607 fi
2608 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 $as_echo "$as_me: caught signal $ac_signal"
2610 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 rm -f core *.core core.conftest.* &&
2613 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002616for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002618done
2619ac_signal=0
2620
2621# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002623
Matthias Kloseb9621712010-04-24 17:59:49 +00002624$as_echo "/* confdefs.h */" > confdefs.h
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626# Predefined preprocessor variables.
2627
2628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_NAME "$PACKAGE_NAME"
2630_ACEOF
2631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2634_ACEOF
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_VERSION "$PACKAGE_VERSION"
2638_ACEOF
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_STRING "$PACKAGE_STRING"
2642_ACEOF
2643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2646_ACEOF
2647
Matthias Kloseb9621712010-04-24 17:59:49 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_URL "$PACKAGE_URL"
2650_ACEOF
2651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652
2653# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002654# Prefer an explicitly selected file to automatically selected ones.
2655ac_site_file1=NONE
2656ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002658 # We do not want a PATH search for config.site.
2659 case $CONFIG_SITE in #((
2660 -*) ac_site_file1=./$CONFIG_SITE;;
2661 */*) ac_site_file1=$CONFIG_SITE;;
2662 *) ac_site_file1=./$CONFIG_SITE;;
2663 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 ac_site_file1=$prefix/share/config.site
2666 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667else
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 ac_site_file1=$ac_default_prefix/share/config.site
2669 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002671for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672do
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 test "x$ac_site_file" = xNONE && continue
2674 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2676$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 . "$ac_site_file" \
2679 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2681as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002682See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683 fi
2684done
2685
2686if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 # Some versions of bash will fail to source /dev/null (special files
2688 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2689 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2691$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2694 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 esac
2696 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697else
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2699$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 >$cache_file
2701fi
2702
2703# Check that the precious variables saved in the cache have kept the same
2704# value.
2705ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2708 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2710 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 case $ac_old_set,$ac_new_set in
2712 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2714$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 +00002715 ac_cache_corrupted=: ;;
2716 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2718$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 ac_cache_corrupted=: ;;
2720 ,);;
2721 *)
2722 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002723 # differences in whitespace do not lead to failure.
2724 ac_old_val_w=`echo x $ac_old_val`
2725 ac_new_val_w=`echo x $ac_new_val`
2726 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2728$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2729 ac_cache_corrupted=:
2730 else
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2732$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2733 eval $ac_var=\$ac_old_val
2734 fi
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2736$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2738$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 fi;;
2740 esac
2741 # Pass precious variables to config.status.
2742 if test "$ac_new_set" = set; then
2743 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002744 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 *) ac_arg=$ac_var=$ac_new_val ;;
2746 esac
2747 case " $ac_configure_args " in
2748 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002749 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 esac
2751 fi
2752done
2753if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2757$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002758 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002760## -------------------- ##
2761## Main body of script. ##
2762## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002763
Guido van Rossum7f43da71994-08-01 12:15:30 +00002764ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002766ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769
Guido van Rossum627b2d71993-12-24 10:39:16 +00002770
Michael W. Hudson54241132001-12-07 15:38:26 +00002771
Trent Nelson4d4ec652012-10-16 08:51:24 -04002772
Trent Nelson5595ab52012-10-17 04:47:31 -04002773if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002774 # If we're building out-of-tree, we need to make sure the following
2775 # resources get picked up before their $srcdir counterparts.
2776 # Objects/ -> typeslots.inc
2777 # Include/ -> Python-ast.h, graminit.h
2778 # Python/ -> importlib.h
2779 # (A side effect of this is that these resources will automatically be
2780 # regenerated when building out-of-tree, regardless of whether or not
2781 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2782 # off.)
2783 BASECPPFLAGS="-IObjects -IInclude -IPython"
2784else
2785 BASECPPFLAGS=""
2786fi
2787
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788
2789
2790
2791
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002792if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793then
2794# Extract the first word of "hg", so it can be a program name with args.
2795set dummy hg; ac_word=$2
2796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002798if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799 $as_echo_n "(cached) " >&6
2800else
2801 if test -n "$HAS_HG"; then
2802 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2803else
2804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2805for as_dir in $PATH
2806do
2807 IFS=$as_save_IFS
2808 test -z "$as_dir" && as_dir=.
2809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002811 ac_cv_prog_HAS_HG="found"
2812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2813 break 2
2814 fi
2815done
2816 done
2817IFS=$as_save_IFS
2818
2819 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2820fi
2821fi
2822HAS_HG=$ac_cv_prog_HAS_HG
2823if test -n "$HAS_HG"; then
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2825$as_echo "$HAS_HG" >&6; }
2826else
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2828$as_echo "no" >&6; }
2829fi
2830
2831
2832else
2833HAS_HG=no-repository
2834fi
2835if test $HAS_HG = found
2836then
2837 HGVERSION="hg id -i \$(srcdir)"
2838 HGTAG="hg id -t \$(srcdir)"
2839 HGBRANCH="hg id -b \$(srcdir)"
2840else
2841 HGVERSION=""
2842 HGTAG=""
2843 HGBRANCH=""
2844fi
2845
2846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002847ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002848
2849
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002850ac_aux_dir=
2851for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2852 if test -f "$ac_dir/install-sh"; then
2853 ac_aux_dir=$ac_dir
2854 ac_install_sh="$ac_aux_dir/install-sh -c"
2855 break
2856 elif test -f "$ac_dir/install.sh"; then
2857 ac_aux_dir=$ac_dir
2858 ac_install_sh="$ac_aux_dir/install.sh -c"
2859 break
2860 elif test -f "$ac_dir/shtool"; then
2861 ac_aux_dir=$ac_dir
2862 ac_install_sh="$ac_aux_dir/shtool install -c"
2863 break
2864 fi
2865done
2866if test -z "$ac_aux_dir"; then
2867 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2868fi
2869
2870# These three variables are undocumented and unsupported,
2871# and are intended to be withdrawn in a future Autoconf release.
2872# They can cause serious problems if a builder's source tree is in a directory
2873# whose full name contains unusual characters.
2874ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2875ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2876ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2877
2878
2879# Make sure we can run config.sub.
2880$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2881 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2882
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2884$as_echo_n "checking build system type... " >&6; }
2885if ${ac_cv_build+:} false; then :
2886 $as_echo_n "(cached) " >&6
2887else
2888 ac_build_alias=$build_alias
2889test "x$ac_build_alias" = x &&
2890 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2891test "x$ac_build_alias" = x &&
2892 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2893ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2894 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2895
2896fi
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2898$as_echo "$ac_cv_build" >&6; }
2899case $ac_cv_build in
2900*-*-*) ;;
2901*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2902esac
2903build=$ac_cv_build
2904ac_save_IFS=$IFS; IFS='-'
2905set x $ac_cv_build
2906shift
2907build_cpu=$1
2908build_vendor=$2
2909shift; shift
2910# Remember, the first character of IFS is used to create $*,
2911# except with old shells:
2912build_os=$*
2913IFS=$ac_save_IFS
2914case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2915
2916
2917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2918$as_echo_n "checking host system type... " >&6; }
2919if ${ac_cv_host+:} false; then :
2920 $as_echo_n "(cached) " >&6
2921else
2922 if test "x$host_alias" = x; then
2923 ac_cv_host=$ac_cv_build
2924else
2925 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2926 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2927fi
2928
2929fi
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2931$as_echo "$ac_cv_host" >&6; }
2932case $ac_cv_host in
2933*-*-*) ;;
2934*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2935esac
2936host=$ac_cv_host
2937ac_save_IFS=$IFS; IFS='-'
2938set x $ac_cv_host
2939shift
2940host_cpu=$1
2941host_vendor=$2
2942shift; shift
2943# Remember, the first character of IFS is used to create $*,
2944# except with old shells:
2945host_os=$*
2946IFS=$ac_save_IFS
2947case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2948
2949
2950
doko@python.orga10e4a92013-01-25 18:45:12 +01002951
2952
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002953if test "$cross_compiling" = yes; then
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2955$as_echo_n "checking for python interpreter for cross build... " >&6; }
2956 if test -z "$PYTHON_FOR_BUILD"; then
2957 for interp in python$PACKAGE_VERSION python3 python; do
2958 which $interp >/dev/null 2>&1 || continue
2959 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2960 break
2961 fi
2962 interp=
2963 done
2964 if test x$interp = x; then
2965 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2966 fi
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2968$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002969 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002970 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002971elif test "$cross_compiling" = maybe; then
2972 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002973else
2974 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2975fi
2976
2977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
Benjamin Petersond23f8222009-04-05 19:13:16 +00002979if test "$prefix" != "/"; then
2980 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2981fi
2982
2983
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
2985
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002986# We don't use PACKAGE_ variables, and they cause conflicts
2987# with other autoconf-based packages that include Python.h
2988grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2989rm confdefs.h
2990mv confdefs.h.new confdefs.h
2991
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002992
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002993VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002994
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002995# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002996
2997SOVERSION=1.0
2998
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002999# The later defininition of _XOPEN_SOURCE disables certain features
3000# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003003
3004
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003005# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3006# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3007# them.
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003010
3011
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003012# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3013# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3014# them.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003017
3018
Martin v. Löwisd6320502004-08-12 13:45:08 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003023
3024
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003025# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3026# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3027# them.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003030
3031
3032
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003033define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003034
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003035# Arguments passed to configure.
3036
3037CONFIG_ARGS="$ac_configure_args"
3038
Matthias Kloseb9621712010-04-24 17:59:49 +00003039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3040$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003042if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044 case $enableval in
3045 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003046 # Locate the best usable SDK, see Mac/README.txt for more
3047 # information
3048 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003049 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003051 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3052 if test ! -d "${enableval}"
3053 then
3054 enableval=/
3055 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057 ;;
3058 esac
3059 case $enableval in
3060 no)
3061 UNIVERSALSDK=
3062 enable_universalsdk=
3063 ;;
3064 *)
3065 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066 if test ! -d "${UNIVERSALSDK}"
3067 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003068 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003070 ;;
3071 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003072
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074else
3075
3076 UNIVERSALSDK=
3077 enable_universalsdk=
3078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003080
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003081if test -n "${UNIVERSALSDK}"
3082then
Matthias Kloseb9621712010-04-24 17:59:49 +00003083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3084$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085else
Matthias Kloseb9621712010-04-24 17:59:49 +00003086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3087$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003090
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003091
Ned Deily87adb6e2013-10-18 21:09:56 -07003092ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003093
Ned Deilycbfb9a52012-06-23 16:02:19 -07003094# For backward compatibility reasons we prefer to select '32-bit' if available,
3095# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097if test "`uname -s`" = "Darwin"
3098then
3099 if test -n "${UNIVERSALSDK}"
3100 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003101 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003102 then
3103 UNIVERSAL_ARCHS="intel"
3104 fi
3105 fi
3106fi
3107
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003108
Matthias Kloseb9621712010-04-24 17:59:49 +00003109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3110$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111
3112# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003113if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115 UNIVERSAL_ARCHS="$withval"
3116
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117fi
3118
Ned Deily87adb6e2013-10-18 21:09:56 -07003119if test -n "${UNIVERSALSDK}"
3120then
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3122$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3123else
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3125$as_echo "no" >&6; }
3126fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003128
3129# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003130if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131 withval=$with_framework_name;
3132 PYTHONFRAMEWORK=${withval}
3133 PYTHONFRAMEWORKDIR=${withval}.framework
3134 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3135
3136else
3137
3138 PYTHONFRAMEWORK=Python
3139 PYTHONFRAMEWORKDIR=Python.framework
3140 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3141
3142fi
3143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003144# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003145if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003147 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003148 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003149 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003150 esac
3151 case $enableval in
3152 no)
3153 PYTHONFRAMEWORK=
3154 PYTHONFRAMEWORKDIR=no-framework
3155 PYTHONFRAMEWORKPREFIX=
3156 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003157 FRAMEWORKINSTALLFIRST=
3158 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 FRAMEWORKALTINSTALLFIRST=
3160 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003161 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 if test "x${prefix}" = "xNONE"; then
3163 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3164 else
3165 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3166 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003167 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003168 ;;
3169 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003171 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003172 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003173 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003174 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3175 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003176 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003178
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 if test "x${prefix}" = "xNONE" ; then
3180 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003181
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 else
3183 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3184 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003185
3186 case "${enableval}" in
3187 /System*)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 if test "${prefix}" = "NONE" ; then
3190 # See below
3191 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3192 fi
3193 ;;
3194
3195 /Library*)
3196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3197 ;;
3198
3199 */Library/Frameworks)
3200 MDIR="`dirname "${enableval}"`"
3201 MDIR="`dirname "${MDIR}"`"
3202 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3203
3204 if test "${prefix}" = "NONE"; then
3205 # User hasn't specified the
3206 # --prefix option, but wants to install
3207 # the framework in a non-default location,
3208 # ensure that the compatibility links get
3209 # installed relative to that prefix as well
3210 # instead of in /usr/local.
3211 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3212 fi
3213 ;;
3214
3215 *)
3216 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3217 ;;
3218 esac
3219
Jack Jansen127e56e2001-09-11 14:41:54 +00003220 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003222 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003223 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3229
3230 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3231
Jack Jansene578a632001-08-15 01:27:14 +00003232 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003233
Guido van Rossum563e7081996-09-10 18:20:48 +00003234else
Martin v. Löwis11437992002-04-12 09:54:03 +00003235
Jack Jansene578a632001-08-15 01:27:14 +00003236 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003237 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003238 PYTHONFRAMEWORKPREFIX=
3239 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240 FRAMEWORKINSTALLFIRST=
3241 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003242 FRAMEWORKALTINSTALLFIRST=
3243 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003244 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 if test "x${prefix}" = "xNONE" ; then
3246 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3247 else
3248 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3249 fi
Jack Jansene578a632001-08-15 01:27:14 +00003250 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003251
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253fi
3254
Thomas Wouters477c8d52006-05-27 19:21:47 +00003255
3256
Michael W. Hudson54241132001-12-07 15:38:26 +00003257
3258
3259
3260
Jack Jansene578a632001-08-15 01:27:14 +00003261
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003262
3263
3264
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003265
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003266
Ned Deilyb8f944f2013-11-21 22:42:25 -08003267
Jack Jansene578a632001-08-15 01:27:14 +00003268##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003269## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003270## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003271##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272# Set name for machine-dependent library files
3273
Matthias Kloseb9621712010-04-24 17:59:49 +00003274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3275$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276if test -z "$MACHDEP"
3277then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 # avoid using uname for cross builds
3279 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003280 # ac_sys_system and ac_sys_release are used for setting
3281 # a lot of different things including 'define_xopen_source'
3282 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case "$host" in
3284 *-*-linux*)
3285 ac_sys_system=Linux
3286 ;;
3287 *-*-cygwin*)
3288 ac_sys_system=Cygwin
3289 ;;
3290 *)
3291 # for now, limit cross builds to known configurations
3292 MACHDEP="unknown"
3293 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3294 esac
3295 ac_sys_release=
3296 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003297 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003298 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003299 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003300 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003302 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003303 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 fi
3305 ac_md_system=`echo $ac_sys_system |
3306 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3307 ac_md_release=`echo $ac_sys_release |
3308 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3309 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003310
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003312 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003313 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003314 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003315 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003316 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318fi
Guido van Rossum91922671997-10-09 20:24:13 +00003319
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003320
3321if test "$cross_compiling" = yes; then
3322 case "$host" in
3323 *-*-linux*)
3324 case "$host_cpu" in
3325 arm*)
3326 _host_cpu=arm
3327 ;;
3328 *)
3329 _host_cpu=$host_cpu
3330 esac
3331 ;;
3332 *-*-cygwin*)
3333 _host_cpu=
3334 ;;
3335 *)
3336 # for now, limit cross builds to known configurations
3337 MACHDEP="unknown"
3338 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3339 esac
3340 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3341fi
3342
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003343# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3344# disable features if it is defined, without any means to access these
3345# features as extensions. For these systems, we skip the definition of
3346# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3347# some feature, make sure there is no alternative way to access this
3348# feature. Also, when using wildcards, make sure you have verified the
3349# need for not defining _XOPEN_SOURCE on all systems matching the
3350# wildcard, and that the wildcard does not include future systems
3351# (which may remove their limitations).
3352case $ac_sys_system/$ac_sys_release in
3353 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3354 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003355 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003356 # In addition, Stefan Krah confirms that issue #1244610 exists through
3357 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003358 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003359 define_xopen_source=no
3360 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3361 # also defined. This can be overridden by defining _BSD_SOURCE
3362 # As this has a different meaning on Linux, only define it on OpenBSD
3363
Matthias Kloseb9621712010-04-24 17:59:49 +00003364$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003365
3366 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003367 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003368 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3369 # also defined. This can be overridden by defining _BSD_SOURCE
3370 # As this has a different meaning on Linux, only define it on OpenBSD
3371
Matthias Kloseb9621712010-04-24 17:59:49 +00003372$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003373
3374 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003375 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3376 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3377 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003378 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 +00003379 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003380 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3381 # request to enable features supported by the standard as a request
3382 # to disable features not supported by the standard. The best way
3383 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3384 # entirely and define __EXTENSIONS__ instead.
3385 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003386 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003387 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3388 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003389 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003390 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003391 define_xopen_source=no;;
3392 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003393 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003395 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003396 # On FreeBSD 4, the math functions C89 does not cover are never defined
3397 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3398 FreeBSD/4.*)
3399 define_xopen_source=no;;
3400 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3401 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3402 # identifies itself as Darwin/7.*
3403 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3404 # disables platform specific features beyond repair.
3405 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3406 # has no effect, don't bother defining them
3407 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003408 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003409 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003410 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003411 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3412 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3413 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003414 AIX/4)
3415 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003416 AIX/5)
3417 if test `uname -r` -eq 1; then
3418 define_xopen_source=no
3419 fi
3420 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003421 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3422 # defining NI_NUMERICHOST.
3423 QNX/6.3.2)
3424 define_xopen_source=no
3425 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427esac
3428
3429if test $define_xopen_source = yes
3430then
Victor Stinner14d098d2011-09-07 22:29:43 +02003431 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
Victor Stinner14d098d2011-09-07 22:29:43 +02003433$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
3436 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3437 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3438 # several APIs are not declared. Since this is also needed in some
3439 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003440
Matthias Kloseb9621712010-04-24 17:59:49 +00003441$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003442
3443
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003444
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003445$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003446
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003447fi
3448
Christian Heimes647cd872013-12-07 23:39:33 +01003449# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3450case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003451 hp*|HP*)
3452 define_stdc_a1=yes;;
3453 *)
3454 define_stdc_a1=no;;
3455esac
3456
3457if test $define_stdc_a1 = yes
3458then
Christian Heimes647cd872013-12-07 23:39:33 +01003459
3460$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3461
Christian Heimesb02bcae2013-12-08 15:21:08 +01003462fi
Christian Heimes647cd872013-12-07 23:39:33 +01003463
Guido van Rossum91922671997-10-09 20:24:13 +00003464#
3465# SGI compilers allow the specification of the both the ABI and the
3466# ISA on the command line. Depending on the values of these switches,
3467# different and often incompatable code will be generated.
3468#
3469# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3470# thus supply support for various ABI/ISA combinations. The MACHDEP
3471# variable is also adjusted.
3472#
3473
3474if test ! -z "$SGI_ABI"
3475then
3476 CC="cc $SGI_ABI"
3477 LDFLAGS="$SGI_ABI $LDFLAGS"
3478 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3481$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003482
Jack Jansen6b08a402004-06-03 12:41:45 +00003483# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3484# it may influence the way we can build extensions, so distutils
3485# needs to check it
3486
Thomas Wouters477c8d52006-05-27 19:21:47 +00003487
Jack Jansen6b08a402004-06-03 12:41:45 +00003488CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003489EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003490
Guido van Rossum627b2d71993-12-24 10:39:16 +00003491# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003492
3493# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3494# for debug/optimization stuff. BASECFLAGS is for flags that are required
3495# just to get things to compile and link. Users are free to override OPT
3496# when running configure or make. The build should not break if they do.
3497# BASECFLAGS should generally not be messed with, however.
3498
3499# XXX shouldn't some/most/all of this code be merged with the stuff later
3500# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3502$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003505if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003507 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003508 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003509 without_gcc=yes;;
3510 yes) CC=gcc
3511 without_gcc=no;;
3512 *) CC=$withval
3513 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003514 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003515else
Martin v. Löwis11437992002-04-12 09:54:03 +00003516
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003517 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003518 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003519 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003520 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003521 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003522fi
3523
Matthias Kloseb9621712010-04-24 17:59:49 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3525$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003526
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527# If the user switches compilers, we can't believe the cache
3528if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3529then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003530 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003531(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003532fi
3533
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003534# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3535# when the compiler supports them, but we don't always want -O2, and
3536# we set -g later.
3537if test -z "$CFLAGS"; then
3538 CFLAGS=
3539fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540
3541if test "$ac_sys_system" = "Darwin"
3542then
3543 # Compiler selection on MacOSX is more complicated than
3544 # AC_PROG_CC can handle, see Mac/README.txt for more
3545 # information
3546 if test -z "${CC}"
3547 then
3548 found_gcc=
3549 found_clang=
3550 as_save_IFS=$IFS; IFS=:
3551 for as_dir in $PATH
3552 do
3553 IFS=$as_save_IFS
3554 if test -x $as_dir/gcc; then
3555 if test -z "${found_gcc}"; then
3556 found_gcc=$as_dir/gcc
3557 fi
3558 fi
3559 if test -x $as_dir/clang; then
3560 if test -z "${found_clang}"; then
3561 found_clang=$as_dir/clang
3562 fi
3563 fi
3564 done
3565 IFS=$as_save_IFS
3566
3567 if test -n "$found_gcc" -a -n "$found_clang"
3568 then
3569 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3570 then
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3572$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3573 CC="$found_clang"
3574 CXX="$found_clang++"
3575 fi
3576
3577
3578 elif test -z "$found_gcc" -a -n "$found_clang"
3579 then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3581$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3582 CC="$found_clang"
3583 CXX="$found_clang++"
3584
3585 elif test -z "$found_gcc" -a -z "$found_clang"
3586 then
3587 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3588 if test -n "${found_clang}"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3591$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3592 CC="${found_clang}"
3593 CXX="`/usr/bin/xcrun -find clang++`"
3594
3595 # else: use default behaviour
3596 fi
3597 fi
3598 fi
3599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003600ac_ext=c
3601ac_cpp='$CPP $CPPFLAGS'
3602ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3603ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3604ac_compiler_gnu=$ac_cv_c_compiler_gnu
3605if test -n "$ac_tool_prefix"; then
3606 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3607set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3609$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003610if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003612else
3613 if test -n "$CC"; then
3614 ac_cv_prog_CC="$CC" # Let the user override the test.
3615else
Martin v. Löwis11437992002-04-12 09:54:03 +00003616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617for as_dir in $PATH
3618do
3619 IFS=$as_save_IFS
3620 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $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 +00003625 break 2
3626 fi
3627done
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003630
Jack Jansendd19cf82001-12-06 22:36:17 +00003631fi
3632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003633CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003634if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3636$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003637else
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3639$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640fi
3641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644if test -z "$ac_cv_prog_CC"; then
3645 ac_ct_CC=$CC
3646 # Extract the first word of "gcc", so it can be a program name with args.
3647set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003650if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003652else
3653 if test -n "$ac_ct_CC"; then
3654 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3655else
3656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659 IFS=$as_save_IFS
3660 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $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 +00003665 break 2
3666 fi
3667done
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003670
3671fi
3672fi
3673ac_ct_CC=$ac_cv_prog_ac_ct_CC
3674if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3676$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680fi
3681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 if test "x$ac_ct_CC" = x; then
3683 CC=""
3684 else
3685 case $cross_compiling:$ac_tool_warned in
3686yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689ac_tool_warned=yes ;;
3690esac
3691 CC=$ac_ct_CC
3692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693else
3694 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003695fi
3696
Jack Jansendd19cf82001-12-06 22:36:17 +00003697if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698 if test -n "$ac_tool_prefix"; then
3699 # 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 +00003700set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3702$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003703if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003705else
3706 if test -n "$CC"; then
3707 ac_cv_prog_CC="$CC" # Let the user override the test.
3708else
Martin v. Löwis11437992002-04-12 09:54:03 +00003709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710for as_dir in $PATH
3711do
3712 IFS=$as_save_IFS
3713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $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 +00003718 break 2
3719 fi
3720done
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003723
3724fi
3725fi
3726CC=$ac_cv_prog_CC
3727if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3729$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003730else
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3732$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733fi
3734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738if test -z "$CC"; then
3739 # Extract the first word of "cc", so it can be a program name with args.
3740set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003743if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003745else
3746 if test -n "$CC"; then
3747 ac_cv_prog_CC="$CC" # Let the user override the test.
3748else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH
3752do
3753 IFS=$as_save_IFS
3754 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3758 ac_prog_rejected=yes
3759 continue
3760 fi
3761 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $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 +00003763 break 2
3764 fi
3765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769if test $ac_prog_rejected = yes; then
3770 # We found a bogon in the path, so make sure we never use it.
3771 set dummy $ac_cv_prog_CC
3772 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 # We chose a different compiler from the bogus one.
3775 # However, it has the same basename, so the bogon will be chosen
3776 # first if we set CC to just the basename; use the full file name.
3777 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003778 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779 fi
3780fi
3781fi
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3786$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3789$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790fi
3791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
3794if test -z "$CC"; then
3795 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 do
3798 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3799set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003802if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003804else
3805 if test -n "$CC"; then
3806 ac_cv_prog_CC="$CC" # Let the user override the test.
3807else
Martin v. Löwis11437992002-04-12 09:54:03 +00003808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $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 +00003817 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003818 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823fi
3824fi
3825CC=$ac_cv_prog_CC
3826if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3828$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003832fi
3833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$CC" && break
3836 done
3837fi
3838if test -z "$CC"; then
3839 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003841do
3842 # Extract the first word of "$ac_prog", so it can be a program name with args.
3843set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3845$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003846if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003848else
3849 if test -n "$ac_ct_CC"; then
3850 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3851else
3852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853for as_dir in $PATH
3854do
3855 IFS=$as_save_IFS
3856 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 $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 +00003861 break 2
3862 fi
3863done
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003866
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868fi
3869ac_ct_CC=$ac_cv_prog_ac_ct_CC
3870if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3872$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003873else
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3875$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878
Martin v. Löwis11437992002-04-12 09:54:03 +00003879 test -n "$ac_ct_CC" && break
3880done
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882 if test "x$ac_ct_CC" = x; then
3883 CC=""
3884 else
3885 case $cross_compiling:$ac_tool_warned in
3886yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003887{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3888$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889ac_tool_warned=yes ;;
3890esac
3891 CC=$ac_ct_CC
3892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003893fi
3894
3895fi
3896
3897
Matthias Kloseb9621712010-04-24 17:59:49 +00003898test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003900as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003901See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003902
3903# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003904$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3905set X $ac_compile
3906ac_compiler=$2
3907for ac_option in --version -v -V -qversion; do
3908 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909case "(($ac_try" in
3910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3911 *) ac_try_echo=$ac_try;;
3912esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3914$as_echo "$ac_try_echo"; } >&5
3915 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 if test -s conftest.err; then
3918 sed '10a\
3919... rest of stderr output deleted ...
3920 10q' conftest.err >conftest.er1
3921 cat conftest.er1 >&5
3922 fi
3923 rm -f conftest.er1 conftest.err
3924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3925 test $ac_status = 0; }
3926done
Martin v. Löwis11437992002-04-12 09:54:03 +00003927
Matthias Kloseb9621712010-04-24 17:59:49 +00003928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003930
Martin v. Löwis11437992002-04-12 09:54:03 +00003931int
3932main ()
3933{
3934
3935 ;
3936 return 0;
3937}
3938_ACEOF
3939ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003940ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003941# Try to create an executable without -o first, disregard a.out.
3942# It will help us diagnose broken compilers, and finding out an intuition
3943# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3945$as_echo_n "checking whether the C compiler works... " >&6; }
3946ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3947
3948# The possible output files:
3949ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951ac_rmfiles=
3952for ac_file in $ac_files
3953do
3954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3957 esac
3958done
3959rm -f $ac_rmfiles
3960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3973# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3974# in a Makefile. We should not override ac_cv_exeext if it was cached,
3975# so that the user can short-circuit this test for compilers unknown to
3976# Autoconf.
3977for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003978do
3979 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982 ;;
3983 [ab].out )
3984 # We found the default executable, but exeext='' is most
3985 # certainly right.
3986 break;;
3987 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 then :; else
3990 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3991 fi
3992 # We set ac_cv_exeext here because the later test for it is not
3993 # safe: cross compilers may not add the suffix if given an `-o'
3994 # argument, so we may need to know it at that point already.
3995 # Even if this section looks crufty: it has the advantage of
3996 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997 break;;
3998 * )
3999 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 esac
4001done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002test "$ac_cv_exeext" = no && ac_cv_exeext=
4003
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004004else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005 ac_file=''
4006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007if test -z "$ac_file"; then :
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004011sed 's/^/| /' conftest.$ac_ext >&5
4012
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004015as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004016See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004017else
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4019$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4022$as_echo_n "checking for C compiler default output file name... " >&6; }
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4024$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026
Matthias Kloseb9621712010-04-24 17:59:49 +00004027rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4030$as_echo_n "checking for suffix of executables... " >&6; }
4031if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004039 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4043# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4044# work properly (i.e., refer to `conftest.exe'), while it won't with
4045# `rm'.
4046for ac_file in conftest.exe conftest conftest.*; do
4047 test -f "$ac_file" || continue
4048 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4051 break;;
4052 * ) break;;
4053 esac
4054done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004055else
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004058as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004059See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004061rm -f conftest conftest$ac_cv_exeext
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4063$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064
4065rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004066EXEEXT=$ac_cv_exeext
4067ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4069/* end confdefs.h. */
4070#include <stdio.h>
4071int
4072main ()
4073{
4074FILE *f = fopen ("conftest.out", "w");
4075 return ferror (f) || fclose (f) != 0;
4076
4077 ;
4078 return 0;
4079}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004081ac_clean_files="$ac_clean_files conftest.out"
4082# Check that the compiler produces executables we can run. If not, either
4083# the compiler is broken, or we cross compile.
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4085$as_echo_n "checking whether we are cross compiling... " >&6; }
4086if test "$cross_compiling" != yes; then
4087 { { ac_try="$ac_link"
4088case "(($ac_try" in
4089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090 *) ac_try_echo=$ac_try;;
4091esac
4092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4093$as_echo "$ac_try_echo"; } >&5
4094 (eval "$ac_link") 2>&5
4095 ac_status=$?
4096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4097 test $ac_status = 0; }
4098 if { ac_try='./conftest$ac_cv_exeext'
4099 { { case "(($ac_try" in
4100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101 *) ac_try_echo=$ac_try;;
4102esac
4103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4104$as_echo "$ac_try_echo"; } >&5
4105 (eval "$ac_try") 2>&5
4106 ac_status=$?
4107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4108 test $ac_status = 0; }; }; then
4109 cross_compiling=no
4110 else
4111 if test "$cross_compiling" = maybe; then
4112 cross_compiling=yes
4113 else
4114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004116as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004117If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004118See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 fi
4120 fi
4121fi
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4123$as_echo "$cross_compiling" >&6; }
4124
4125rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4126ac_clean_files=$ac_clean_files_save
4127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4128$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004129if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 $as_echo_n "(cached) " >&6
4131else
4132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133/* end confdefs.h. */
4134
4135int
4136main ()
4137{
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004144if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145case "(($ac_try" in
4146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4147 *) ac_try_echo=$ac_try;;
4148esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4150$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4154 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 for ac_file in conftest.o conftest.obj conftest.*; do
4156 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4160 break;;
4161 esac
4162done
4163else
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004165sed 's/^/| /' conftest.$ac_ext >&5
4166
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004169as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004170See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004172rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4175$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004176OBJEXT=$ac_cv_objext
4177ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4179$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004180if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004185
Martin v. Löwis11437992002-04-12 09:54:03 +00004186int
4187main ()
4188{
4189#ifndef __GNUC__
4190 choke me
4191#endif
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 ac_compiler_gnu=yes
4199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_cv_c_compiler_gnu=$ac_compiler_gnu
4204
4205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4207$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4208if test $ac_compiler_gnu = yes; then
4209 GCC=yes
4210else
4211 GCC=
4212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004213ac_test_CFLAGS=${CFLAGS+set}
4214ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4216$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004217if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 ac_save_c_werror_flag=$ac_c_werror_flag
4221 ac_c_werror_flag=yes
4222 ac_cv_prog_cc_g=no
4223 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004226
Martin v. Löwis11437992002-04-12 09:54:03 +00004227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237else
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 CFLAGS=""
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240/* end confdefs.h. */
4241
4242int
4243main ()
4244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004250if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251
Matthias Kloseb9621712010-04-24 17:59:49 +00004252else
4253 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256/* end confdefs.h. */
4257
4258int
4259main ()
4260{
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4274 ac_c_werror_flag=$ac_save_c_werror_flag
4275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4277$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004278if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280elif test $ac_cv_prog_cc_g = yes; then
4281 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004282 CFLAGS="-g -O2"
4283 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285 fi
4286else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 if test "$GCC" = yes; then
4288 CFLAGS="-O2"
4289 else
4290 CFLAGS=
4291 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4294$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004295if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004297else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004299ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004301/* end confdefs.h. */
4302#include <stdarg.h>
4303#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004304struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004305/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4306struct buf { int x; };
4307FILE * (*rcsopen) (struct buf *, struct stat *, int);
4308static char *e (p, i)
4309 char **p;
4310 int i;
4311{
4312 return p[i];
4313}
4314static char *f (char * (*g) (char **, int), char **p, ...)
4315{
4316 char *s;
4317 va_list v;
4318 va_start (v,p);
4319 s = g (p, va_arg (v,int));
4320 va_end (v);
4321 return s;
4322}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323
4324/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4325 function prototypes and stuff, but not '\xHH' hex character constants.
4326 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004328 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4329 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4334 inside strings and character constants. */
4335#define FOO(x) 'x'
4336int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4337
Skip Montanaro6dead952003-09-25 14:50:04 +00004338int test (int i, double x);
4339struct s1 {int (*f) (int a);};
4340struct s2 {int (*f) (double a);};
4341int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4342int argc;
4343char **argv;
4344int
4345main ()
4346{
4347return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4348 ;
4349 return 0;
4350}
4351_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4353 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004354do
4355 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359rm -f core conftest.err conftest.$ac_objext
4360 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004361done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004363CC=$ac_save_CC
4364
4365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366# AC_CACHE_VAL
4367case "x$ac_cv_prog_cc_c89" in
4368 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4370$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4373$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004374 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4377$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004378esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004379if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004380
Matthias Kloseb9621712010-04-24 17:59:49 +00004381fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004382
Martin v. Löwis11437992002-04-12 09:54:03 +00004383ac_ext=c
4384ac_cpp='$CPP $CPPFLAGS'
4385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4387ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004389
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004390
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4393$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004396if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004398
4399 case $withval in
4400 no) with_cxx_main=no
4401 MAINCC='$(CC)';;
4402 yes) with_cxx_main=yes
4403 MAINCC='$(CXX)';;
4404 *) with_cxx_main=yes
4405 MAINCC=$withval
4406 if test -z "$CXX"
4407 then
4408 CXX=$withval
4409 fi;;
4410 esac
4411else
4412
4413 with_cxx_main=no
4414 MAINCC='$(CC)'
4415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416fi
4417
Matthias Kloseb9621712010-04-24 17:59:49 +00004418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4419$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004420
4421preset_cxx="$CXX"
4422if test -z "$CXX"
4423then
4424 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004425 gcc) if test -n "$ac_tool_prefix"; then
4426 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4427set dummy ${ac_tool_prefix}g++; ac_word=$2
4428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4429$as_echo_n "checking for $ac_word... " >&6; }
4430if ${ac_cv_path_CXX+:} false; then :
4431 $as_echo_n "(cached) " >&6
4432else
4433 case $CXX in
4434 [\\/]* | ?:[\\/]*)
4435 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4436 ;;
4437 *)
4438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in notfound
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
4443 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004444 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004445 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447 break 2
4448 fi
4449done
4450 done
4451IFS=$as_save_IFS
4452
4453 ;;
4454esac
4455fi
4456CXX=$ac_cv_path_CXX
4457if test -n "$CXX"; then
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4459$as_echo "$CXX" >&6; }
4460else
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462$as_echo "no" >&6; }
4463fi
4464
4465
4466fi
4467if test -z "$ac_cv_path_CXX"; then
4468 ac_pt_CXX=$CXX
4469 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004470set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4472$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004473if ${ac_cv_path_ac_pt_CXX+:} false; then :
4474 $as_echo_n "(cached) " >&6
4475else
4476 case $ac_pt_CXX in
4477 [\\/]* | ?:[\\/]*)
4478 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4479 ;;
4480 *)
4481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in notfound
4483do
4484 IFS=$as_save_IFS
4485 test -z "$as_dir" && as_dir=.
4486 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004487 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004488 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4490 break 2
4491 fi
4492done
4493 done
4494IFS=$as_save_IFS
4495
4496 ;;
4497esac
4498fi
4499ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4500if test -n "$ac_pt_CXX"; then
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4502$as_echo "$ac_pt_CXX" >&6; }
4503else
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508 if test "x$ac_pt_CXX" = x; then
4509 CXX="g++"
4510 else
4511 case $cross_compiling:$ac_tool_warned in
4512yes:)
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4514$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4515ac_tool_warned=yes ;;
4516esac
4517 CXX=$ac_pt_CXX
4518 fi
4519else
4520 CXX="$ac_cv_path_CXX"
4521fi
4522 ;;
4523 cc) if test -n "$ac_tool_prefix"; then
4524 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4525set dummy ${ac_tool_prefix}c++; ac_word=$2
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4527$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004528if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004529 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004530else
4531 case $CXX in
4532 [\\/]* | ?:[\\/]*)
4533 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4534 ;;
4535 *)
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in notfound
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004543 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545 break 2
4546 fi
4547done
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004549IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551 ;;
4552esac
4553fi
4554CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004555if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4557$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558else
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004562
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004563
4564fi
4565if test -z "$ac_cv_path_CXX"; then
4566 ac_pt_CXX=$CXX
4567 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004571if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004572 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004573else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004574 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004575 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004576 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004577 ;;
4578 *)
4579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4580for as_dir in notfound
4581do
4582 IFS=$as_save_IFS
4583 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004584 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004586 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004587 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588 break 2
4589 fi
4590done
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594 ;;
4595esac
4596fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004597ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4598if test -n "$ac_pt_CXX"; then
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4600$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004601else
Matthias Kloseb9621712010-04-24 17:59:49 +00004602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004605
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004606 if test "x$ac_pt_CXX" = x; then
4607 CXX="c++"
4608 else
4609 case $cross_compiling:$ac_tool_warned in
4610yes:)
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4613ac_tool_warned=yes ;;
4614esac
4615 CXX=$ac_pt_CXX
4616 fi
4617else
4618 CXX="$ac_cv_path_CXX"
4619fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004620 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004621 clang|*/clang) if test -n "$ac_tool_prefix"; then
4622 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4623set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_CXX+:} false; then :
4627 $as_echo_n "(cached) " >&6
4628else
4629 case $CXX in
4630 [\\/]* | ?:[\\/]*)
4631 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4632 ;;
4633 *)
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in notfound
4636do
4637 IFS=$as_save_IFS
4638 test -z "$as_dir" && as_dir=.
4639 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004641 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643 break 2
4644 fi
4645done
4646 done
4647IFS=$as_save_IFS
4648
Ned Deilycbfb9a52012-06-23 16:02:19 -07004649 ;;
4650esac
4651fi
4652CXX=$ac_cv_path_CXX
4653if test -n "$CXX"; then
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4655$as_echo "$CXX" >&6; }
4656else
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004661
4662fi
4663if test -z "$ac_cv_path_CXX"; then
4664 ac_pt_CXX=$CXX
4665 # Extract the first word of "clang++", so it can be a program name with args.
4666set dummy clang++; ac_word=$2
4667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4668$as_echo_n "checking for $ac_word... " >&6; }
4669if ${ac_cv_path_ac_pt_CXX+:} false; then :
4670 $as_echo_n "(cached) " >&6
4671else
4672 case $ac_pt_CXX in
4673 [\\/]* | ?:[\\/]*)
4674 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4675 ;;
4676 *)
4677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4678for as_dir in notfound
4679do
4680 IFS=$as_save_IFS
4681 test -z "$as_dir" && as_dir=.
4682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4686 break 2
4687 fi
4688done
4689 done
4690IFS=$as_save_IFS
4691
4692 ;;
4693esac
4694fi
4695ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4696if test -n "$ac_pt_CXX"; then
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4698$as_echo "$ac_pt_CXX" >&6; }
4699else
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701$as_echo "no" >&6; }
4702fi
4703
4704 if test "x$ac_pt_CXX" = x; then
4705 CXX="clang++"
4706 else
4707 case $cross_compiling:$ac_tool_warned in
4708yes:)
4709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4711ac_tool_warned=yes ;;
4712esac
4713 CXX=$ac_pt_CXX
4714 fi
4715else
4716 CXX="$ac_cv_path_CXX"
4717fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004718 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004719 esac
4720 if test "$CXX" = "notfound"
4721 then
4722 CXX=""
4723 fi
4724fi
4725if test -z "$CXX"
4726then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004727 if test -n "$ac_tool_prefix"; then
4728 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4729 do
4730 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004734if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004735 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736else
4737 if test -n "$CXX"; then
4738 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4739else
4740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743 IFS=$as_save_IFS
4744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749 break 2
4750 fi
4751done
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004753IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754
4755fi
4756fi
4757CXX=$ac_cv_prog_CXX
4758if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4760$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761else
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764fi
4765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004766
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767 test -n "$CXX" && break
4768 done
4769fi
4770if test -z "$CXX"; then
4771 ac_ct_CXX=$CXX
4772 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4773do
4774 # Extract the first word of "$ac_prog", so it can be a program name with args.
4775set dummy $ac_prog; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
4778if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4779 $as_echo_n "(cached) " >&6
4780else
4781 if test -n "$ac_ct_CXX"; then
4782 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4783else
4784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787 IFS=$as_save_IFS
4788 test -z "$as_dir" && as_dir=.
4789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791 ac_cv_prog_ac_ct_CXX="$ac_prog"
4792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4793 break 2
4794 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 done
4797IFS=$as_save_IFS
4798
4799fi
4800fi
4801ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4802if test -n "$ac_ct_CXX"; then
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4804$as_echo "$ac_ct_CXX" >&6; }
4805else
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811 test -n "$ac_ct_CXX" && break
4812done
4813
4814 if test "x$ac_ct_CXX" = x; then
4815 CXX="notfound"
4816 else
4817 case $cross_compiling:$ac_tool_warned in
4818yes:)
4819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4821ac_tool_warned=yes ;;
4822esac
4823 CXX=$ac_ct_CXX
4824 fi
4825fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826
4827 if test "$CXX" = "notfound"
4828 then
4829 CXX=""
4830 fi
4831fi
4832if test "$preset_cxx" != "$CXX"
4833then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004834 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835
4836 By default, distutils will build C++ extension modules with \"$CXX\".
4837 If this is not intended, then set CXX on the configure command line.
4838 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004839$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840
4841 By default, distutils will build C++ extension modules with \"$CXX\".
4842 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004843 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844fi
4845
4846
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4848$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4849save_LDFLAGS="$LDFLAGS"
4850LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004851
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4853/* end confdefs.h. */
4854
4855int
4856main ()
4857{
4858
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863if ac_fn_c_try_link "$LINENO"; then :
4864 NO_AS_NEEDED="-Wl,--no-as-needed"
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4866$as_echo "yes" >&6; }
4867else
4868 NO_AS_NEEDED=""
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872rm -f core conftest.err conftest.$ac_objext \
4873 conftest$ac_exeext conftest.$ac_ext
4874LDFLAGS="$save_LDFLAGS"
4875
4876
4877
4878# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004879ac_ext=c
4880ac_cpp='$CPP $CPPFLAGS'
4881ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4882ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4883ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4885$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004886# On Suns, sometimes $CPP names a directory.
4887if test -n "$CPP" && test -d "$CPP"; then
4888 CPP=
4889fi
4890if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004891 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 # Double quotes because CPP needs to be expanded
4895 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4896 do
4897 ac_preproc_ok=false
4898for ac_c_preproc_warn_flag in '' yes
4899do
4900 # Use a header file that comes with gcc, so configuring glibc
4901 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004902 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4903 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004904 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004907/* end confdefs.h. */
4908#ifdef __STDC__
4909# include <limits.h>
4910#else
4911# include <assert.h>
4912#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004913 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004915if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004916
Matthias Kloseb9621712010-04-24 17:59:49 +00004917else
Martin v. Löwis11437992002-04-12 09:54:03 +00004918 # Broken: fails on valid input.
4919continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004920fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004921rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004923 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004924 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004927#include <ac_nonexistent.h>
4928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004929if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 # Broken: success on invalid input.
4931continue
4932else
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Passes both tests.
4934ac_preproc_ok=:
4935break
4936fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004937rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004938
4939done
4940# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004941rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004942if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 break
4944fi
4945
4946 done
4947 ac_cv_prog_CPP=$CPP
4948
4949fi
4950 CPP=$ac_cv_prog_CPP
4951else
4952 ac_cv_prog_CPP=$CPP
4953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4955$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004956ac_preproc_ok=false
4957for ac_c_preproc_warn_flag in '' yes
4958do
4959 # Use a header file that comes with gcc, so configuring glibc
4960 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004961 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4962 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004963 # On the NeXT, cc -E runs the code through the compiler's parser,
4964 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004966/* end confdefs.h. */
4967#ifdef __STDC__
4968# include <limits.h>
4969#else
4970# include <assert.h>
4971#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004972 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004974if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004975
Matthias Kloseb9621712010-04-24 17:59:49 +00004976else
Martin v. Löwis11437992002-04-12 09:54:03 +00004977 # Broken: fails on valid input.
4978continue
4979fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004980rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004982 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004983 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004986#include <ac_nonexistent.h>
4987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004988if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 # Broken: success on invalid input.
4990continue
4991else
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 # Passes both tests.
4993ac_preproc_ok=:
4994break
4995fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004996rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004997
4998done
4999# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005000rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005001if $ac_preproc_ok; then :
5002
Martin v. Löwis11437992002-04-12 09:54:03 +00005003else
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005006as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005007See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005008fi
5009
5010ac_ext=c
5011ac_cpp='$CPP $CPPFLAGS'
5012ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5013ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5014ac_compiler_gnu=$ac_cv_c_compiler_gnu
5015
5016
Matthias Kloseb9621712010-04-24 17:59:49 +00005017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5018$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005019if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005021else
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 # Loop through the user's path and test for each of PROGNAME-LIST
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5027do
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 for ac_prog in grep ggrep; do
5031 for ac_exec_ext in '' $ac_executable_extensions; do
5032 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005033 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005034# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005035 # Check for GNU $ac_path_GREP
5036case `"$ac_path_GREP" --version 2>&1` in
5037*GNU*)
5038 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5039*)
5040 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042 while :
5043 do
5044 cat "conftest.in" "conftest.in" >"conftest.tmp"
5045 mv "conftest.tmp" "conftest.in"
5046 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5049 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5052 # Best one so far, save it but keep looking for a better one
5053 ac_cv_path_GREP="$ac_path_GREP"
5054 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005055 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056 # 10*(2^10) chars as input seems more than enough
5057 test $ac_count -gt 10 && break
5058 done
5059 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5060esac
5061
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $ac_path_GREP_found && break 3
5063 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005068 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 +00005069 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070else
5071 ac_cv_path_GREP=$GREP
5072fi
5073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5076$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077 GREP="$ac_cv_path_GREP"
5078
5079
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5081$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005082if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084else
5085 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5086 then ac_cv_path_EGREP="$GREP -E"
5087 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 # Loop through the user's path and test for each of PROGNAME-LIST
5091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 for ac_prog in egrep; do
5097 for ac_exec_ext in '' $ac_executable_extensions; do
5098 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005099 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005100# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101 # Check for GNU $ac_path_EGREP
5102case `"$ac_path_EGREP" --version 2>&1` in
5103*GNU*)
5104 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5105*)
5106 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108 while :
5109 do
5110 cat "conftest.in" "conftest.in" >"conftest.tmp"
5111 mv "conftest.tmp" "conftest.in"
5112 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5115 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5118 # Best one so far, save it but keep looking for a better one
5119 ac_cv_path_EGREP="$ac_path_EGREP"
5120 ac_path_EGREP_max=$ac_count
5121 fi
5122 # 10*(2^10) chars as input seems more than enough
5123 test $ac_count -gt 10 && break
5124 done
5125 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5126esac
5127
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 $ac_path_EGREP_found && break 3
5129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005130 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005132IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005134 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 +00005135 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136else
5137 ac_cv_path_EGREP=$EGREP
5138fi
5139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005140 fi
5141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5143$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005144 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005145
5146
Matthias Kloseb9621712010-04-24 17:59:49 +00005147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5148$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005149if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 $as_echo_n "(cached) " >&6
5151else
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005153/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005154#include <stdlib.h>
5155#include <stdarg.h>
5156#include <string.h>
5157#include <float.h>
5158
5159int
5160main ()
5161{
5162
5163 ;
5164 return 0;
5165}
5166_ACEOF
5167if ac_fn_c_try_compile "$LINENO"; then :
5168 ac_cv_header_stdc=yes
5169else
5170 ac_cv_header_stdc=no
5171fi
5172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5173
5174if test $ac_cv_header_stdc = yes; then
5175 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5177/* end confdefs.h. */
5178#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005179
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005180_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005182 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005184else
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005186fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005187rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188
Matthias Kloseb9621712010-04-24 17:59:49 +00005189fi
5190
5191if test $ac_cv_header_stdc = yes; then
5192 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194/* end confdefs.h. */
5195#include <stdlib.h>
5196
5197_ACEOF
5198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5199 $EGREP "free" >/dev/null 2>&1; then :
5200
5201else
5202 ac_cv_header_stdc=no
5203fi
5204rm -f conftest*
5205
5206fi
5207
5208if test $ac_cv_header_stdc = yes; then
5209 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5210 if test "$cross_compiling" = yes; then :
5211 :
5212else
5213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5214/* end confdefs.h. */
5215#include <ctype.h>
5216#include <stdlib.h>
5217#if ((' ' & 0x0FF) == 0x020)
5218# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5219# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5220#else
5221# define ISLOWER(c) \
5222 (('a' <= (c) && (c) <= 'i') \
5223 || ('j' <= (c) && (c) <= 'r') \
5224 || ('s' <= (c) && (c) <= 'z'))
5225# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5226#endif
5227
5228#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5229int
5230main ()
5231{
5232 int i;
5233 for (i = 0; i < 256; i++)
5234 if (XOR (islower (i), ISLOWER (i))
5235 || toupper (i) != TOUPPER (i))
5236 return 2;
5237 return 0;
5238}
5239_ACEOF
5240if ac_fn_c_try_run "$LINENO"; then :
5241
5242else
5243 ac_cv_header_stdc=no
5244fi
5245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5246 conftest.$ac_objext conftest.beam conftest.$ac_ext
5247fi
5248
5249fi
5250fi
5251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5252$as_echo "$ac_cv_header_stdc" >&6; }
5253if test $ac_cv_header_stdc = yes; then
5254
5255$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5256
5257fi
5258
5259# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5260for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5261 inttypes.h stdint.h unistd.h
5262do :
5263 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5264ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5265"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005266if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005267 cat >>confdefs.h <<_ACEOF
5268#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5269_ACEOF
5270
5271fi
5272
5273done
5274
5275
5276
5277 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005278if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005279 MINIX=yes
5280else
5281 MINIX=
5282fi
5283
5284
5285 if test "$MINIX" = yes; then
5286
5287$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5288
5289
5290$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5291
5292
5293$as_echo "#define _MINIX 1" >>confdefs.h
5294
5295 fi
5296
5297
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5299$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005300if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005301 $as_echo_n "(cached) " >&6
5302else
5303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5304/* end confdefs.h. */
5305
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005306# define __EXTENSIONS__ 1
5307 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005308int
5309main ()
5310{
5311
5312 ;
5313 return 0;
5314}
5315_ACEOF
5316if ac_fn_c_try_compile "$LINENO"; then :
5317 ac_cv_safe_to_define___extensions__=yes
5318else
5319 ac_cv_safe_to_define___extensions__=no
5320fi
5321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5322fi
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5324$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5325 test $ac_cv_safe_to_define___extensions__ = yes &&
5326 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5327
5328 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5329
5330 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5331
5332 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5333
5334 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5335
5336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338# Check for unsupported systems
5339case $ac_sys_system/$ac_sys_release in
5340atheos*|Linux*/1*)
5341 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5342 echo See README for details.
5343 exit 1;;
5344esac
5345
5346
Matthias Kloseb9621712010-04-24 17:59:49 +00005347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5348$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349
5350# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005351if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 withval=$with_suffix;
5353 case $withval in
5354 no) EXEEXT=;;
5355 yes) EXEEXT=.exe;;
5356 *) EXEEXT=$withval;;
5357 esac
5358fi
5359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5361$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363# Test whether we're running on a non-case-sensitive system, in which
5364# case we give a warning if no ext is given
5365
Matthias Kloseb9621712010-04-24 17:59:49 +00005366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5367$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368if test ! -d CaseSensitiveTestDir; then
5369mkdir CaseSensitiveTestDir
5370fi
5371
5372if test -d casesensitivetestdir
5373then
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5375$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376 BUILDEXEEXT=.exe
5377else
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5379$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380 BUILDEXEEXT=$EXEEXT
5381fi
5382rmdir CaseSensitiveTestDir
5383
5384case $MACHDEP in
5385bsdos*)
5386 case $CC in
5387 gcc) CC="$CC -D_HAVE_BSDI";;
5388 esac;;
5389esac
5390
5391case $ac_sys_system in
5392hp*|HP*)
5393 case $CC in
5394 cc|*/cc) CC="$CC -Ae";;
5395 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396esac
5397
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005398MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5399
5400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401
5402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5404$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405if test -z "$LIBRARY"
5406then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005407 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5410$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411
5412# LDLIBRARY is the name of the library to link against (as opposed to the
5413# name of the library into which to insert object files). BLDLIBRARY is also
5414# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5415# is blank as the main program is not linked directly against LDLIBRARY.
5416# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5417# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5418# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5419# DLLLIBRARY is the shared (i.e., DLL) library.
5420#
5421# RUNSHARED is used to run shared python without installed libraries
5422#
5423# INSTSONAME is the name of the shared library that will be use to install
5424# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005425#
5426# LDVERSION is the shared library version number, normally the Python version
5427# with the ABI build flags appended.
5428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429
5430
5431
5432
5433
5434
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436LDLIBRARY="$LIBRARY"
5437BLDLIBRARY='$(LDLIBRARY)'
5438INSTSONAME='$(LDLIBRARY)'
5439DLLLIBRARY=''
5440LDLIBRARYDIR=''
5441RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005442LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
5444# LINKCC is the command that links the python executable -- default is $(CC).
5445# If CXX is set, and if it is needed to link a main function that was
5446# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5447# python might then depend on the C++ runtime
5448# This is altered for AIX in order to build the export list before
5449# linking.
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5452$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453if test -z "$LINKCC"
5454then
5455 LINKCC='$(PURIFY) $(MAINCC)'
5456 case $ac_sys_system in
5457 AIX*)
5458 exp_extra="\"\""
5459 if test $ac_sys_release -ge 5 -o \
5460 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5461 exp_extra="."
5462 fi
5463 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464 QNX*)
5465 # qcc must be used because the other compilers do not
5466 # support -N.
5467 LINKCC=qcc;;
5468 esac
5469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5471$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472
5473# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5474# make sure we default having it set to "no": this is used by
5475# distutils.unixccompiler to know if it should add --enable-new-dtags
5476# to linker command lines, and failing to detect GNU ld simply results
5477# in the same bahaviour as before.
5478
Matthias Kloseb9621712010-04-24 17:59:49 +00005479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5480$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005481ac_prog=ld
5482if test "$GCC" = yes; then
5483 ac_prog=`$CC -print-prog-name=ld`
5484fi
5485case `"$ac_prog" -V 2>&1 < /dev/null` in
5486 *GNU*)
5487 GNULD=yes;;
5488 *)
5489 GNULD=no;;
5490esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5492$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5495$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005496if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005497 $as_echo_n "(cached) " >&6
5498else
5499 ac_cv_c_inline=no
5500for ac_kw in inline __inline__ __inline; do
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502/* end confdefs.h. */
5503#ifndef __cplusplus
5504typedef int foo_t;
5505static $ac_kw foo_t static_foo () {return 0; }
5506$ac_kw foo_t foo () {return 0; }
5507#endif
5508
5509_ACEOF
5510if ac_fn_c_try_compile "$LINENO"; then :
5511 ac_cv_c_inline=$ac_kw
5512fi
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514 test "$ac_cv_c_inline" != no && break
5515done
5516
5517fi
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5519$as_echo "$ac_cv_c_inline" >&6; }
5520
5521case $ac_cv_c_inline in
5522 inline | yes) ;;
5523 *)
5524 case $ac_cv_c_inline in
5525 no) ac_val=;;
5526 *) ac_val=$ac_cv_c_inline;;
5527 esac
5528 cat >>confdefs.h <<_ACEOF
5529#ifndef __cplusplus
5530#define inline $ac_val
5531#endif
5532_ACEOF
5533 ;;
5534esac
5535
5536if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005537
5538$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005539
5540
5541fi
5542
5543
Matthias Kloseb9621712010-04-24 17:59:49 +00005544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5545$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005547if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548 enableval=$enable_shared;
5549fi
5550
5551
5552if test -z "$enable_shared"
5553then
5554 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005555 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556 enable_shared="yes";;
5557 *)
5558 enable_shared="no";;
5559 esac
5560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5562$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563
Matthias Kloseb9621712010-04-24 17:59:49 +00005564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5565$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005567if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005568 enableval=$enable_profiling;
5569fi
5570
5571if test "x$enable_profiling" = xyes; then
5572 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005573 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575/* end confdefs.h. */
5576int main() { return 0; }
5577_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005578if ac_fn_c_try_link "$LINENO"; then :
5579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005583rm -f core conftest.err conftest.$ac_objext \
5584 conftest$ac_exeext conftest.$ac_ext
5585 CC="$ac_save_cc"
5586else
5587 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5590$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591
doko@ubuntu.comba015832012-06-30 16:52:05 +02005592if test "x$enable_profiling" = xyes; then
5593 BASECFLAGS="-pg $BASECFLAGS"
5594 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595fi
5596
Matthias Kloseb9621712010-04-24 17:59:49 +00005597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5598$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599
5600# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5601# library that we build, but we do not want to link against it (we
5602# will find it with a -framework option). For this reason there is an
5603# extra variable BLDLIBRARY against which Python and the extension
5604# modules are linked, BLDLIBRARY. This is normally the same as
5605# LDLIBRARY, but empty for MacOSX framework builds.
5606if test "$enable_framework"
5607then
5608 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5609 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5610 BLDLIBRARY=''
5611else
5612 BLDLIBRARY='$(LDLIBRARY)'
5613fi
5614
5615# Other platforms follow
5616if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005617 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618
Matthias Kloseb9621712010-04-24 17:59:49 +00005619$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620
5621 case $ac_sys_system in
5622 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005623 LDLIBRARY='libpython$(LDVERSION).dll.a'
5624 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625 ;;
5626 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005627 LDLIBRARY='libpython$(LDVERSION).so'
5628 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5630 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005631 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005632 then
5633 PY3LIBRARY=libpython3.so
5634 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005636 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005637 LDLIBRARY='libpython$(LDVERSION).so'
5638 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5640 case $ac_sys_system in
5641 FreeBSD*)
5642 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5643 ;;
5644 esac
5645 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005646 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005647 then
5648 PY3LIBRARY=libpython3.so
5649 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650 ;;
5651 hp*|HP*)
5652 case `uname -m` in
5653 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005654 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 ;;
5656 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005657 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ;;
5659 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005660 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5662 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005664 LDLIBRARY='libpython$(LDVERSION).dylib'
5665 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5667 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005668 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005669 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005670 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5671 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672
5673 esac
5674else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005675 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 case $ac_sys_system in
5677 CYGWIN*)
5678 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005679 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 ;;
5681 esac
5682fi
5683
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005684if test "$cross_compiling" = yes; then
5685 RUNSHARED=
5686fi
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5689$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690
5691if test -n "$ac_tool_prefix"; then
5692 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5693set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005696if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698else
5699 if test -n "$RANLIB"; then
5700 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5701else
5702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705 IFS=$as_save_IFS
5706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711 break 2
5712 fi
5713done
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715IFS=$as_save_IFS
5716
5717fi
5718fi
5719RANLIB=$ac_cv_prog_RANLIB
5720if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5722$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726fi
5727
5728
5729fi
5730if test -z "$ac_cv_prog_RANLIB"; then
5731 ac_ct_RANLIB=$RANLIB
5732 # Extract the first word of "ranlib", so it can be a program name with args.
5733set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005736if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738else
5739 if test -n "$ac_ct_RANLIB"; then
5740 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5741else
5742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745 IFS=$as_save_IFS
5746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 break 2
5752 fi
5753done
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755IFS=$as_save_IFS
5756
5757fi
5758fi
5759ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5760if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5762$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763else
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766fi
5767
5768 if test "x$ac_ct_RANLIB" = x; then
5769 RANLIB=":"
5770 else
5771 case $cross_compiling:$ac_tool_warned in
5772yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775ac_tool_warned=yes ;;
5776esac
5777 RANLIB=$ac_ct_RANLIB
5778 fi
5779else
5780 RANLIB="$ac_cv_prog_RANLIB"
5781fi
5782
5783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005784if test -n "$ac_tool_prefix"; then
5785 for ac_prog in ar aal
5786 do
5787 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5788set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005791if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793else
5794 if test -n "$AR"; then
5795 ac_cv_prog_AR="$AR" # Let the user override the test.
5796else
5797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5798for as_dir in $PATH
5799do
5800 IFS=$as_save_IFS
5801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005804 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 break 2
5807 fi
5808done
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810IFS=$as_save_IFS
5811
5812fi
5813fi
5814AR=$ac_cv_prog_AR
5815if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5817$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818else
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821fi
5822
5823
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005824 test -n "$AR" && break
5825 done
5826fi
5827if test -z "$AR"; then
5828 ac_ct_AR=$AR
5829 for ac_prog in ar aal
5830do
5831 # Extract the first word of "$ac_prog", so it can be a program name with args.
5832set dummy $ac_prog; ac_word=$2
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
5835if ${ac_cv_prog_ac_ct_AR+:} false; then :
5836 $as_echo_n "(cached) " >&6
5837else
5838 if test -n "$ac_ct_AR"; then
5839 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5840else
5841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5842for as_dir in $PATH
5843do
5844 IFS=$as_save_IFS
5845 test -z "$as_dir" && as_dir=.
5846 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005848 ac_cv_prog_ac_ct_AR="$ac_prog"
5849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5850 break 2
5851 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005853 done
5854IFS=$as_save_IFS
5855
5856fi
5857fi
5858ac_ct_AR=$ac_cv_prog_ac_ct_AR
5859if test -n "$ac_ct_AR"; then
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5861$as_echo "$ac_ct_AR" >&6; }
5862else
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864$as_echo "no" >&6; }
5865fi
5866
5867
5868 test -n "$ac_ct_AR" && break
5869done
5870
5871 if test "x$ac_ct_AR" = x; then
5872 AR="ar"
5873 else
5874 case $cross_compiling:$ac_tool_warned in
5875yes:)
5876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5878ac_tool_warned=yes ;;
5879esac
5880 AR=$ac_ct_AR
5881 fi
5882fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
5884
5885# tweak ARFLAGS only if the user didn't set it on the command line
5886
5887if test -z "$ARFLAGS"
5888then
5889 ARFLAGS="rc"
5890fi
5891
doko@ubuntu.com58844492012-06-30 18:25:32 +02005892if test -n "$ac_tool_prefix"; then
5893 for ac_prog in readelf
5894 do
5895 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5896set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_prog_READELF+:} false; then :
5900 $as_echo_n "(cached) " >&6
5901else
5902 if test -n "$READELF"; then
5903 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5904else
5905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5906for as_dir in $PATH
5907do
5908 IFS=$as_save_IFS
5909 test -z "$as_dir" && as_dir=.
5910 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005912 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5914 break 2
5915 fi
5916done
5917 done
5918IFS=$as_save_IFS
5919
5920fi
5921fi
5922READELF=$ac_cv_prog_READELF
5923if test -n "$READELF"; then
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5925$as_echo "$READELF" >&6; }
5926else
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932 test -n "$READELF" && break
5933 done
5934fi
5935if test -z "$READELF"; then
5936 ac_ct_READELF=$READELF
5937 for ac_prog in readelf
5938do
5939 # Extract the first word of "$ac_prog", so it can be a program name with args.
5940set dummy $ac_prog; ac_word=$2
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5942$as_echo_n "checking for $ac_word... " >&6; }
5943if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5944 $as_echo_n "(cached) " >&6
5945else
5946 if test -n "$ac_ct_READELF"; then
5947 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5948else
5949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952 IFS=$as_save_IFS
5953 test -z "$as_dir" && as_dir=.
5954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005956 ac_cv_prog_ac_ct_READELF="$ac_prog"
5957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5958 break 2
5959 fi
5960done
5961 done
5962IFS=$as_save_IFS
5963
5964fi
5965fi
5966ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5967if test -n "$ac_ct_READELF"; then
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5969$as_echo "$ac_ct_READELF" >&6; }
5970else
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
5973fi
5974
5975
5976 test -n "$ac_ct_READELF" && break
5977done
5978
5979 if test "x$ac_ct_READELF" = x; then
5980 READELF=":"
5981 else
5982 case $cross_compiling:$ac_tool_warned in
5983yes:)
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5986ac_tool_warned=yes ;;
5987esac
5988 READELF=$ac_ct_READELF
5989 fi
5990fi
5991
5992if test "$cross_compiling" = yes; then
5993 case "$READELF" in
5994 readelf|:)
5995 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5996 ;;
5997 esac
5998fi
5999
6000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001
Matthias Klosec4c48422012-10-21 23:05:35 +02006002for ac_prog in python$PACKAGE_VERSION python3 python
6003do
6004 # Extract the first word of "$ac_prog", so it can be a program name with args.
6005set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006008if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009 $as_echo_n "(cached) " >&6
6010else
Matthias Klosec4c48422012-10-21 23:05:35 +02006011 if test -n "$PYTHON"; then
6012 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006013else
6014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6015for as_dir in $PATH
6016do
6017 IFS=$as_save_IFS
6018 test -z "$as_dir" && as_dir=.
6019 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006021 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6023 break 2
6024 fi
6025done
6026 done
6027IFS=$as_save_IFS
6028
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029fi
6030fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006031PYTHON=$ac_cv_prog_PYTHON
6032if test -n "$PYTHON"; then
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6034$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006035else
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038fi
6039
6040
Matthias Klosec4c48422012-10-21 23:05:35 +02006041 test -n "$PYTHON" && break
6042done
6043test -n "$PYTHON" || PYTHON="not-found"
6044
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006045if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006046 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6047else
6048 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006049fi
6050
6051
Kushal Das02d23a22014-04-15 23:50:06 +05306052for ac_prog in python$PACKAGE_VERSION python3 python
6053do
6054 # Extract the first word of "$ac_prog", so it can be a program name with args.
6055set dummy $ac_prog; ac_word=$2
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057$as_echo_n "checking for $ac_word... " >&6; }
6058if ${ac_cv_prog_PYTHON+:} false; then :
6059 $as_echo_n "(cached) " >&6
6060else
6061 if test -n "$PYTHON"; then
6062 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6063else
6064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065for as_dir in $PATH
6066do
6067 IFS=$as_save_IFS
6068 test -z "$as_dir" && as_dir=.
6069 for ac_exec_ext in '' $ac_executable_extensions; do
6070 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6071 ac_cv_prog_PYTHON="$ac_prog"
6072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6073 break 2
6074 fi
6075done
6076 done
6077IFS=$as_save_IFS
6078
6079fi
6080fi
6081PYTHON=$ac_cv_prog_PYTHON
6082if test -n "$PYTHON"; then
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6084$as_echo "$PYTHON" >&6; }
6085else
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087$as_echo "no" >&6; }
6088fi
6089
6090
6091 test -n "$PYTHON" && break
6092done
6093test -n "$PYTHON" || PYTHON="not-found"
6094
6095if test "$PYTHON" = not-found; then
6096 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6097else
6098 OPCODEHGEN="$PYTHON"
6099fi
6100
6101
6102
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103case $MACHDEP in
6104bsdos*|hp*|HP*)
6105 # install -d does not work on BSDI or HP-UX
6106 if test -z "$INSTALL"
6107 then
6108 INSTALL="${srcdir}/install-sh -c"
6109 fi
6110esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111# Find a good install program. We prefer a C program (faster),
6112# so one script is as good as another. But avoid the broken or
6113# incompatible versions:
6114# SysV /etc/install, /usr/sbin/install
6115# SunOS /usr/etc/install
6116# IRIX /sbin/install
6117# AIX /bin/install
6118# AmigaOS /C/install, which installs bootblocks on floppy discs
6119# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6120# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6121# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6122# OS/2's system install, which has a completely different semantic
6123# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006124# Reject install programs that cannot install multiple files.
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6126$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006128if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006129 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130else
6131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6132for as_dir in $PATH
6133do
6134 IFS=$as_save_IFS
6135 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 # Account for people who put trailing slashes in PATH elements.
6137case $as_dir/ in #((
6138 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141 /usr/ucb/* ) ;;
6142 *)
6143 # OSF1 and SCO ODT 3.0 have their own names for install.
6144 # Don't use installbsd from OSF since it installs stuff as root
6145 # by default.
6146 for ac_prog in ginstall scoinst install; do
6147 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006148 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149 if test $ac_prog = install &&
6150 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6151 # AIX install. It has an incompatible calling convention.
6152 :
6153 elif test $ac_prog = install &&
6154 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6155 # program-specific install script used by HP pwplus--don't use.
6156 :
6157 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006158 rm -rf conftest.one conftest.two conftest.dir
6159 echo one > conftest.one
6160 echo two > conftest.two
6161 mkdir conftest.dir
6162 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6163 test -s conftest.one && test -s conftest.two &&
6164 test -s conftest.dir/conftest.one &&
6165 test -s conftest.dir/conftest.two
6166 then
6167 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6168 break 3
6169 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170 fi
6171 fi
6172 done
6173 done
6174 ;;
6175esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006176
6177 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178IFS=$as_save_IFS
6179
Matthias Kloseb9621712010-04-24 17:59:49 +00006180rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181
6182fi
6183 if test "${ac_cv_path_install+set}" = set; then
6184 INSTALL=$ac_cv_path_install
6185 else
6186 # As a last resort, use the slow shell script. Don't cache a
6187 # value for INSTALL within a source directory, because that will
6188 # break other packages using the cache if that directory is
6189 # removed, or if the value is a relative name.
6190 INSTALL=$ac_install_sh
6191 fi
6192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6194$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195
6196# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6197# It thinks the first close brace ends the variable substitution.
6198test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6199
6200test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6201
6202test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6203
Matthias Klose93a0ef12012-03-15 18:08:34 +01006204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6205$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6206if test -z "$MKDIR_P"; then
6207 if ${ac_cv_path_mkdir+:} false; then :
6208 $as_echo_n "(cached) " >&6
6209else
6210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6212do
6213 IFS=$as_save_IFS
6214 test -z "$as_dir" && as_dir=.
6215 for ac_prog in mkdir gmkdir; do
6216 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006217 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006218 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6219 'mkdir (GNU coreutils) '* | \
6220 'mkdir (coreutils) '* | \
6221 'mkdir (fileutils) '4.1*)
6222 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6223 break 3;;
6224 esac
6225 done
6226 done
6227 done
6228IFS=$as_save_IFS
6229
6230fi
6231
6232 test -d ./--version && rmdir ./--version
6233 if test "${ac_cv_path_mkdir+set}" = set; then
6234 MKDIR_P="$ac_cv_path_mkdir -p"
6235 else
6236 # As a last resort, use the slow shell script. Don't cache a
6237 # value for MKDIR_P within a source directory, because that will
6238 # break other packages using the cache if that directory is
6239 # removed, or if the value is a relative name.
6240 MKDIR_P="$ac_install_sh -d"
6241 fi
6242fi
6243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6244$as_echo "$MKDIR_P" >&6; }
6245
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246
6247# Not every filesystem supports hard links
6248
6249if test -z "$LN" ; then
6250 case $ac_sys_system in
6251 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006252 *) LN=ln;;
6253 esac
6254fi
6255
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006256# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006257
6258ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006259
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6262$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263
6264# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006265if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266 withval=$with_pydebug;
6267if test "$withval" != no
6268then
6269
Matthias Kloseb9621712010-04-24 17:59:49 +00006270$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271
Matthias Kloseb9621712010-04-24 17:59:49 +00006272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6273$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006275 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006276else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6277$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278fi
6279else
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6281$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282fi
6283
6284
6285# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6286# merged with this chunk of code?
6287
6288# Optimizer/debugger flags
6289# ------------------------
6290# (The following bit of code is complicated enough - please keep things
6291# indented properly. Just pretend you're editing Python code. ;-)
6292
6293# There are two parallel sets of case statements below, one that checks to
6294# see if OPT was set and one that does BASECFLAGS setting based upon
6295# compiler and platform. BASECFLAGS tweaks need to be made even if the
6296# user set OPT.
6297
6298# tweak OPT based on compiler and platform, only if the user didn't set
6299# it on the command line
6300
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006301if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302then
6303 case $GCC in
6304 yes)
6305 if test "$CC" != 'g++' ; then
6306 STRICT_PROTO="-Wstrict-prototypes"
6307 fi
6308 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6309 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6310 WRAP="-fwrapv"
6311 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006312
6313 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006314 case $CC in
6315 *clang*) WRAP="-fwrapv"
6316 ;;
6317 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319 case $ac_cv_prog_cc_g in
6320 yes)
6321 if test "$Py_DEBUG" = 'true' ; then
6322 # Optimization messes up debuggers, so turn it off for
6323 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006324 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 else
6326 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6327 fi
6328 ;;
6329 *)
6330 OPT="-O3 -Wall $STRICT_PROTO"
6331 ;;
6332 esac
6333 case $ac_sys_system in
6334 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6335 ;;
6336 esac
6337 ;;
6338
6339 *)
6340 OPT="-O"
6341 ;;
6342 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343fi
6344
6345
6346
6347# The -arch flags for universal builds on OSX
6348UNIVERSAL_ARCH_FLAGS=
6349
6350
6351# tweak BASECFLAGS based on compiler and platform
6352case $GCC in
6353yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006354 # Python doesn't violate C99 aliasing rules, but older versions of
6355 # GCC produce warnings for legal Python code. Enable
6356 # -fno-strict-aliasing on versions of GCC that support but produce
6357 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6359$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360 ac_save_cc="$CC"
6361 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006362 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006363 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006364 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006365else
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006368
Matthias Kloseb159a552010-04-25 21:00:44 +00006369
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006370int
6371main ()
6372{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006373
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006374 ;
6375 return 0;
6376}
Matthias Kloseb159a552010-04-25 21:00:44 +00006377
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006379if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006380
6381 CC="$ac_save_cc -fstrict-aliasing"
6382 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006384/* end confdefs.h. */
6385
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006386 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006387int
6388main ()
6389{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006390double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006391 ;
6392 return 0;
6393}
Matthias Kloseb159a552010-04-25 21:00:44 +00006394
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006396if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006397
6398 ac_cv_no_strict_aliasing=no
6399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400else
Matthias Kloseb159a552010-04-25 21:00:44 +00006401
6402 ac_cv_no_strict_aliasing=yes
6403
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006404fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006406
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006407else
Matthias Kloseb159a552010-04-25 21:00:44 +00006408
6409 ac_cv_no_strict_aliasing=no
6410
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006413fi
6414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006415 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6418$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006419 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420 then
6421 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6422 fi
6423
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6425$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6426 ac_save_cc="$CC"
6427 CC="$CC -Wunused-result -Werror"
6428 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006429 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006430 $as_echo_n "(cached) " >&6
6431else
6432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6433/* end confdefs.h. */
6434
6435
6436int
6437main ()
6438{
6439
6440 ;
6441 return 0;
6442}
6443
6444_ACEOF
6445if ac_fn_c_try_compile "$LINENO"; then :
6446
6447 ac_cv_disable_unused_result_warning=yes
6448
6449else
6450
6451 ac_cv_disable_unused_result_warning=no
6452
6453fi
6454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6455fi
6456
6457 CFLAGS="$save_CFLAGS"
6458 CC="$ac_save_cc"
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6460$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6461
6462 if test $ac_cv_disable_unused_result_warning = yes
6463 then
6464 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6465 fi
6466
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6468$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6469 ac_save_cc="$CC"
6470 CC="$CC -Werror=declaration-after-statement"
6471 save_CFLAGS="$CFLAGS"
6472 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6473 $as_echo_n "(cached) " >&6
6474else
6475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6476/* end confdefs.h. */
6477
6478
6479int
6480main ()
6481{
6482
6483 ;
6484 return 0;
6485}
6486
6487_ACEOF
6488if ac_fn_c_try_compile "$LINENO"; then :
6489
6490 ac_cv_declaration_after_statement_warning=yes
6491
6492else
6493
6494 ac_cv_declaration_after_statement_warning=no
6495
6496fi
6497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6498fi
6499
6500 CFLAGS="$save_CFLAGS"
6501 CC="$ac_save_cc"
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6503$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6504
6505 if test $ac_cv_declaration_after_statement_warning = yes
6506 then
6507 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6508 fi
6509
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006510 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6511 # support. Without this, treatment of subnormals doesn't follow
6512 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006513 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514 alpha*)
6515 BASECFLAGS="$BASECFLAGS -mieee"
6516 ;;
6517 esac
6518
6519 case $ac_sys_system in
6520 SCO_SV*)
6521 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6522 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006523
6524 # is there any other compiler on Darwin besides gcc?
6525 Darwin*)
6526 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6527 # used to be here, but non-Apple gcc doesn't accept them.
6528 if test "${CC}" = gcc
6529 then
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006531$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006532 case "${UNIVERSALSDK}" in
6533 */MacOSX10.4u.sdk)
6534 # Build using 10.4 SDK, force usage of gcc when the
6535 # compiler is gcc, otherwise the user will get very
6536 # confusing error messages when building on OSX 10.6
6537 CC=gcc-4.0
6538 CPP=cpp-4.0
6539 ;;
6540 esac
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006542$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006543 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544
Ned Deily87adb6e2013-10-18 21:09:56 -07006545 if test "${enable_universalsdk}"
6546 then
6547 case "$UNIVERSAL_ARCHS" in
6548 32-bit)
6549 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6550 LIPO_32BIT_FLAGS=""
6551 ARCH_RUN_32BIT=""
6552 ;;
6553 64-bit)
6554 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6555 LIPO_32BIT_FLAGS=""
6556 ARCH_RUN_32BIT="true"
6557 ;;
6558 all)
6559 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6560 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6561 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6562 ;;
6563 intel)
6564 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6565 LIPO_32BIT_FLAGS="-extract i386"
6566 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6567 ;;
6568 intel-32)
6569 UNIVERSAL_ARCH_FLAGS="-arch i386"
6570 LIPO_32BIT_FLAGS=""
6571 ARCH_RUN_32BIT=""
6572 ;;
6573 3-way)
6574 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6575 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6576 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6577 ;;
6578 *)
6579 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6580 ;;
6581 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582
Ned Deily87adb6e2013-10-18 21:09:56 -07006583 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6584 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6585 if test "${UNIVERSALSDK}" != "/"
6586 then
6587 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6588 fi
6589 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590
Ned Deily87adb6e2013-10-18 21:09:56 -07006591 # Calculate an appropriate deployment target for this build:
6592 # The deployment target value is used explicitly to enable certain
6593 # features are enabled (such as builtin libedit support for readline)
6594 # through the use of Apple's Availabiliy Macros and is used as a
6595 # component of the string returned by distutils.get_platform().
6596 #
6597 # Use the value from:
6598 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6599 # 2. the operating system version of the build machine if >= 10.6
6600 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6601 # below to pick either 10.3, 10.4, or 10.5 as the target.
6602 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006603
Ned Deily87adb6e2013-10-18 21:09:56 -07006604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6605$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6606 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6607 if test ${cur_target} '>' 10.2 && \
6608 test ${cur_target} '<' 10.6
6609 then
6610 cur_target=10.3
6611 if test ${enable_universalsdk}
6612 then
6613 case "$UNIVERSAL_ARCHS" in
6614 all|3-way|intel|64-bit)
6615 # These configurations were first supported in 10.5
6616 cur_target='10.5'
6617 ;;
6618 esac
6619 else
6620 if test `/usr/bin/arch` = "i386"
6621 then
6622 # 10.4 was the first release to support Intel archs
6623 cur_target="10.4"
6624 fi
6625 fi
6626 fi
6627 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006628
Ned Deily87adb6e2013-10-18 21:09:56 -07006629 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6630 # environment with a value that is the same as what we'll use
6631 # in the Makefile to ensure that we'll get the same compiler
6632 # environment during configure and build time.
6633 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6634 export MACOSX_DEPLOYMENT_TARGET
6635 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6637$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006638
Ned Deily87adb6e2013-10-18 21:09:56 -07006639 # end of Darwin* tests
6640 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641 esac
6642 ;;
6643
6644*)
6645 case $ac_sys_system in
6646 OpenUNIX*|UnixWare*)
6647 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6648 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649 SCO_SV*)
6650 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6651 ;;
6652 esac
6653 ;;
6654esac
6655
6656if test "$Py_DEBUG" = 'true'; then
6657 :
6658else
6659 OPT="-DNDEBUG $OPT"
6660fi
6661
6662if test "$ac_arch_flags"
6663then
6664 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6665fi
6666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006667# On some compilers, pthreads are available without further options
6668# (e.g. MacOS X). On some of these systems, the compiler will not
6669# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6670# So we have to see first whether pthreads are available without
6671# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6673$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006674if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676else
Matthias Kloseb9621712010-04-24 17:59:49 +00006677 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678 ac_cv_pthread_is_default=no
6679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681/* end confdefs.h. */
6682
Stefan Krah7dba5942012-11-22 22:49:11 +01006683#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684#include <pthread.h>
6685
6686void* routine(void* p){return NULL;}
6687
6688int main(){
6689 pthread_t p;
6690 if(pthread_create(&p,NULL,routine,NULL)!=0)
6691 return 1;
6692 (void)pthread_detach(p);
6693 return 0;
6694}
6695
6696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006697if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006698
6699 ac_cv_pthread_is_default=yes
6700 ac_cv_kthread=no
6701 ac_cv_pthread=no
6702
6703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708fi
6709
6710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711fi
6712
Matthias Kloseb9621712010-04-24 17:59:49 +00006713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6714$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006715
6716
6717if test $ac_cv_pthread_is_default = yes
6718then
6719 ac_cv_kpthread=no
6720else
6721# -Kpthread, if available, provides the right #defines
6722# and linker options to make pthread_create available
6723# Some compilers won't report that they do not support -Kpthread,
6724# so we need to run a program to see whether it really made the
6725# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6727$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006728if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730else
6731 ac_save_cc="$CC"
6732CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006733if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734 ac_cv_kpthread=no
6735else
Matthias Kloseb9621712010-04-24 17:59:49 +00006736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737/* end confdefs.h. */
6738
Stefan Krah7dba5942012-11-22 22:49:11 +01006739#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740#include <pthread.h>
6741
6742void* routine(void* p){return NULL;}
6743
6744int main(){
6745 pthread_t p;
6746 if(pthread_create(&p,NULL,routine,NULL)!=0)
6747 return 1;
6748 (void)pthread_detach(p);
6749 return 0;
6750}
6751
6752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006753if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754 ac_cv_kpthread=yes
6755else
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760fi
6761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006762CC="$ac_save_cc"
6763fi
6764
Matthias Kloseb9621712010-04-24 17:59:49 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6766$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767fi
6768
6769if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6770then
6771# -Kthread, if available, provides the right #defines
6772# and linker options to make pthread_create available
6773# Some compilers won't report that they do not support -Kthread,
6774# so we need to run a program to see whether it really made the
6775# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6777$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006778if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780else
6781 ac_save_cc="$CC"
6782CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006783if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784 ac_cv_kthread=no
6785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787/* end confdefs.h. */
6788
Stefan Krah7dba5942012-11-22 22:49:11 +01006789#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790#include <pthread.h>
6791
6792void* routine(void* p){return NULL;}
6793
6794int main(){
6795 pthread_t p;
6796 if(pthread_create(&p,NULL,routine,NULL)!=0)
6797 return 1;
6798 (void)pthread_detach(p);
6799 return 0;
6800}
6801
6802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006803if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804 ac_cv_kthread=yes
6805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810fi
6811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812CC="$ac_save_cc"
6813fi
6814
Matthias Kloseb9621712010-04-24 17:59:49 +00006815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6816$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817fi
6818
6819if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6820then
6821# -pthread, if available, provides the right #defines
6822# and linker options to make pthread_create available
6823# Some compilers won't report that they do not support -pthread,
6824# so we need to run a program to see whether it really made the
6825# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6827$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006828if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830else
6831 ac_save_cc="$CC"
6832CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006833if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834 ac_cv_pthread=no
6835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837/* end confdefs.h. */
6838
Stefan Krah7dba5942012-11-22 22:49:11 +01006839#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840#include <pthread.h>
6841
6842void* routine(void* p){return NULL;}
6843
6844int main(){
6845 pthread_t p;
6846 if(pthread_create(&p,NULL,routine,NULL)!=0)
6847 return 1;
6848 (void)pthread_detach(p);
6849 return 0;
6850}
6851
6852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006853if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 ac_cv_pthread=yes
6855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860fi
6861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862CC="$ac_save_cc"
6863fi
6864
Matthias Kloseb9621712010-04-24 17:59:49 +00006865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6866$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867fi
6868
6869# If we have set a CC compiler flag for thread support then
6870# check if it works for CXX, too.
6871ac_cv_cxx_thread=no
6872if test ! -z "$CXX"
6873then
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6875$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876ac_save_cxx="$CXX"
6877
6878if test "$ac_cv_kpthread" = "yes"
6879then
6880 CXX="$CXX -Kpthread"
6881 ac_cv_cxx_thread=yes
6882elif test "$ac_cv_kthread" = "yes"
6883then
6884 CXX="$CXX -Kthread"
6885 ac_cv_cxx_thread=yes
6886elif test "$ac_cv_pthread" = "yes"
6887then
6888 CXX="$CXX -pthread"
6889 ac_cv_cxx_thread=yes
6890fi
6891
6892if test $ac_cv_cxx_thread = yes
6893then
6894 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6895 $CXX -c conftest.$ac_ext 2>&5
6896 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6897 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6898 then
6899 ac_cv_cxx_thread=yes
6900 else
6901 ac_cv_cxx_thread=no
6902 fi
6903 rm -fr conftest*
6904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6906$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907fi
6908CXX="$ac_save_cxx"
6909
6910
6911# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6913$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006914if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916else
Matthias Kloseb9621712010-04-24 17:59:49 +00006917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918/* end confdefs.h. */
6919#include <stdlib.h>
6920#include <stdarg.h>
6921#include <string.h>
6922#include <float.h>
6923
6924int
6925main ()
6926{
6927
6928 ;
6929 return 0;
6930}
6931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006932if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933 ac_cv_header_stdc=yes
6934else
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6938
6939if test $ac_cv_header_stdc = yes; then
6940 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942/* end confdefs.h. */
6943#include <string.h>
6944
6945_ACEOF
6946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 $EGREP "memchr" >/dev/null 2>&1; then :
6948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949else
6950 ac_cv_header_stdc=no
6951fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006952rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953
6954fi
6955
6956if test $ac_cv_header_stdc = yes; then
6957 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959/* end confdefs.h. */
6960#include <stdlib.h>
6961
6962_ACEOF
6963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 $EGREP "free" >/dev/null 2>&1; then :
6965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966else
6967 ac_cv_header_stdc=no
6968fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006969rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970
6971fi
6972
6973if test $ac_cv_header_stdc = yes; then
6974 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006975 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976 :
6977else
Matthias Kloseb9621712010-04-24 17:59:49 +00006978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979/* end confdefs.h. */
6980#include <ctype.h>
6981#include <stdlib.h>
6982#if ((' ' & 0x0FF) == 0x020)
6983# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6984# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6985#else
6986# define ISLOWER(c) \
6987 (('a' <= (c) && (c) <= 'i') \
6988 || ('j' <= (c) && (c) <= 'r') \
6989 || ('s' <= (c) && (c) <= 'z'))
6990# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6991#endif
6992
6993#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6994int
6995main ()
6996{
6997 int i;
6998 for (i = 0; i < 256; i++)
6999 if (XOR (islower (i), ISLOWER (i))
7000 || toupper (i) != TOUPPER (i))
7001 return 2;
7002 return 0;
7003}
7004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007005if ac_fn_c_try_run "$LINENO"; then :
7006
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007007else
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012fi
7013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014fi
7015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7017$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018if test $ac_cv_header_stdc = yes; then
7019
Matthias Kloseb9621712010-04-24 17:59:49 +00007020$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021
7022fi
7023
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02007024ac_save_cppflags="$CPPFLAGS"
7025CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04007026for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007027fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007028ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007029sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007030unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007031poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007032sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007033sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007034sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007035sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007036sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007037libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007038bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7039sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007040do :
7041 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7042ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007043if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007044 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007045#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007046_ACEOF
7047
7048fi
7049
Guido van Rossum627b2d71993-12-24 10:39:16 +00007050done
7051
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02007052CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007054for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7057$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007058if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007059 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007060else
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007062/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007063#include <sys/types.h>
7064#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007065
Martin v. Löwis11437992002-04-12 09:54:03 +00007066int
7067main ()
7068{
7069if ((DIR *) 0)
7070return 0;
7071 ;
7072 return 0;
7073}
7074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007077else
Matthias Kloseb9621712010-04-24 17:59:49 +00007078 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007082eval ac_res=\$$as_ac_Header
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7084$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007085if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007086 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007087#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007088_ACEOF
7089
7090ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007091fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007092
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007093done
7094# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7095if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7097$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007098if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007099 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100else
Martin v. Löwis11437992002-04-12 09:54:03 +00007101 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105/* Override any GCC internal prototype to avoid an error.
7106 Use char because int might match the return type of a GCC
7107 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007108#ifdef __cplusplus
7109extern "C"
7110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007111char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007112int
7113main ()
7114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007116 ;
7117 return 0;
7118}
7119_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007120for ac_lib in '' dir; do
7121 if test -z "$ac_lib"; then
7122 ac_res="none required"
7123 else
7124 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007125 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007126 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007128 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007130rm -f core conftest.err conftest.$ac_objext \
7131 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007132 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007133 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007135done
Victor Stinnere0be4232011-10-25 13:06:09 +02007136if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007138else
7139 ac_cv_search_opendir=no
7140fi
7141rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007142LIBS=$ac_func_search_save_LIBS
7143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7145$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007147if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007148 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007151
Michael W. Hudson54241132001-12-07 15:38:26 +00007152else
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7154$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007155if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007157else
7158 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007162/* Override any GCC internal prototype to avoid an error.
7163 Use char because int might match the return type of a GCC
7164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007165#ifdef __cplusplus
7166extern "C"
7167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007168char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007169int
7170main ()
7171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007172return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007173 ;
7174 return 0;
7175}
7176_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007177for ac_lib in '' x; do
7178 if test -z "$ac_lib"; then
7179 ac_res="none required"
7180 else
7181 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007182 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007183 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007185 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007187rm -f core conftest.err conftest.$ac_objext \
7188 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007189 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007190 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192done
Victor Stinnere0be4232011-10-25 13:06:09 +02007193if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007195else
7196 ac_cv_search_opendir=no
7197fi
7198rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007199LIBS=$ac_func_search_save_LIBS
7200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7202$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007203ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007204if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007205 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007207fi
7208
7209fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007210
Matthias Kloseb9621712010-04-24 17:59:49 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7212$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007213if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007217/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007218#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007219int
7220main ()
7221{
7222return makedev(0, 0);
7223 ;
7224 return 0;
7225}
7226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007228 ac_cv_header_sys_types_h_makedev=yes
7229else
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007232rm -f core conftest.err conftest.$ac_objext \
7233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007234
7235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7237$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007238
7239if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007240ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007241if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007242
Matthias Kloseb9621712010-04-24 17:59:49 +00007243$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007244
7245fi
7246
7247
7248
7249 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007251if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007254
7255fi
7256
7257
7258 fi
7259fi
7260
Michael W. Hudson54241132001-12-07 15:38:26 +00007261
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007262# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7263for ac_header in net/if.h
7264do :
7265 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7266#ifdef STDC_HEADERS
7267# include <stdlib.h>
7268# include <stddef.h>
7269#else
7270# ifdef HAVE_STDLIB_H
7271# include <stdlib.h>
7272# endif
7273#endif
7274#ifdef HAVE_SYS_SOCKET_H
7275# include <sys/socket.h>
7276#endif
7277
7278"
Victor Stinnere0be4232011-10-25 13:06:09 +02007279if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007280 cat >>confdefs.h <<_ACEOF
7281#define HAVE_NET_IF_H 1
7282_ACEOF
7283
7284fi
7285
7286done
7287
7288
7289
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007290# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007291for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007292do :
7293 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007294#ifdef HAVE_CURSES_H
7295#include <curses.h>
7296#endif
7297
Matthias Kloseb9621712010-04-24 17:59:49 +00007298"
Victor Stinnere0be4232011-10-25 13:06:09 +02007299if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007300 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007301#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007302_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007303
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007304fi
7305
7306done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007307
7308
Martin v. Löwis11017b12006-01-14 18:12:57 +00007309# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007310for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007311do :
7312 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 +00007313#ifdef HAVE_ASM_TYPES_H
7314#include <asm/types.h>
7315#endif
7316#ifdef HAVE_SYS_SOCKET_H
7317#include <sys/socket.h>
7318#endif
7319
Matthias Kloseb9621712010-04-24 17:59:49 +00007320"
Victor Stinnere0be4232011-10-25 13:06:09 +02007321if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007322 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007323#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007324_ACEOF
7325
7326fi
7327
7328done
7329
7330
Charles-François Natali47413c12011-10-06 19:47:44 +02007331# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007332for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007333do :
7334 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7335ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7336#ifdef HAVE_SYS_SOCKET_H
7337#include <sys/socket.h>
7338#endif
7339
7340"
7341if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7342 cat >>confdefs.h <<_ACEOF
7343#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7344_ACEOF
7345
7346fi
7347
7348done
7349
7350
Guido van Rossum627b2d71993-12-24 10:39:16 +00007351# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007352was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7354$as_echo_n "checking for clock_t in time.h... " >&6; }
7355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007356/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007357#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007358
7359_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007362 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007363else
Martin v. Löwis11437992002-04-12 09:54:03 +00007364
7365
Matthias Kloseb9621712010-04-24 17:59:49 +00007366$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007367
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007368
Guido van Rossum627b2d71993-12-24 10:39:16 +00007369fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007370rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007371
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7373$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007374
Matthias Kloseb9621712010-04-24 17:59:49 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7376$as_echo_n "checking for makedev... " >&6; }
7377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007378/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007379
Jesus Cea740f53a2010-04-28 11:35:30 +00007380#if defined(MAJOR_IN_MKDEV)
7381#include <sys/mkdev.h>
7382#elif defined(MAJOR_IN_SYSMACROS)
7383#include <sys/sysmacros.h>
7384#else
7385#include <sys/types.h>
7386#endif
7387
Neal Norwitz11690112002-07-30 01:08:28 +00007388int
7389main ()
7390{
Jesus Cea740f53a2010-04-28 11:35:30 +00007391
7392 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007393 ;
7394 return 0;
7395}
Matthias Kloseb159a552010-04-25 21:00:44 +00007396
Neal Norwitz11690112002-07-30 01:08:28 +00007397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007398if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007399 ac_cv_has_makedev=yes
7400else
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007403rm -f core conftest.err conftest.$ac_objext \
7404 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7406$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007407if test "$ac_cv_has_makedev" = "yes"; then
7408
Matthias Kloseb9621712010-04-24 17:59:49 +00007409$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007410
7411fi
7412
Christian Heimes985ecdc2013-11-20 11:46:18 +01007413# byte swapping
7414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7415$as_echo_n "checking for le64toh... " >&6; }
7416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417/* end confdefs.h. */
7418
7419#ifdef HAVE_ENDIAN_H
7420#include <endian.h>
7421#elif defined(HAVE_SYS_ENDIAN_H)
7422#include <sys/endian.h>
7423#endif
7424
7425int
7426main ()
7427{
7428
7429 le64toh(1)
7430 ;
7431 return 0;
7432}
7433
7434_ACEOF
7435if ac_fn_c_try_link "$LINENO"; then :
7436 ac_cv_has_le64toh=yes
7437else
7438 ac_cv_has_le64toh=no
7439fi
7440rm -f core conftest.err conftest.$ac_objext \
7441 conftest$ac_exeext conftest.$ac_ext
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7443$as_echo "$ac_cv_has_le64toh" >&6; }
7444if test "$ac_cv_has_le64toh" = "yes"; then
7445
7446$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7447
7448fi
7449
Martin v. Löwis399a6892002-10-04 10:22:02 +00007450# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7451# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7452# defined, but the compiler does not support pragma redefine_extname,
7453# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7454# structures (such as rlimit64) without declaring them. As a
7455# work-around, disable LFS on such configurations
7456
7457use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7459$as_echo_n "checking Solaris LFS bug... " >&6; }
7460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007461/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007462
7463#define _LARGEFILE_SOURCE 1
7464#define _FILE_OFFSET_BITS 64
7465#include <sys/resource.h>
7466
Martin v. Löwis399a6892002-10-04 10:22:02 +00007467int
7468main ()
7469{
7470struct rlimit foo;
7471 ;
7472 return 0;
7473}
7474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007476 sol_lfs_bug=no
7477else
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7482$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007483if test "$sol_lfs_bug" = "yes"; then
7484 use_lfs=no
7485fi
7486
7487if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007488# Two defines needed to enable largefile support on various platforms
7489# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007490case $ac_sys_system/$ac_sys_release in
7491AIX*)
7492
7493$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7494
7495 ;;
7496esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007497
Matthias Kloseb9621712010-04-24 17:59:49 +00007498$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
7500
Matthias Kloseb9621712010-04-24 17:59:49 +00007501$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007502
Martin v. Löwis399a6892002-10-04 10:22:02 +00007503fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007504
Guido van Rossum84e7b241996-08-19 21:59:00 +00007505# Add some code to confdefs.h so that the test for off_t works on SCO
7506cat >> confdefs.h <<\EOF
7507#if defined(SCO_DS)
7508#undef _OFF_T
7509#endif
7510EOF
7511
Guido van Rossumef2255b2000-03-10 22:30:29 +00007512# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007513ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007514if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007515
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007516else
Martin v. Löwis11437992002-04-12 09:54:03 +00007517
7518cat >>confdefs.h <<_ACEOF
7519#define mode_t int
7520_ACEOF
7521
7522fi
7523
Matthias Kloseb9621712010-04-24 17:59:49 +00007524ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007525if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007526
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007527else
Martin v. Löwis11437992002-04-12 09:54:03 +00007528
7529cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007531_ACEOF
7532
7533fi
7534
Matthias Kloseb9621712010-04-24 17:59:49 +00007535ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007536if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007537
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007538else
Martin v. Löwis11437992002-04-12 09:54:03 +00007539
7540cat >>confdefs.h <<_ACEOF
7541#define pid_t int
7542_ACEOF
7543
7544fi
7545
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007546
Martin v. Löwis11437992002-04-12 09:54:03 +00007547cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007548#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007550
Matthias Kloseb9621712010-04-24 17:59:49 +00007551ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007552if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007553
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007554else
Martin v. Löwis11437992002-04-12 09:54:03 +00007555
7556cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007557#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007558_ACEOF
7559
7560fi
7561
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7563$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007564if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007565 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007566else
Matthias Kloseb9621712010-04-24 17:59:49 +00007567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007568/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007569#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007570
7571_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007573 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007574 ac_cv_type_uid_t=yes
7575else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007576 ac_cv_type_uid_t=no
7577fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007578rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007579
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7582$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007583if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007584
Matthias Kloseb9621712010-04-24 17:59:49 +00007585$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007586
7587
Matthias Kloseb9621712010-04-24 17:59:49 +00007588$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007589
7590fi
7591
Mark Dickinson983bc162012-12-02 12:11:38 +00007592
7593# There are two separate checks for each of the exact-width integer types we
7594# need. First we check whether the type is available using the usual
7595# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7596# and <stdint.h> where available). We then also use the special type checks of
7597# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7598# directly, #define's uint32_t to be a suitable type.
7599
7600ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7601if test "x$ac_cv_type_uint32_t" = xyes; then :
7602
7603$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7604
7605fi
7606
Matthias Kloseb9621712010-04-24 17:59:49 +00007607ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7608case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007609 no|yes) ;; #(
7610 *)
7611
Matthias Kloseb9621712010-04-24 17:59:49 +00007612$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007613
7614
7615cat >>confdefs.h <<_ACEOF
7616#define uint32_t $ac_cv_c_uint32_t
7617_ACEOF
7618;;
7619 esac
7620
Mark Dickinson983bc162012-12-02 12:11:38 +00007621
7622ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7623if test "x$ac_cv_type_uint64_t" = xyes; then :
7624
7625$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7626
7627fi
7628
Matthias Kloseb9621712010-04-24 17:59:49 +00007629ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7630case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007631 no|yes) ;; #(
7632 *)
7633
Matthias Kloseb9621712010-04-24 17:59:49 +00007634$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007635
7636
7637cat >>confdefs.h <<_ACEOF
7638#define uint64_t $ac_cv_c_uint64_t
7639_ACEOF
7640;;
7641 esac
7642
Mark Dickinson983bc162012-12-02 12:11:38 +00007643
7644ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7645if test "x$ac_cv_type_int32_t" = xyes; then :
7646
7647$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7648
7649fi
7650
Matthias Kloseb9621712010-04-24 17:59:49 +00007651ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7652case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007653 no|yes) ;; #(
7654 *)
7655
7656cat >>confdefs.h <<_ACEOF
7657#define int32_t $ac_cv_c_int32_t
7658_ACEOF
7659;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007660esac
7661
Mark Dickinson983bc162012-12-02 12:11:38 +00007662
7663ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7664if test "x$ac_cv_type_int64_t" = xyes; then :
7665
7666$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7667
7668fi
7669
Matthias Kloseb9621712010-04-24 17:59:49 +00007670ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7671case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007672 no|yes) ;; #(
7673 *)
7674
7675cat >>confdefs.h <<_ACEOF
7676#define int64_t $ac_cv_c_int64_t
7677_ACEOF
7678;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007679esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007680
Mark Dickinson983bc162012-12-02 12:11:38 +00007681
Matthias Kloseb9621712010-04-24 17:59:49 +00007682ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007683if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684
Matthias Kloseb9621712010-04-24 17:59:49 +00007685$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007686
7687fi
7688
Stefan Krah1919b7e2012-03-21 18:25:23 +01007689ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7690if test "x$ac_cv_type___uint128_t" = xyes; then :
7691
7692$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7693
7694fi
7695
Jack Jansendd19cf82001-12-06 22:36:17 +00007696
Michael W. Hudson54241132001-12-07 15:38:26 +00007697# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007698# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699# The cast to long int works around a bug in the HP C Compiler
7700# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7701# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7702# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7704$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007705if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 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 +00007709
Martin v. Löwis11437992002-04-12 09:54:03 +00007710else
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 if test "$ac_cv_type_int" = yes; then
7712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007714as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007715See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716 else
7717 ac_cv_sizeof_int=0
7718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007720
Martin v. Löwis11437992002-04-12 09:54:03 +00007721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7723$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007724
7725
7726
Martin v. Löwis11437992002-04-12 09:54:03 +00007727cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007728#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007729_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007730
7731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732# The cast to long int works around a bug in the HP C Compiler
7733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7737$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007738if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007740else
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 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 +00007742
Martin v. Löwis11437992002-04-12 09:54:03 +00007743else
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 if test "$ac_cv_type_long" = yes; then
7745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007747as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749 else
7750 ac_cv_sizeof_long=0
7751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007753
Martin v. Löwis11437992002-04-12 09:54:03 +00007754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7756$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757
7758
7759
Martin v. Löwis11437992002-04-12 09:54:03 +00007760cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007761#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007762_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007763
7764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765# The cast to long int works around a bug in the HP C Compiler
7766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7768# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7770$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007771if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007773else
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 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 +00007775
Martin v. Löwis11437992002-04-12 09:54:03 +00007776else
Matthias Kloseb9621712010-04-24 17:59:49 +00007777 if test "$ac_cv_type_void_p" = yes; then
7778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007780as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007781See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782 else
7783 ac_cv_sizeof_void_p=0
7784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007786
Martin v. Löwis11437992002-04-12 09:54:03 +00007787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7789$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790
7791
7792
Martin v. Löwis11437992002-04-12 09:54:03 +00007793cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007794#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007795_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007796
7797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798# The cast to long int works around a bug in the HP C Compiler
7799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7803$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007804if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007806else
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 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 +00007808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809else
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 if test "$ac_cv_type_short" = yes; then
7811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007813as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007814See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 else
7816 ac_cv_sizeof_short=0
7817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819
Martin v. Löwis11437992002-04-12 09:54:03 +00007820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7822$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823
7824
7825
Martin v. Löwis11437992002-04-12 09:54:03 +00007826cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007827#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007828_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007829
7830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831# The cast to long int works around a bug in the HP C Compiler
7832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7834# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7836$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007837if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 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 +00007841
Martin v. Löwis11437992002-04-12 09:54:03 +00007842else
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 if test "$ac_cv_type_float" = yes; then
7844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007846as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007847See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848 else
7849 ac_cv_sizeof_float=0
7850 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007852
Martin v. Löwis11437992002-04-12 09:54:03 +00007853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7855$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856
7857
7858
Martin v. Löwis11437992002-04-12 09:54:03 +00007859cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007860#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007861_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007862
7863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864# The cast to long int works around a bug in the HP C Compiler
7865# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7866# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7867# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7869$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007870if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007871 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007872else
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 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 +00007874
Martin v. Löwis11437992002-04-12 09:54:03 +00007875else
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 if test "$ac_cv_type_double" = yes; then
7877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007879as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007880See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 else
7882 ac_cv_sizeof_double=0
7883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007885
Martin v. Löwis11437992002-04-12 09:54:03 +00007886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7888$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889
7890
7891
Martin v. Löwis11437992002-04-12 09:54:03 +00007892cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007893#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007894_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007895
7896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897# The cast to long int works around a bug in the HP C Compiler
7898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7900# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7902$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007903if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007905else
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 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 +00007907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908else
Matthias Kloseb9621712010-04-24 17:59:49 +00007909 if test "$ac_cv_type_fpos_t" = yes; then
7910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007912as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007913See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 else
7915 ac_cv_sizeof_fpos_t=0
7916 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007918
Martin v. Löwis11437992002-04-12 09:54:03 +00007919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7921$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922
7923
7924
Martin v. Löwis11437992002-04-12 09:54:03 +00007925cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007926#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007927_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007928
Michael W. Hudson54241132001-12-07 15:38:26 +00007929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930# The cast to long int works around a bug in the HP C Compiler
7931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7935$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007936if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007938else
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 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 +00007940
Martin v. Löwis18e16552006-02-15 17:27:45 +00007941else
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 if test "$ac_cv_type_size_t" = yes; then
7943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007945as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007946See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947 else
7948 ac_cv_sizeof_size_t=0
7949 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951
Martin v. Löwis18e16552006-02-15 17:27:45 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7954$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955
7956
7957
Martin v. Löwis18e16552006-02-15 17:27:45 +00007958cat >>confdefs.h <<_ACEOF
7959#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7960_ACEOF
7961
7962
Christian Heimes400adb02008-02-01 08:12:03 +00007963# The cast to long int works around a bug in the HP C Compiler
7964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7966# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7968$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007969if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007971else
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 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 +00007973
Christian Heimes400adb02008-02-01 08:12:03 +00007974else
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 if test "$ac_cv_type_pid_t" = yes; then
7976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007978as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007979See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007980 else
7981 ac_cv_sizeof_pid_t=0
7982 fi
7983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984
Christian Heimes400adb02008-02-01 08:12:03 +00007985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7987$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007988
7989
7990
7991cat >>confdefs.h <<_ACEOF
7992#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7993_ACEOF
7994
7995
Michael W. Hudson54241132001-12-07 15:38:26 +00007996
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7998$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007999have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008001/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008002
Martin v. Löwis11437992002-04-12 09:54:03 +00008003int
8004main ()
8005{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008006long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ;
8008 return 0;
8009}
8010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008011if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008012
8013
Matthias Kloseb9621712010-04-24 17:59:49 +00008014$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008015
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008016 have_long_long=yes
8017
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8021$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008022if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023# The cast to long int works around a bug in the HP C Compiler
8024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8025# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8026# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8028$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008029if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008030 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 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 +00008033
Martin v. Löwis11437992002-04-12 09:54:03 +00008034else
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 if test "$ac_cv_type_long_long" = yes; then
8036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008038as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008039See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 else
8041 ac_cv_sizeof_long_long=0
8042 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008044
Martin v. Löwis11437992002-04-12 09:54:03 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8047$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048
8049
8050
Martin v. Löwis11437992002-04-12 09:54:03 +00008051cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008052#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008053_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008054
Michael W. Hudson54241132001-12-07 15:38:26 +00008055
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008056fi
8057
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8059$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008060have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008062/* end confdefs.h. */
8063
8064int
8065main ()
8066{
8067long double x; x = (long double)0;
8068 ;
8069 return 0;
8070}
8071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008072if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008073
8074
Matthias Kloseb9621712010-04-24 17:59:49 +00008075$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008076
8077 have_long_double=yes
8078
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008079fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8082$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008083if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008084# The cast to long int works around a bug in the HP C Compiler
8085# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8086# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8087# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8089$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008090if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008092else
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 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 +00008094
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008095else
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 if test "$ac_cv_type_long_double" = yes; then
8097 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008099as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008100See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008101 else
8102 ac_cv_sizeof_long_double=0
8103 fi
8104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8108$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008109
8110
8111
8112cat >>confdefs.h <<_ACEOF
8113#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8114_ACEOF
8115
8116
8117fi
8118
8119
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8121$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008122have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008124/* end confdefs.h. */
8125
8126int
8127main ()
8128{
8129_Bool x; x = (_Bool)0;
8130 ;
8131 return 0;
8132}
8133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008134if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008135
8136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008138
8139 have_c99_bool=yes
8140
Thomas Woutersb2137042007-02-01 18:02:27 +00008141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8144$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008145if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146# The cast to long int works around a bug in the HP C Compiler
8147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8149# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8151$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008152if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008154else
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 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 +00008156
Thomas Woutersb2137042007-02-01 18:02:27 +00008157else
Matthias Kloseb9621712010-04-24 17:59:49 +00008158 if test "$ac_cv_type__Bool" = yes; then
8159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008161as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008162See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163 else
8164 ac_cv_sizeof__Bool=0
8165 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008167
Thomas Woutersb2137042007-02-01 18:02:27 +00008168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8170$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171
8172
8173
Thomas Woutersb2137042007-02-01 18:02:27 +00008174cat >>confdefs.h <<_ACEOF
8175#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8176_ACEOF
8177
8178
8179fi
8180
Matthias Kloseb9621712010-04-24 17:59:49 +00008181ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008182 #include <stdint.h>
8183 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008184 #ifdef HAVE_INTTYPES_H
8185 #include <inttypes.h>
8186 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008187"
Victor Stinnere0be4232011-10-25 13:06:09 +02008188if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008189
8190cat >>confdefs.h <<_ACEOF
8191#define HAVE_UINTPTR_T 1
8192_ACEOF
8193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194# The cast to long int works around a bug in the HP C Compiler
8195# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8196# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8197# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8199$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008200if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008202else
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 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 +00008204
Martin v. Löwis11437992002-04-12 09:54:03 +00008205else
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 if test "$ac_cv_type_uintptr_t" = yes; then
8207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008209as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008210See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211 else
8212 ac_cv_sizeof_uintptr_t=0
8213 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008215
Martin v. Löwis11437992002-04-12 09:54:03 +00008216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8218$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219
8220
8221
Martin v. Löwis11437992002-04-12 09:54:03 +00008222cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008223#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008224_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008225
Michael W. Hudson54241132001-12-07 15:38:26 +00008226
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008227fi
8228
Thomas Wouters89f507f2006-12-13 04:49:30 +00008229
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008230# The cast to long int works around a bug in the HP C Compiler
8231# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8232# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8233# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8235$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008236if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008240#ifdef HAVE_SYS_TYPES_H
8241#include <sys/types.h>
8242#endif
8243
Matthias Kloseb9621712010-04-24 17:59:49 +00008244"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008245
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 if test "$ac_cv_type_off_t" = yes; then
8248 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008250as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008251See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008252 else
8253 ac_cv_sizeof_off_t=0
8254 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008256
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8259$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008260
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008261
8262
Martin v. Löwis11437992002-04-12 09:54:03 +00008263cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008264#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008265_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008266
Michael W. Hudson54241132001-12-07 15:38:26 +00008267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008268
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8270$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008271if test "$have_long_long" = yes
8272then
8273if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008274 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008275
Matthias Kloseb9621712010-04-24 17:59:49 +00008276$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8279$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008280else
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8282$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008283fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8286$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008287fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008288
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008289# The cast to long int works around a bug in the HP C Compiler
8290# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8291# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8292# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8294$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008295if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008297else
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008299#ifdef HAVE_SYS_TYPES_H
8300#include <sys/types.h>
8301#endif
8302#ifdef HAVE_TIME_H
8303#include <time.h>
8304#endif
8305
Matthias Kloseb9621712010-04-24 17:59:49 +00008306"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008307
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008308else
Matthias Kloseb9621712010-04-24 17:59:49 +00008309 if test "$ac_cv_type_time_t" = yes; then
8310 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008312as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008313See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008314 else
8315 ac_cv_sizeof_time_t=0
8316 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008318
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8321$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008322
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008323
8324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008326#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008327_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008328
Michael W. Hudson54241132001-12-07 15:38:26 +00008329
8330
Trent Mick635f6fb2000-08-23 21:33:05 +00008331# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008332ac_save_cc="$CC"
8333if test "$ac_cv_kpthread" = "yes"
8334then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008335elif test "$ac_cv_kthread" = "yes"
8336then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008337elif test "$ac_cv_pthread" = "yes"
8338then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008339fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008340
Matthias Kloseb9621712010-04-24 17:59:49 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8342$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008343have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008345/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008346
8347 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008348int
8349main ()
8350{
Guido van Rossum12580492000-09-24 16:47:19 +00008351pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 ;
8353 return 0;
8354}
Matthias Kloseb159a552010-04-25 21:00:44 +00008355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008357if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008358 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8362$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008363if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008365# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8366# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8367# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8369$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008370if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008374#ifdef HAVE_PTHREAD_H
8375#include <pthread.h>
8376#endif
8377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008379
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008380else
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 if test "$ac_cv_type_pthread_t" = yes; then
8382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008384as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008385See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008386 else
8387 ac_cv_sizeof_pthread_t=0
8388 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008390
Trent Mick635f6fb2000-08-23 21:33:05 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8393$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008394
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008395
8396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008398#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008399_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008400
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008401
Trent Mick635f6fb2000-08-23 21:33:05 +00008402fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008403CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008404
Michael W. Hudson54241132001-12-07 15:38:26 +00008405
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008406case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008407 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008408 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8409 ;;
8410 Darwin/*)
8411 OTHER_LIBTOOL_OPT=""
8412 ;;
8413esac
8414
8415
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008416
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008417case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008418 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008419 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8420 if test "${enable_universalsdk}"; then
8421 :
8422 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008423 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008424 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008425 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008426 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008427 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008428 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008429 if test ${gcc_version} '<' 4.0
8430 then
8431 LIBTOOL_CRUFT="-lcc_dynamic"
8432 else
8433 LIBTOOL_CRUFT=""
8434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008436 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008437else
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008439/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008440
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008441 #include <unistd.h>
8442 int main(int argc, char*argv[])
8443 {
8444 if (sizeof(long) == 4) {
8445 return 0;
8446 } else {
8447 return 1;
8448 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008449 }
8450
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008452if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008453 ac_osx_32bit=yes
8454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8458 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008459fi
8460
8461
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008462 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008463 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008464 i386)
8465 MACOSX_DEFAULT_ARCH="i386"
8466 ;;
8467 ppc)
8468 MACOSX_DEFAULT_ARCH="ppc"
8469 ;;
8470 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008471 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008472 ;;
8473 esac
8474 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008475 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008476 i386)
8477 MACOSX_DEFAULT_ARCH="x86_64"
8478 ;;
8479 ppc)
8480 MACOSX_DEFAULT_ARCH="ppc64"
8481 ;;
8482 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008483 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008484 ;;
8485 esac
8486
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008487 fi
8488
8489 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008490 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008491 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008492esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8494$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008495if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008496then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008497 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008499 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8504$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008505 if test $enable_shared = "yes"
8506 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008507 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 +00008508 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8511$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008512fi
8513
Matthias Kloseb9621712010-04-24 17:59:49 +00008514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8515$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008516case $ac_sys_system/$ac_sys_release in
8517 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8522$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008523 ;;
8524 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8526$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008527 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008528esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008529
Guido van Rossum0a516c91994-09-12 10:58:40 +00008530# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008531
Michael W. Hudson54241132001-12-07 15:38:26 +00008532
8533
8534
8535
Benjamin Peterson99f03762010-04-11 22:15:28 +00008536
Thomas Wouters477c8d52006-05-27 19:21:47 +00008537
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008538# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8539# -- usually .so, .sl on HP-UX, .dll on Cygwin
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8541$as_echo_n "checking the extension of shared libraries... " >&6; }
8542if test -z "$SHLIB_SUFFIX"; then
8543 case $ac_sys_system in
8544 hp*|HP*)
8545 case `uname -m` in
8546 ia64) SHLIB_SUFFIX=.so;;
8547 *) SHLIB_SUFFIX=.sl;;
8548 esac
8549 ;;
8550 CYGWIN*) SHLIB_SUFFIX=.dll;;
8551 *) SHLIB_SUFFIX=.so;;
8552 esac
8553fi
8554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8555$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008556
Guido van Rossum0a516c91994-09-12 10:58:40 +00008557# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008558# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008559# (Shared libraries in this instance are shared modules to be loaded into
8560# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8562$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008563if test -z "$LDSHARED"
8564then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008565 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008566 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008567 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008568 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008569 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008570 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008571 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008573 if test "$GCC" = "yes" ; then
8574 LDSHARED='$(CC) -shared'
8575 LDCXXSHARED='$(CXX) -shared'
8576 else
8577 LDSHARED='$(CC) -G'
8578 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008579 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008580 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008581 if test "$GCC" = "yes" ; then
8582 LDSHARED='$(CC) -shared'
8583 LDCXXSHARED='$(CXX) -shared'
8584 else
8585 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008586 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008587 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008588 LDSHARED='$(CC) -bundle'
8589 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008590 if test "$enable_framework" ; then
8591 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008592 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8593 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008594 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008595 else
8596 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008597 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008598 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008599 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008600 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008601 LDSHARED='$(CC) -bundle'
8602 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008603 if test "$enable_framework" ; then
8604 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008605 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8606 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008607 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008608 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008609 # No framework, use the Python app as bundle-loader
8610 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008611 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008612 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008613 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008614 Darwin/*)
8615 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8616 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008617
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008618 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008619 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008620 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8621 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008622 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008623 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008624 LDSHARED='$(CC) -bundle'
8625 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008626 if test "$enable_framework" ; then
8627 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008628 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8629 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008630 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008631 else
8632 # No framework, use the Python app as bundle-loader
8633 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8634 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008635 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008636 fi
8637 fi
8638 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008639 Linux*|GNU*|QNX*)
8640 LDSHARED='$(CC) -shared'
8641 LDCXXSHARED='$(CXX) -shared';;
8642 BSD/OS*/4*)
8643 LDSHARED="gcc -shared"
8644 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008645 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008646 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008647 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008648 LDSHARED='$(CC) -shared'
8649 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008650 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008651 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008652 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008653 OpenBSD*)
8654 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8655 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008656 LDSHARED='$(CC) -shared $(CCSHARED)'
8657 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008658 else
8659 case `uname -r` in
8660 [01].* | 2.[0-7] | 2.[0-7].*)
8661 LDSHARED="ld -Bshareable ${LDFLAGS}"
8662 ;;
8663 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008664 LDSHARED='$(CC) -shared $(CCSHARED)'
8665 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008666 ;;
8667 esac
8668 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008669 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008670 LDSHARED='$(CC) -shared'
8671 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008672 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008673 if test "$GCC" = "yes" ; then
8674 LDSHARED='$(CC) -shared'
8675 LDCXXSHARED='$(CXX) -shared'
8676 else
8677 LDSHARED='$(CC) -G'
8678 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008679 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008680 SCO_SV*)
8681 LDSHARED='$(CC) -Wl,-G,-Bexport'
8682 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8683 CYGWIN*)
8684 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8685 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008686 *) LDSHARED="ld";;
8687 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8690$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008691LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008692BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008693# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008694# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8696$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008697if test -z "$CCSHARED"
8698then
Guido van Rossum07397971997-04-29 21:49:50 +00008699 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008700 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008701 then CCSHARED="-fPIC";
8702 elif test `uname -p` = sparc;
8703 then CCSHARED="-xcode=pic32";
8704 else CCSHARED="-Kpic";
8705 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008706 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008707 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008708 else CCSHARED="+z";
8709 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008710 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008711 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008712 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008713 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008714 if test "$GCC" = "yes"
8715 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008716 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008717 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008718 SCO_SV*)
8719 if test "$GCC" = "yes"
8720 then CCSHARED="-fPIC"
8721 else CCSHARED="-Kpic -belf"
8722 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008723 IRIX*/6*) case $CC in
8724 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008725 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008726 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008727 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8730$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008731# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008732# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8734$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735if test -z "$LINKFORSHARED"
8736then
Guido van Rossum07397971997-04-29 21:49:50 +00008737 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008738 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008739 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008740 LINKFORSHARED="-Wl,-E -Wl,+s";;
8741# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008742 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008743 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008744 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008746 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008747
8748 # Issue #18075: the default maximum stack size (8MBytes) is too
8749 # small for the default recursion limit. Increase the stack size
8750 # to ensure that tests don't crash
8751 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8752
Jack Jansene578a632001-08-15 01:27:14 +00008753 if test "$enable_framework"
8754 then
Jack Jansenda49e192005-01-07 13:08:22 +00008755 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008756 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008757 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008758 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008759 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008760 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008761 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008762 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8763 then
8764 LINKFORSHARED="-Wl,--export-dynamic"
8765 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008766 SunOS/5*) case $CC in
8767 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008768 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008769 then
8770 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008771 fi;;
8772 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008773 CYGWIN*)
8774 if test $enable_shared = "no"
8775 then
8776 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8777 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008778 QNX*)
8779 # -Wl,-E causes the symbols to be added to the dynamic
8780 # symbol table so that they can be found when a module
8781 # is loaded. -N 2048K causes the stack size to be set
8782 # to 2048 kilobytes so that the stack doesn't overflow
8783 # when running test_compile.py.
8784 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8788$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008789
Michael W. Hudson54241132001-12-07 15:38:26 +00008790
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008791
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8793$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008794if test ! "$LIBRARY" = "$LDLIBRARY"
8795then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008796 case $ac_sys_system in
8797 CYGWIN*)
8798 # Cygwin needs CCSHARED when building extension DLLs
8799 # but not when building the interpreter DLL.
8800 CFLAGSFORSHARED='';;
8801 *)
8802 CFLAGSFORSHARED='$(CCSHARED)'
8803 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8806$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008807
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008808# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8809# library (with --enable-shared).
8810# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008811# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8812# if it is not required, since it creates a dependency of the shared library
8813# to LIBS. This, in turn, means that applications linking the shared libpython
8814# don't need to link LIBS explicitly. The default should be only changed
8815# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8818$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008819case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008820 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008821 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008822esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8824$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008825
8826
Guido van Rossum627b2d71993-12-24 10:39:16 +00008827# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8829$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008830if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008831 $as_echo_n "(cached) " >&6
8832else
8833 ac_check_lib_save_LIBS=$LIBS
8834LIBS="-lsendfile $LIBS"
8835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8836/* end confdefs.h. */
8837
8838/* Override any GCC internal prototype to avoid an error.
8839 Use char because int might match the return type of a GCC
8840 builtin and then its argument prototype would still apply. */
8841#ifdef __cplusplus
8842extern "C"
8843#endif
8844char sendfile ();
8845int
8846main ()
8847{
8848return sendfile ();
8849 ;
8850 return 0;
8851}
8852_ACEOF
8853if ac_fn_c_try_link "$LINENO"; then :
8854 ac_cv_lib_sendfile_sendfile=yes
8855else
8856 ac_cv_lib_sendfile_sendfile=no
8857fi
8858rm -f core conftest.err conftest.$ac_objext \
8859 conftest$ac_exeext conftest.$ac_ext
8860LIBS=$ac_check_lib_save_LIBS
8861fi
8862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8863$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008864if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008865 cat >>confdefs.h <<_ACEOF
8866#define HAVE_LIBSENDFILE 1
8867_ACEOF
8868
8869 LIBS="-lsendfile $LIBS"
8870
8871fi
8872
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8874$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008875if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008877else
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008879LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008883/* Override any GCC internal prototype to avoid an error.
8884 Use char because int might match the return type of a GCC
8885 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008886#ifdef __cplusplus
8887extern "C"
8888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008889char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
8892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ;
8895 return 0;
8896}
8897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903rm -f core conftest.err conftest.$ac_objext \
8904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008905LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8908$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008909if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 cat >>confdefs.h <<_ACEOF
8911#define HAVE_LIBDL 1
8912_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008913
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008914 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008915
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008916fi
8917 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8919$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008920if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008922else
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008924LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928/* Override any GCC internal prototype to avoid an error.
8929 Use char because int might match the return type of a GCC
8930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008931#ifdef __cplusplus
8932extern "C"
8933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008934char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008935int
8936main ()
8937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ;
8940 return 0;
8941}
8942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008943if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008945else
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008948rm -f core conftest.err conftest.$ac_objext \
8949 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008950LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8953$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008954if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 cat >>confdefs.h <<_ACEOF
8956#define HAVE_LIBDLD 1
8957_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008958
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008959 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008960
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008961fi
8962 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008963
Georg Brandlb1441c72009-01-03 22:33:39 +00008964# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008965if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8967$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008968if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008970else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008971 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975/* Override any GCC internal prototype to avoid an error.
8976 Use char because int might match the return type of a GCC
8977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008978#ifdef __cplusplus
8979extern "C"
8980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008981char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008982int
8983main ()
8984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 ;
8987 return 0;
8988}
8989_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990for ac_lib in '' pthread rt posix4; do
8991 if test -z "$ac_lib"; then
8992 ac_res="none required"
8993 else
8994 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008995 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000rm -f core conftest.err conftest.$ac_objext \
9001 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009002 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009005done
Victor Stinnere0be4232011-10-25 13:06:09 +02009006if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008else
9009 ac_cv_search_sem_init=no
9010fi
9011rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009012LIBS=$ac_func_search_save_LIBS
9013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9015$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009016ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009017if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009018 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009019
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009020fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009021 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009022 # posix4 on Solaris 2.6
9023 # pthread (first!) on Linux
9024fi
9025
Martin v. Löwis19d17342003-06-14 21:03:05 +00009026# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9028$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009029if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009031else
9032 ac_check_lib_save_LIBS=$LIBS
9033LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009035/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037/* Override any GCC internal prototype to avoid an error.
9038 Use char because int might match the return type of a GCC
9039 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009040#ifdef __cplusplus
9041extern "C"
9042#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009043char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009044int
9045main ()
9046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009048 ;
9049 return 0;
9050}
9051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009053 ac_cv_lib_intl_textdomain=yes
9054else
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009057rm -f core conftest.err conftest.$ac_objext \
9058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009059LIBS=$ac_check_lib_save_LIBS
9060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9062$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009063if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009066
Brett Cannonc6d936e2009-06-07 20:09:53 +00009067 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009068fi
9069
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009070
9071# checks for system dependent C++ extensions support
9072case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9074$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009076/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009077
Georg Brandl59e87bd2011-02-15 19:48:59 +00009078 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009079int
9080main ()
9081{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009082loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 ;
9084 return 0;
9085}
Matthias Kloseb159a552010-04-25 21:00:44 +00009086
Martin v. Löwis11437992002-04-12 09:54:03 +00009087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009088if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009089
Matthias Kloseb159a552010-04-25 21:00:44 +00009090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009092
Matthias Kloseb159a552010-04-25 21:00:44 +00009093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009094$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009095
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009096else
Matthias Kloseb159a552010-04-25 21:00:44 +00009097
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009099$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009100
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009102rm -f core conftest.err conftest.$ac_objext \
9103 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009104 *) ;;
9105esac
9106
Christian Heimes985ecdc2013-11-20 11:46:18 +01009107# check for systems that require aligned memory access
9108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9109$as_echo_n "checking aligned memory access is required... " >&6; }
9110if test "$cross_compiling" = yes; then :
9111 aligned_required=yes
9112else
9113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9114/* end confdefs.h. */
9115
9116int main()
9117{
9118 char s[16];
9119 int i, *p1, *p2;
9120 for (i=0; i < 16; i++)
9121 s[i] = i;
9122 p1 = (int*)(s+1);
9123 p2 = (int*)(s+2);
9124 if (*p1 == *p2)
9125 return 1;
9126 return 0;
9127}
9128
9129_ACEOF
9130if ac_fn_c_try_run "$LINENO"; then :
9131 aligned_required=no
9132else
9133 aligned_required=yes
9134fi
9135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9136 conftest.$ac_objext conftest.beam conftest.$ac_ext
9137fi
9138
9139
9140if test "$aligned_required" = yes ; then
9141
9142$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9143
9144fi
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9146$as_echo "$aligned_required" >&6; }
9147
9148
9149# str, bytes and memoryview hash algorithm
9150
9151
9152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9153$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9154
9155# Check whether --with-hash_algorithm was given.
9156if test "${with_hash_algorithm+set}" = set; then :
9157 withval=$with_hash_algorithm;
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9159$as_echo "$withval" >&6; }
9160case "$withval" in
9161 siphash24)
9162 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9163
9164 ;;
9165 fnv)
9166 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9167
9168 ;;
9169 *)
9170 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9171 ;;
9172esac
9173
9174else
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9176$as_echo "default" >&6; }
9177fi
9178
9179
Guido van Rossum70c7f481998-03-26 18:44:10 +00009180# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9182$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009183if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009185else
Martin v. Löwis11437992002-04-12 09:54:03 +00009186 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009187LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191/* Override any GCC internal prototype to avoid an error.
9192 Use char because int might match the return type of a GCC
9193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009194#ifdef __cplusplus
9195extern "C"
9196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009197char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009198int
9199main ()
9200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 ;
9203 return 0;
9204}
9205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009208else
Matthias Kloseb9621712010-04-24 17:59:49 +00009209 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009211rm -f core conftest.err conftest.$ac_objext \
9212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009213LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9216$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009217if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009218 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009219fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009220 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9222$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009223if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009224 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009225else
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009227LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231/* Override any GCC internal prototype to avoid an error.
9232 Use char because int might match the return type of a GCC
9233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009234#ifdef __cplusplus
9235extern "C"
9236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009237char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009238int
9239main ()
9240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009242 ;
9243 return 0;
9244}
9245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009248else
Matthias Kloseb9621712010-04-24 17:59:49 +00009249 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009251rm -f core conftest.err conftest.$ac_objext \
9252 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009253LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9256$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009257if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009258 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009259fi
9260 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9263$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009266if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009267 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9269$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009270LIBS="$withval $LIBS"
9271
9272else
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275fi
9276
Guido van Rossum7f43da71994-08-01 12:15:30 +00009277
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009278if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009279 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9280set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9282$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009283if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009284 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009285else
9286 case $PKG_CONFIG in
9287 [\\/]* | ?:[\\/]*)
9288 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9289 ;;
9290 *)
9291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9292for as_dir in $PATH
9293do
9294 IFS=$as_save_IFS
9295 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009297 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009298 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009300 break 2
9301 fi
9302done
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009304IFS=$as_save_IFS
9305
9306 ;;
9307esac
9308fi
9309PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9310if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9312$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009313else
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009316fi
9317
9318
9319fi
9320if test -z "$ac_cv_path_PKG_CONFIG"; then
9321 ac_pt_PKG_CONFIG=$PKG_CONFIG
9322 # Extract the first word of "pkg-config", so it can be a program name with args.
9323set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9325$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009326if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009328else
9329 case $ac_pt_PKG_CONFIG in
9330 [\\/]* | ?:[\\/]*)
9331 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9332 ;;
9333 *)
9334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335for as_dir in $PATH
9336do
9337 IFS=$as_save_IFS
9338 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009340 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009341 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009342 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009343 break 2
9344 fi
9345done
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009347IFS=$as_save_IFS
9348
9349 ;;
9350esac
9351fi
9352ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9353if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9355$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009356else
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009359fi
9360
9361 if test "x$ac_pt_PKG_CONFIG" = x; then
9362 PKG_CONFIG=""
9363 else
9364 case $cross_compiling:$ac_tool_warned in
9365yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9367$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009368ac_tool_warned=yes ;;
9369esac
9370 PKG_CONFIG=$ac_pt_PKG_CONFIG
9371 fi
9372else
9373 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9374fi
9375
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009376
9377# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9379$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009380
9381# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009382if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009383 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009384else
9385 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009386fi
9387
9388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9390$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009391
9392# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9394$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009395
9396# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009397if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009398 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009399else
9400 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009401fi
9402
9403
9404if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009405 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9406else
9407 LIBFFI_INCLUDEDIR=""
9408fi
9409
9410
Matthias Kloseb9621712010-04-24 17:59:49 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9412$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009413
Stefan Krah60187b52012-03-23 19:06:27 +01009414# Check for use of the system libmpdec library
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9416$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9417
9418# Check whether --with-system_libmpdec was given.
9419if test "${with_system_libmpdec+set}" = set; then :
9420 withval=$with_system_libmpdec;
9421else
9422 with_system_libmpdec="no"
9423fi
9424
9425
9426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9427$as_echo "$with_system_libmpdec" >&6; }
9428
Benjamin Peterson076ed002010-10-31 17:11:02 +00009429# Check for support for loadable sqlite extensions
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9431$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9432# Check whether --enable-loadable-sqlite-extensions was given.
9433if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9434 enableval=$enable_loadable_sqlite_extensions;
9435else
9436 enable_loadable_sqlite_extensions="no"
9437fi
9438
9439
9440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9441$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9442
Ned Deilyd819b932013-09-06 01:07:05 -07009443# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9444
9445
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9447$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9448
9449# Check whether --with-tcltk-includes was given.
9450if test "${with_tcltk_includes+set}" = set; then :
9451 withval=$with_tcltk_includes;
9452else
9453 with_tcltk_includes="default"
9454fi
9455
9456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9457$as_echo "$with_tcltk_includes" >&6; }
9458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9459$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9460
9461# Check whether --with-tcltk-libs was given.
9462if test "${with_tcltk_libs+set}" = set; then :
9463 withval=$with_tcltk_libs;
9464else
9465 with_tcltk_libs="default"
9466fi
9467
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9469$as_echo "$with_tcltk_libs" >&6; }
9470if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9471then
9472 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9473 then
9474 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9475 fi
9476 TCLTK_INCLUDES=""
9477 TCLTK_LIBS=""
9478else
9479 TCLTK_INCLUDES="$with_tcltk_includes"
9480 TCLTK_LIBS="$with_tcltk_libs"
9481fi
9482
Matthias Klose55708cc2009-04-30 08:06:49 +00009483# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9485$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009486
9487# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009489 withval=$with_dbmliborder;
9490if test x$with_dbmliborder = xyes
9491then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009492as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009493else
9494 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9495 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9496 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009497 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009498 fi
9499 done
9500fi
9501fi
9502
Matthias Kloseb9621712010-04-24 17:59:49 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9504$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009505
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009506# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009507
9508
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9510$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009513if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514 withval=$with_signal_module;
9515fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009516
9517
9518if test -z "$with_signal_module"
9519then with_signal_module="yes"
9520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9522$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009523
9524if test "${with_signal_module}" = "yes"; then
9525 USE_SIGNAL_MODULE=""
9526 SIGNAL_OBJS=""
9527else
9528 USE_SIGNAL_MODULE="#"
9529 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9530fi
9531
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009532# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009533
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009534USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536
Martin v. Löwis11437992002-04-12 09:54:03 +00009537
9538# Templates for things AC_DEFINEd more than once.
9539# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009540
9541
Martin v. Löwis11437992002-04-12 09:54:03 +00009542
Matthias Kloseb9621712010-04-24 17:59:49 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9544$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009547if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548 withval=$with_threads;
9549fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009550
9551
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009552# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009554# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009555if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556 withval=$with_thread; with_threads=$with_thread
9557fi
9558
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009559
9560if test -z "$with_threads"
9561then with_threads="yes"
9562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9564$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009565
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009566
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009567if test "$with_threads" = "no"
9568then
9569 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009570elif test "$ac_cv_pthread_is_default" = yes
9571then
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009573
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009574 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009576
9577 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009579elif test "$ac_cv_kpthread" = "yes"
9580then
9581 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009582 if test "$ac_cv_cxx_thread" = "yes"; then
9583 CXX="$CXX -Kpthread"
9584 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009585 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009586
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009587 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009588 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009589elif test "$ac_cv_kthread" = "yes"
9590then
9591 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009592 if test "$ac_cv_cxx_thread" = "yes"; then
9593 CXX="$CXX -Kthread"
9594 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009596
9597 posix_threads=yes
9598 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009599elif test "$ac_cv_pthread" = "yes"
9600then
9601 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009602 if test "$ac_cv_cxx_thread" = "yes"; then
9603 CXX="$CXX -pthread"
9604 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009606
9607 posix_threads=yes
9608 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009609else
9610 if test ! -z "$with_threads" -a -d "$with_threads"
9611 then LDFLAGS="$LDFLAGS -L$with_threads"
9612 fi
9613 if test ! -z "$withval" -a -d "$withval"
9614 then LDFLAGS="$LDFLAGS -L$withval"
9615 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009616
9617 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009618 # define _POSIX_THREADS in unistd.h. Some apparently don't
9619 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9621$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009623/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009624
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009625#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009626#ifdef _POSIX_THREADS
9627yes
9628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009629
9630_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009633 unistd_defines_pthreads=yes
9634else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009635 unistd_defines_pthreads=no
9636fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009637rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009638
Matthias Kloseb9621712010-04-24 17:59:49 +00009639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9640$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009641
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009643
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009644 # Just looking for pthread_create in libpthread is not enough:
9645 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9646 # So we really have to include pthread.h, and then link.
9647 _libs=$LIBS
9648 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9650$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009652/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009653
9654#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009655#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009656
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009657void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009658int
9659main ()
9660{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009661
9662pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 ;
9664 return 0;
9665}
9666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009668
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9670$as_echo "yes" >&6; }
9671 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009672
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009673 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009674 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009677 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009678 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009679if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009681
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009682 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009683 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009684else
Guido van Rossumad678af1998-10-02 14:42:15 +00009685
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9687$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009688if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009690else
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009692LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696/* Override any GCC internal prototype to avoid an error.
9697 Use char because int might match the return type of a GCC
9698 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009699#ifdef __cplusplus
9700extern "C"
9701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009702char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009703int
9704main ()
9705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009713else
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009716rm -f core conftest.err conftest.$ac_objext \
9717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009718LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9721$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009722if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009724
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009725 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009726 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009727 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009728else
Greg Steinadf63d62000-07-05 10:38:09 +00009729
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9731$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009732if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009733 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009734else
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009736LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009740/* Override any GCC internal prototype to avoid an error.
9741 Use char because int might match the return type of a GCC
9742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009743#ifdef __cplusplus
9744extern "C"
9745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009746char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009747int
9748main ()
9749{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 ;
9752 return 0;
9753}
9754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009755if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009757else
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009760rm -f core conftest.err conftest.$ac_objext \
9761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9765$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009766if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009767 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009768
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009769 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009770 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009771 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009772else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009773
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9775$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009776if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009778else
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009780LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784/* Override any GCC internal prototype to avoid an error.
9785 Use char because int might match the return type of a GCC
9786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009787#ifdef __cplusplus
9788extern "C"
9789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009790char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009791int
9792main ()
9793{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ;
9796 return 0;
9797}
9798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009799if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009801else
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009804rm -f core conftest.err conftest.$ac_objext \
9805 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009806LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9809$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009810if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009812
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009813 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009814 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009815 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009816else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009817
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9819$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009820if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009822else
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009824LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828/* Override any GCC internal prototype to avoid an error.
9829 Use char because int might match the return type of a GCC
9830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009831#ifdef __cplusplus
9832extern "C"
9833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009834char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009835int
9836main ()
9837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ;
9840 return 0;
9841}
9842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009845else
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848rm -f core conftest.err conftest.$ac_objext \
9849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009850LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9853$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009854if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009856
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009857 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009858 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009859 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009860else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009861
Martin v. Löwis130fb172001-07-19 11:00:41 +00009862 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009863fi
9864
Guido van Rossum627b2d71993-12-24 10:39:16 +00009865
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009866fi
9867
Guido van Rossum0be3e491997-05-22 20:33:33 +00009868fi
9869
Guido van Rossum49545951997-12-02 19:28:29 +00009870fi
9871
Guido van Rossumb93a8621998-05-07 13:27:32 +00009872fi
9873
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009875rm -f core conftest.err conftest.$ac_objext \
9876 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009877
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9879$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009880if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009882else
Martin v. Löwis11437992002-04-12 09:54:03 +00009883 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009884LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888/* Override any GCC internal prototype to avoid an error.
9889 Use char because int might match the return type of a GCC
9890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009891#ifdef __cplusplus
9892extern "C"
9893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009894char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009895int
9896main ()
9897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 ;
9900 return 0;
9901}
9902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009903if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009904 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009905else
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009908rm -f core conftest.err conftest.$ac_objext \
9909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9913$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009914if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009916
Martin v. Löwis130fb172001-07-19 11:00:41 +00009917 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009918 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009919 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009920fi
9921
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009922
Neal Norwitza978ab02002-11-02 16:58:05 +00009923 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9925$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009926if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009928else
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009930LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934/* Override any GCC internal prototype to avoid an error.
9935 Use char because int might match the return type of a GCC
9936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009937#ifdef __cplusplus
9938extern "C"
9939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009940char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009941int
9942main ()
9943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 ;
9946 return 0;
9947}
9948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009950 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009951else
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009954rm -f core conftest.err conftest.$ac_objext \
9955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009956LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9959$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009960if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009962
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009963 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009964 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009965 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009966fi
9967
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009968 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009969fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009970
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009971if test "$posix_threads" = "yes"; then
9972 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009975
9976 fi
9977
9978 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9979 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009980 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009981$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009982
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009983 ;;
9984 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009985$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009986
9987 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009988 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009989$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009990
9991 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009992 esac
9993
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9995$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009996 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009997 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009998else
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010000 ac_cv_pthread_system_supported=no
10001else
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010003/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010004
10005 #include <stdio.h>
10006 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010007 void *foo(void *parm) {
10008 return NULL;
10009 }
10010 main() {
10011 pthread_attr_t attr;
10012 pthread_t id;
10013 if (pthread_attr_init(&attr)) exit(-1);
10014 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10015 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10016 exit(0);
10017 }
10018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010019if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010020 ac_cv_pthread_system_supported=yes
10021else
Matthias Kloseb9621712010-04-24 17:59:49 +000010022 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010026fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010028
Guido van Rossum627b2d71993-12-24 10:39:16 +000010029fi
10030
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10032$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010033 if test "$ac_cv_pthread_system_supported" = "yes"; then
10034
Matthias Kloseb9621712010-04-24 17:59:49 +000010035$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010036
10037 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010038 for ac_func in pthread_sigmask
10039do :
10040 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010041if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010042 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010043#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010044_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010045 case $ac_sys_system in
10046 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010047
Matthias Kloseb9621712010-04-24 17:59:49 +000010048$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010049
10050 ;;
10051 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010052fi
10053done
10054
Christian Heimesf77b4b22013-08-21 13:26:05 +020010055 for ac_func in pthread_atfork
10056do :
10057 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10058if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10059 cat >>confdefs.h <<_ACEOF
10060#define HAVE_PTHREAD_ATFORK 1
10061_ACEOF
10062
10063fi
10064done
10065
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010066fi
10067
10068
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010069# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010070
Matthias Kloseb9621712010-04-24 17:59:49 +000010071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10072$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010074if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010076 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010079 ipv6=no
10080 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10082$as_echo "yes" >&6; }
10083 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010084
10085 ipv6=yes
10086 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010088else
Martin v. Löwis11437992002-04-12 09:54:03 +000010089
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010091/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010092 /* AF_INET6 available check */
10093#include <sys/types.h>
10094#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010095int
10096main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010097{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010098int domain = AF_INET6;
10099 ;
10100 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101}
Martin v. Löwis11437992002-04-12 09:54:03 +000010102_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010103if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010104
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10106$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010107 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010108
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010109else
Matthias Kloseb159a552010-04-25 21:00:44 +000010110
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10112$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010113 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010114
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010115fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010118if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10120$as_echo_n "checking if RFC2553 API is available... " >&6; }
10121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010122/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010123
10124 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010125#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010126int
10127main ()
10128{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010129struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010130 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 ;
10132 return 0;
10133}
Matthias Kloseb159a552010-04-25 21:00:44 +000010134
Martin v. Löwis11437992002-04-12 09:54:03 +000010135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010136if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010137
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010139$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010140 ipv6=yes
10141
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010142else
Matthias Kloseb159a552010-04-25 21:00:44 +000010143
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010145$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010146 ipv6=no
10147
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010150fi
10151
10152if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010154
10155fi
10156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157fi
10158
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010159
10160ipv6type=unknown
10161ipv6lib=none
10162ipv6trylibc=no
10163
10164if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10166$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010167 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10168 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010169 case $i in
10170 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010172/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010173
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010174#include <netinet/in.h>
10175#ifdef IPV6_INRIA_VERSION
10176yes
10177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010178_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010181 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010182fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010183rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010184
10185 ;;
10186 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010188/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010189
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010190#include <netinet/in.h>
10191#ifdef __KAME__
10192yes
10193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010194_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010197 ipv6type=$i;
10198 ipv6lib=inet6
10199 ipv6libdir=/usr/local/v6/lib
10200 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010201fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010202rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010203
10204 ;;
10205 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010207/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010208
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010209#include <features.h>
10210#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10211yes
10212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010213_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010216 ipv6type=$i;
10217 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010218fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010219rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010220
10221 ;;
10222 linux-inet6)
10223 if test -d /usr/inet6; then
10224 ipv6type=$i
10225 ipv6lib=inet6
10226 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010227 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010228 fi
10229 ;;
10230 solaris)
10231 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010232 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233 ipv6type=$i
10234 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010235 fi
10236 fi
10237 ;;
10238 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010240/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010241
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010242#include <sys/param.h>
10243#ifdef _TOSHIBA_INET6
10244yes
10245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010246_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010249 ipv6type=$i;
10250 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010251 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010252fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010253rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010254
10255 ;;
10256 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010258/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010259
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010260#include </usr/local/v6/include/sys/v6config.h>
10261#ifdef __V6D__
10262yes
10263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010264_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267 ipv6type=$i;
10268 ipv6lib=v6;
10269 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010270 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010271fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010272rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010273
10274 ;;
10275 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010277/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010278
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010279#include <sys/param.h>
10280#ifdef _ZETA_MINAMI_INET6
10281yes
10282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010286 ipv6type=$i;
10287 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010288 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010289fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010290rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010291
10292 ;;
10293 esac
10294 if test "$ipv6type" != "unknown"; then
10295 break
10296 fi
10297 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10299$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010300fi
10301
10302if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10303 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10304 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10305 echo "using lib$ipv6lib"
10306 else
10307 if test $ipv6trylibc = "yes"; then
10308 echo "using libc"
10309 else
10310 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10311 echo "You need to fetch lib$ipv6lib.a from appropriate"
10312 echo 'ipv6 kit and compile beforehand.'
10313 exit 1
10314 fi
10315 fi
10316fi
10317
Matthias Kloseb9621712010-04-24 17:59:49 +000010318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10319$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010321/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010322
10323 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010324int
10325main ()
10326{
10327FSIORefNum fRef = 0
10328 ;
10329 return 0;
10330}
Matthias Kloseb159a552010-04-25 21:00:44 +000010331
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010333if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010334
Matthias Kloseb159a552010-04-25 21:00:44 +000010335
Matthias Kloseb9621712010-04-24 17:59:49 +000010336$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010337
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10339$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010340
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010341else
Matthias Kloseb159a552010-04-25 21:00:44 +000010342
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010345
10346fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10348
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010349# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10351$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010354if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355 withval=$with_doc_strings;
10356fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010357
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010358
10359if test -z "$with_doc_strings"
10360then with_doc_strings="yes"
10361fi
10362if test "$with_doc_strings" != "no"
10363then
10364
Matthias Kloseb9621712010-04-24 17:59:49 +000010365$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010366
10367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10369$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010370
Antoine Pitrou042b1282010-08-13 21:15:58 +000010371# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10373$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010376if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010378if test "$withval" != no
10379then
10380
Matthias Kloseb9621712010-04-24 17:59:49 +000010381$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010382
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10384$as_echo "yes" >&6; }
10385else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10386$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010387fi
10388else
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391fi
10392
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010393
10394# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10396$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010399if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400 withval=$with_pymalloc;
10401fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010402
Neil Schemenauera35c6882001-02-27 04:45:05 +000010403
Neil Schemenauer16c22972002-03-22 15:34:49 +000010404if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010405then
10406 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010407fi
10408if test "$with_pymalloc" != "no"
10409then
Martin v. Löwis11437992002-04-12 09:54:03 +000010410
Matthias Kloseb9621712010-04-24 17:59:49 +000010411$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010412
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010413 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10416$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010417
Benjamin Peterson05159c42009-12-03 03:01:27 +000010418# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10420$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010421
10422# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010424 withval=$with_valgrind;
10425else
10426 with_valgrind=no
10427fi
10428
Matthias Kloseb9621712010-04-24 17:59:49 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10430$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010431if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020010433if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010436
10437else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010438 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010439
10440fi
10441
10442
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010443 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010444fi
10445
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010446# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010447
Guido van Rossum98935bf2001-09-05 19:13:16 +000010448DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010449
Guido van Rossume97ee181999-12-20 21:27:22 +000010450# the dlopen() function means we might want to use dynload_shlib.o. some
10451# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010452for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010453do :
10454 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010455if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010458_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010459
Guido van Rossume97ee181999-12-20 21:27:22 +000010460fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010461done
Guido van Rossume97ee181999-12-20 21:27:22 +000010462
Michael W. Hudson54241132001-12-07 15:38:26 +000010463
Guido van Rossume97ee181999-12-20 21:27:22 +000010464# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10465# loading of modules.
10466
Matthias Kloseb9621712010-04-24 17:59:49 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10468$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010469if test -z "$DYNLOADFILE"
10470then
10471 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010472 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10473 if test "$ac_cv_func_dlopen" = yes
10474 then DYNLOADFILE="dynload_shlib.o"
10475 else DYNLOADFILE="dynload_aix.o"
10476 fi
10477 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010478 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010479 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10480 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010481 *)
10482 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10483 # out any dynamic loading
10484 if test "$ac_cv_func_dlopen" = yes
10485 then DYNLOADFILE="dynload_shlib.o"
10486 else DYNLOADFILE="dynload_stub.o"
10487 fi
10488 ;;
10489 esac
10490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10492$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010493if test "$DYNLOADFILE" != "dynload_stub.o"
10494then
Martin v. Löwis11437992002-04-12 09:54:03 +000010495
Matthias Kloseb9621712010-04-24 17:59:49 +000010496$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010497
10498fi
10499
Neil Schemenauer4e425612001-06-19 15:44:15 +000010500# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10501
Michael W. Hudson54241132001-12-07 15:38:26 +000010502
Matthias Kloseb9621712010-04-24 17:59:49 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10504$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010505if test -z "$MACHDEP_OBJS"
10506then
Jack Jansene578a632001-08-15 01:27:14 +000010507 MACHDEP_OBJS=$extra_machdep_objs
10508else
10509 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010510fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010511if test -z "$MACHDEP_OBJS"; then
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10513$as_echo "none" >&6; }
10514else
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10516$as_echo "$MACHDEP_OBJS" >&6; }
10517fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010518
Guido van Rossum627b2d71993-12-24 10:39:16 +000010519# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010520for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010521 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010522 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010523 futimens futimes gai_strerror \
10524 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010525 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010526 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010527 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10528 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010529 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010530 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010531 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010532 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010533 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010534 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010535 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10536 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010537 sigaction sigaltstack siginterrupt sigpending sigrelse \
10538 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010539 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010540 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010541 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010542do :
10543 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10544ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010545if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010547#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010548_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010549
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010550fi
10551done
10552
Michael W. Hudson54241132001-12-07 15:38:26 +000010553
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010554ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10555 #include <dirent.h>
10556"
10557if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10558
10559$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10560
10561fi
10562
10563
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010564# For some functions, having a definition is not sufficient, since
10565# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10567$as_echo_n "checking for chroot... " >&6; }
10568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010569/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010570#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010571int
10572main ()
10573{
10574void *x=chroot
10575 ;
10576 return 0;
10577}
10578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010580
Matthias Kloseb9621712010-04-24 17:59:49 +000010581$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010582
Matthias Kloseb159a552010-04-25 21:00:44 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010584$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010585else
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010588
10589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10592$as_echo_n "checking for link... " >&6; }
10593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010595#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010596int
10597main ()
10598{
10599void *x=link
10600 ;
10601 return 0;
10602}
10603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010607
Matthias Kloseb159a552010-04-25 21:00:44 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010609$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010610else
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10612$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010613
10614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10617$as_echo_n "checking for symlink... " >&6; }
10618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010620#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010621int
10622main ()
10623{
10624void *x=symlink
10625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010630
Matthias Kloseb9621712010-04-24 17:59:49 +000010631$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010632
Matthias Kloseb159a552010-04-25 21:00:44 +000010633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010635else
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010638
10639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10642$as_echo_n "checking for fchdir... " >&6; }
10643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010645#include <unistd.h>
10646int
10647main ()
10648{
10649void *x=fchdir
10650 ;
10651 return 0;
10652}
10653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010657
Matthias Kloseb159a552010-04-25 21:00:44 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010659$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010663
10664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10667$as_echo_n "checking for fsync... " >&6; }
10668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010669/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010670#include <unistd.h>
10671int
10672main ()
10673{
10674void *x=fsync
10675 ;
10676 return 0;
10677}
10678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010682
Matthias Kloseb159a552010-04-25 21:00:44 +000010683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010684$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010688
10689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10692$as_echo_n "checking for fdatasync... " >&6; }
10693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010695#include <unistd.h>
10696int
10697main ()
10698{
10699void *x=fdatasync
10700 ;
10701 return 0;
10702}
10703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010707
Matthias Kloseb159a552010-04-25 21:00:44 +000010708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010713
10714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10717$as_echo_n "checking for epoll... " >&6; }
10718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010719/* end confdefs.h. */
10720#include <sys/epoll.h>
10721int
10722main ()
10723{
10724void *x=epoll_create
10725 ;
10726 return 0;
10727}
10728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010732
Matthias Kloseb159a552010-04-25 21:00:44 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010734$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010735else
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010738
10739fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10742$as_echo_n "checking for epoll_create1... " >&6; }
10743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10744/* end confdefs.h. */
10745#include <sys/epoll.h>
10746int
10747main ()
10748{
10749void *x=epoll_create1
10750 ;
10751 return 0;
10752}
10753_ACEOF
10754if ac_fn_c_try_compile "$LINENO"; then :
10755
10756$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10757
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10759$as_echo "yes" >&6; }
10760else
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10762$as_echo "no" >&6; }
10763
10764fi
10765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10767$as_echo_n "checking for kqueue... " >&6; }
10768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010769/* end confdefs.h. */
10770
10771#include <sys/types.h>
10772#include <sys/event.h>
10773
10774int
10775main ()
10776{
10777int x=kqueue()
10778 ;
10779 return 0;
10780}
10781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010785
Matthias Kloseb159a552010-04-25 21:00:44 +000010786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010787$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010791
10792fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10795$as_echo_n "checking for prlimit... " >&6; }
10796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10797/* end confdefs.h. */
10798
10799#include <sys/time.h>
10800#include <sys/resource.h>
10801
10802int
10803main ()
10804{
10805void *x=prlimit
10806 ;
10807 return 0;
10808}
10809_ACEOF
10810if ac_fn_c_try_compile "$LINENO"; then :
10811
10812$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10813
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10815$as_echo "yes" >&6; }
10816else
10817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818$as_echo "no" >&6; }
10819
10820fi
10821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10822
Martin v. Löwisd5843682002-11-21 20:41:28 +000010823# On some systems (eg. FreeBSD 5), we would find a definition of the
10824# functions ctermid_r, setgroups in the library, but no prototype
10825# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10826# address to avoid compiler warnings and potential miscompilations
10827# because of the missing prototypes.
10828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10830$as_echo_n "checking for ctermid_r... " >&6; }
10831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010832/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010833
Martin v. Löwisd5843682002-11-21 20:41:28 +000010834#include <stdio.h>
10835
Martin v. Löwisd5843682002-11-21 20:41:28 +000010836int
10837main ()
10838{
10839void* p = ctermid_r
10840 ;
10841 return 0;
10842}
10843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010844if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010847
Matthias Kloseb159a552010-04-25 21:00:44 +000010848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010849$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010850else
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10852$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010853
10854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10856
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10858$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010859if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010860 $as_echo_n "(cached) " >&6
10861else
10862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010863/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010864#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010865int
10866main ()
10867{
10868void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010869
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010870 ;
10871 return 0;
10872}
10873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010874if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010875 ac_cv_flock_decl=yes
10876else
10877 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010878
10879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010881
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010882fi
10883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10884$as_echo "$ac_cv_flock_decl" >&6; }
10885if test "x${ac_cv_flock_decl}" = xyes; then
10886 for ac_func in flock
10887do :
10888 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010889if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010890 cat >>confdefs.h <<_ACEOF
10891#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010892_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010893
Antoine Pitroua3000072010-09-07 14:52:42 +000010894else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010896$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010897if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010898 $as_echo_n "(cached) " >&6
10899else
10900 ac_check_lib_save_LIBS=$LIBS
10901LIBS="-lbsd $LIBS"
10902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10903/* end confdefs.h. */
10904
10905/* Override any GCC internal prototype to avoid an error.
10906 Use char because int might match the return type of a GCC
10907 builtin and then its argument prototype would still apply. */
10908#ifdef __cplusplus
10909extern "C"
10910#endif
10911char flock ();
10912int
10913main ()
10914{
10915return flock ();
10916 ;
10917 return 0;
10918}
10919_ACEOF
10920if ac_fn_c_try_link "$LINENO"; then :
10921 ac_cv_lib_bsd_flock=yes
10922else
10923 ac_cv_lib_bsd_flock=no
10924fi
10925rm -f core conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
10927LIBS=$ac_check_lib_save_LIBS
10928fi
10929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10930$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010931if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010932 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010933
10934
10935$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10936
10937
10938fi
10939
10940
10941fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010942done
10943
Antoine Pitroua3000072010-09-07 14:52:42 +000010944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10947$as_echo_n "checking for getpagesize... " >&6; }
10948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010950
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010951#include <unistd.h>
10952
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010953int
10954main ()
10955{
10956void* p = getpagesize
10957 ;
10958 return 0;
10959}
10960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010961if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010964
Matthias Kloseb159a552010-04-25 21:00:44 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010966$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010967else
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010970
10971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010973
Victor Stinner984890f2011-11-24 13:53:38 +010010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10975$as_echo_n "checking for broken unsetenv... " >&6; }
10976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977/* end confdefs.h. */
10978
10979#include <stdlib.h>
10980
10981int
10982main ()
10983{
10984int res = unsetenv("DUMMY")
10985 ;
10986 return 0;
10987}
10988_ACEOF
10989if ac_fn_c_try_compile "$LINENO"; then :
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10991$as_echo "no" >&6; }
10992else
10993
10994$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10995
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10997$as_echo "yes" >&6; }
10998
10999fi
11000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11001
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011002for ac_prog in true
11003do
11004 # Extract the first word of "$ac_prog", so it can be a program name with args.
11005set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11007$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011008if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011010else
11011 if test -n "$TRUE"; then
11012 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11013else
11014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017 IFS=$as_save_IFS
11018 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011021 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 $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 +000011023 break 2
11024 fi
11025done
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011028
11029fi
11030fi
11031TRUE=$ac_cv_prog_TRUE
11032if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11034$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011035else
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011038fi
11039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011041 test -n "$TRUE" && break
11042done
11043test -n "$TRUE" || TRUE="/bin/true"
11044
11045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11047$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011048if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011050else
11051 ac_check_lib_save_LIBS=$LIBS
11052LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011054/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056/* Override any GCC internal prototype to avoid an error.
11057 Use char because int might match the return type of a GCC
11058 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011059#ifdef __cplusplus
11060extern "C"
11061#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011062char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011063int
11064main ()
11065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011067 ;
11068 return 0;
11069}
11070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011072 ac_cv_lib_c_inet_aton=yes
11073else
Matthias Kloseb9621712010-04-24 17:59:49 +000011074 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011076rm -f core conftest.err conftest.$ac_objext \
11077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011078LIBS=$ac_check_lib_save_LIBS
11079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11081$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011082if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011083 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011084else
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11086$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011087if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011088 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011089else
11090 ac_check_lib_save_LIBS=$LIBS
11091LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011093/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011095/* Override any GCC internal prototype to avoid an error.
11096 Use char because int might match the return type of a GCC
11097 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011098#ifdef __cplusplus
11099extern "C"
11100#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011101char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011102int
11103main ()
11104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011106 ;
11107 return 0;
11108}
11109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011111 ac_cv_lib_resolv_inet_aton=yes
11112else
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011115rm -f core conftest.err conftest.$ac_objext \
11116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011117LIBS=$ac_check_lib_save_LIBS
11118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11120$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011121if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011122 cat >>confdefs.h <<_ACEOF
11123#define HAVE_LIBRESOLV 1
11124_ACEOF
11125
11126 LIBS="-lresolv $LIBS"
11127
11128fi
11129
11130
11131fi
11132
11133
Christian Heimesd0764e22007-12-04 15:00:33 +000011134# On Tru64, chflags seems to be present, but calling it will
11135# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11137$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011138if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011140else
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011142 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011143else
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011145/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011146
Christian Heimesd0764e22007-12-04 15:00:33 +000011147#include <sys/stat.h>
11148#include <unistd.h>
11149int main(int argc, char*argv[])
11150{
11151 if(chflags(argv[0], 0) != 0)
11152 return 1;
11153 return 0;
11154}
Ned Deily3eb67d52011-06-28 00:00:28 -070011155
Christian Heimesd0764e22007-12-04 15:00:33 +000011156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011157if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011158 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011159else
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11163 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011164fi
11165
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11169$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011170if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011171 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011172if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011173 ac_cv_have_chflags="yes"
11174else
11175 ac_cv_have_chflags="no"
11176fi
11177
11178fi
11179if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011180
Matthias Kloseb9621712010-04-24 17:59:49 +000011181$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011182
11183fi
11184
Matthias Kloseb9621712010-04-24 17:59:49 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11186$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011187if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011189else
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011191 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011192else
Matthias Kloseb9621712010-04-24 17:59:49 +000011193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011194/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011195
Christian Heimesd0764e22007-12-04 15:00:33 +000011196#include <sys/stat.h>
11197#include <unistd.h>
11198int main(int argc, char*argv[])
11199{
11200 if(lchflags(argv[0], 0) != 0)
11201 return 1;
11202 return 0;
11203}
Ned Deily3eb67d52011-06-28 00:00:28 -070011204
Christian Heimesd0764e22007-12-04 15:00:33 +000011205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011206if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011207 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011208else
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011213fi
11214
11215
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11218$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011219if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011221if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011222 ac_cv_have_lchflags="yes"
11223else
11224 ac_cv_have_lchflags="no"
11225fi
11226
11227fi
11228if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011231
11232fi
11233
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011234case $ac_sys_system/$ac_sys_release in
11235Darwin/*)
11236 _CUR_CFLAGS="${CFLAGS}"
11237 _CUR_LDFLAGS="${LDFLAGS}"
11238 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11239 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11240 ;;
11241esac
11242
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11244$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011245if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011247else
11248 ac_check_lib_save_LIBS=$LIBS
11249LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011251/* end confdefs.h. */
11252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011253/* Override any GCC internal prototype to avoid an error.
11254 Use char because int might match the return type of a GCC
11255 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011256#ifdef __cplusplus
11257extern "C"
11258#endif
11259char inflateCopy ();
11260int
11261main ()
11262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011264 ;
11265 return 0;
11266}
11267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011268if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011269 ac_cv_lib_z_inflateCopy=yes
11270else
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011273rm -f core conftest.err conftest.$ac_objext \
11274 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011275LIBS=$ac_check_lib_save_LIBS
11276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11278$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011279if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011282
11283fi
11284
11285
11286case $ac_sys_system/$ac_sys_release in
11287Darwin/*)
11288 CFLAGS="${_CUR_CFLAGS}"
11289 LDFLAGS="${_CUR_LDFLAGS}"
11290 ;;
11291esac
11292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11294$as_echo_n "checking for hstrerror... " >&6; }
11295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011297
Martin v. Löwise9416172003-05-03 10:12:45 +000011298#include <netdb.h>
11299
Martin v. Löwise9416172003-05-03 10:12:45 +000011300int
11301main ()
11302{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011303void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011304 ;
11305 return 0;
11306}
11307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011311
Matthias Kloseb159a552010-04-25 21:00:44 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011314else
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011317
11318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011319rm -f core conftest.err conftest.$ac_objext \
11320 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11323$as_echo_n "checking for inet_aton... " >&6; }
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011326
Martin v. Löwis86d66262006-02-17 08:40:11 +000011327#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011328#include <sys/socket.h>
11329#include <netinet/in.h>
11330#include <arpa/inet.h>
11331
Martin v. Löwise9416172003-05-03 10:12:45 +000011332int
11333main ()
11334{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011335void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011336 ;
11337 return 0;
11338}
11339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011340if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011341
Matthias Kloseb9621712010-04-24 17:59:49 +000011342$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011343
Matthias Kloseb159a552010-04-25 21:00:44 +000011344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011346else
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11348$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011349
11350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011351rm -f core conftest.err conftest.$ac_objext \
11352 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11355$as_echo_n "checking for inet_pton... " >&6; }
11356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011357/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011358
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011359#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011360#include <sys/socket.h>
11361#include <netinet/in.h>
11362#include <arpa/inet.h>
11363
Martin v. Löwise9416172003-05-03 10:12:45 +000011364int
11365main ()
11366{
11367void* p = inet_pton
11368 ;
11369 return 0;
11370}
11371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011375
Matthias Kloseb159a552010-04-25 21:00:44 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011377$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011378else
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011381
11382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011384
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011385# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11387$as_echo_n "checking for setgroups... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011391#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011392#ifdef HAVE_GRP_H
11393#include <grp.h>
11394#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011395
Martin v. Löwisd5843682002-11-21 20:41:28 +000011396int
11397main ()
11398{
11399void* p = setgroups
11400 ;
11401 return 0;
11402}
11403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011405
Matthias Kloseb9621712010-04-24 17:59:49 +000011406$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011407
Matthias Kloseb159a552010-04-25 21:00:44 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011409$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011410else
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011413
11414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011416
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011417# check for openpty and forkpty
11418
11419for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011420do :
11421 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011422if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011425_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011426
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011427else
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11429$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011430if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011432else
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011434LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438/* Override any GCC internal prototype to avoid an error.
11439 Use char because int might match the return type of a GCC
11440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011441#ifdef __cplusplus
11442extern "C"
11443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011444char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011445int
11446main ()
11447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011455else
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011458rm -f core conftest.err conftest.$ac_objext \
11459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011460LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11463$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011464if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011466 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011467else
Matthias Kloseb9621712010-04-24 17:59:49 +000011468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11469$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011470if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011472else
11473 ac_check_lib_save_LIBS=$LIBS
11474LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011476/* end confdefs.h. */
11477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478/* Override any GCC internal prototype to avoid an error.
11479 Use char because int might match the return type of a GCC
11480 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011481#ifdef __cplusplus
11482extern "C"
11483#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011484char openpty ();
11485int
11486main ()
11487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011489 ;
11490 return 0;
11491}
11492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011493if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011494 ac_cv_lib_bsd_openpty=yes
11495else
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011498rm -f core conftest.err conftest.$ac_objext \
11499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011500LIBS=$ac_check_lib_save_LIBS
11501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11503$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011504if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011506 LIBS="$LIBS -lbsd"
11507fi
11508
11509
11510fi
11511
Fred Drake8cef4cf2000-06-28 16:40:38 +000011512
11513fi
11514done
11515
11516for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011517do :
11518 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011519if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011522_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011523
Fred Drake8cef4cf2000-06-28 16:40:38 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11526$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011527if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011529else
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011531LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535/* Override any GCC internal prototype to avoid an error.
11536 Use char because int might match the return type of a GCC
11537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011538#ifdef __cplusplus
11539extern "C"
11540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011541char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011542int
11543main ()
11544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 ;
11547 return 0;
11548}
11549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011550if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011552else
Matthias Kloseb9621712010-04-24 17:59:49 +000011553 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011555rm -f core conftest.err conftest.$ac_objext \
11556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011557LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11560$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011561if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011563 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011564else
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11566$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011567if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011569else
11570 ac_check_lib_save_LIBS=$LIBS
11571LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011573/* end confdefs.h. */
11574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575/* Override any GCC internal prototype to avoid an error.
11576 Use char because int might match the return type of a GCC
11577 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011578#ifdef __cplusplus
11579extern "C"
11580#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011581char forkpty ();
11582int
11583main ()
11584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011586 ;
11587 return 0;
11588}
11589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011590if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011591 ac_cv_lib_bsd_forkpty=yes
11592else
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011595rm -f core conftest.err conftest.$ac_objext \
11596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011597LIBS=$ac_check_lib_save_LIBS
11598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11600$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011601if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011603 LIBS="$LIBS -lbsd"
11604fi
11605
11606
11607fi
11608
Fred Drake8cef4cf2000-06-28 16:40:38 +000011609
11610fi
11611done
11612
Jack Jansendd19cf82001-12-06 22:36:17 +000011613
Christian Heimesb186d002008-03-18 15:15:01 +000011614# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011615for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011616do :
11617 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011618if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011619 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011620#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011621_ACEOF
11622
11623fi
11624done
11625
11626
Michael W. Hudson54241132001-12-07 15:38:26 +000011627# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011628for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011629do :
11630 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11631ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011632if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011635_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011637fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011638done
11639
Michael W. Hudson54241132001-12-07 15:38:26 +000011640
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011641ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011642if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011643 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011644
Martin v. Löwis1142de32002-03-29 16:28:31 +000011645else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011647 *" dup2.$ac_objext "* ) ;;
11648 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011649 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011650esac
11651
Martin v. Löwis1142de32002-03-29 16:28:31 +000011652fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011653
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011654ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011655if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011656 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11657
11658else
11659 case " $LIBOBJS " in
11660 *" strdup.$ac_objext "* ) ;;
11661 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11662 ;;
11663esac
11664
11665fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011666
11667
11668for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011669do :
11670 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011671if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011672 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011676/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011677#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011678int
11679main ()
11680{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011681getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 ;
11683 return 0;
11684}
11685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011689
Guido van Rossum627b2d71993-12-24 10:39:16 +000011690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011692
Guido van Rossum627b2d71993-12-24 10:39:16 +000011693fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011694done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011695
Jack Jansen150753c2003-03-29 22:07:47 +000011696for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011697do :
11698 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011699if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011700 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011701#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011704/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011705#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011706int
11707main ()
11708{
11709setpgrp(0,0);
11710 ;
11711 return 0;
11712}
11713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011714if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011717
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011720
11721fi
11722done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011723
Thomas Wouters3a584202000-08-05 23:28:51 +000011724for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011725do :
11726 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011727if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011728 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011729#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011732/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011733#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011734int
11735main ()
11736{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011737gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 ;
11739 return 0;
11740}
11741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if ac_fn_c_try_compile "$LINENO"; then :
11743
Guido van Rossum627b2d71993-12-24 10:39:16 +000011744else
Skip Montanaro6dead952003-09-25 14:50:04 +000011745
Matthias Kloseb9621712010-04-24 17:59:49 +000011746$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011747
Martin v. Löwis11437992002-04-12 09:54:03 +000011748
Guido van Rossum627b2d71993-12-24 10:39:16 +000011749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011751
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011753done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011754
Michael W. Hudson54241132001-12-07 15:38:26 +000011755
Victor Stinnere0be4232011-10-25 13:06:09 +020011756for ac_func in clock_gettime
11757do :
11758 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11759if test "x$ac_cv_func_clock_gettime" = xyes; then :
11760 cat >>confdefs.h <<_ACEOF
11761#define HAVE_CLOCK_GETTIME 1
11762_ACEOF
11763
11764else
11765
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11767$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11768if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11769 $as_echo_n "(cached) " >&6
11770else
11771 ac_check_lib_save_LIBS=$LIBS
11772LIBS="-lrt $LIBS"
11773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11774/* end confdefs.h. */
11775
11776/* Override any GCC internal prototype to avoid an error.
11777 Use char because int might match the return type of a GCC
11778 builtin and then its argument prototype would still apply. */
11779#ifdef __cplusplus
11780extern "C"
11781#endif
11782char clock_gettime ();
11783int
11784main ()
11785{
11786return clock_gettime ();
11787 ;
11788 return 0;
11789}
11790_ACEOF
11791if ac_fn_c_try_link "$LINENO"; then :
11792 ac_cv_lib_rt_clock_gettime=yes
11793else
11794 ac_cv_lib_rt_clock_gettime=no
11795fi
11796rm -f core conftest.err conftest.$ac_objext \
11797 conftest$ac_exeext conftest.$ac_ext
11798LIBS=$ac_check_lib_save_LIBS
11799fi
11800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11801$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11802if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11803
11804 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11805
11806
11807$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11808
11809
11810fi
11811
11812
11813fi
11814done
11815
11816
11817for ac_func in clock_getres
11818do :
11819 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11820if test "x$ac_cv_func_clock_getres" = xyes; then :
11821 cat >>confdefs.h <<_ACEOF
11822#define HAVE_CLOCK_GETRES 1
11823_ACEOF
11824
11825else
11826
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11828$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11829if ${ac_cv_lib_rt_clock_getres+:} false; then :
11830 $as_echo_n "(cached) " >&6
11831else
11832 ac_check_lib_save_LIBS=$LIBS
11833LIBS="-lrt $LIBS"
11834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11835/* end confdefs.h. */
11836
11837/* Override any GCC internal prototype to avoid an error.
11838 Use char because int might match the return type of a GCC
11839 builtin and then its argument prototype would still apply. */
11840#ifdef __cplusplus
11841extern "C"
11842#endif
11843char clock_getres ();
11844int
11845main ()
11846{
11847return clock_getres ();
11848 ;
11849 return 0;
11850}
11851_ACEOF
11852if ac_fn_c_try_link "$LINENO"; then :
11853 ac_cv_lib_rt_clock_getres=yes
11854else
11855 ac_cv_lib_rt_clock_getres=no
11856fi
11857rm -f core conftest.err conftest.$ac_objext \
11858 conftest$ac_exeext conftest.$ac_ext
11859LIBS=$ac_check_lib_save_LIBS
11860fi
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11862$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11863if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11864
11865 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11866
11867
11868fi
11869
11870
11871fi
11872done
11873
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11876$as_echo_n "checking for major... " >&6; }
11877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011878/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011879
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011880#if defined(MAJOR_IN_MKDEV)
11881#include <sys/mkdev.h>
11882#elif defined(MAJOR_IN_SYSMACROS)
11883#include <sys/sysmacros.h>
11884#else
11885#include <sys/types.h>
11886#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011887
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011888int
11889main ()
11890{
11891
11892 makedev(major(0),minor(0));
11893
11894 ;
11895 return 0;
11896}
11897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011899
11900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011902
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11904$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011905
11906else
Skip Montanaro6dead952003-09-25 14:50:04 +000011907
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11909$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011910
11911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011912rm -f core conftest.err conftest.$ac_objext \
11913 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011914
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011915# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011916# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11918$as_echo_n "checking for getaddrinfo... " >&6; }
11919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011920/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011921
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011922#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011923#include <sys/socket.h>
11924#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011925#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011926
Martin v. Löwis11437992002-04-12 09:54:03 +000011927int
11928main ()
11929{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011930getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 ;
11932 return 0;
11933}
11934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011935if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011936 have_getaddrinfo=yes
11937else
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011940rm -f core conftest.err conftest.$ac_objext \
11941 conftest$ac_exeext conftest.$ac_ext
11942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11943$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011944if test $have_getaddrinfo = yes
11945then
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11947$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011948 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011952
11953if test "${enable_ipv6+set}" = set; then
11954 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11955else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011956 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011957fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011958else
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011960/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011961
Stefan Krah19c21392012-11-22 23:47:32 +010011962#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011963#include <sys/types.h>
11964#include <netdb.h>
11965#include <string.h>
11966#include <sys/socket.h>
11967#include <netinet/in.h>
11968
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011969int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011970{
11971 int passive, gaierr, inet4 = 0, inet6 = 0;
11972 struct addrinfo hints, *ai, *aitop;
11973 char straddr[INET6_ADDRSTRLEN], strport[16];
11974
11975 for (passive = 0; passive <= 1; passive++) {
11976 memset(&hints, 0, sizeof(hints));
11977 hints.ai_family = AF_UNSPEC;
11978 hints.ai_flags = passive ? AI_PASSIVE : 0;
11979 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011980 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011981 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11982 (void)gai_strerror(gaierr);
11983 goto bad;
11984 }
11985 for (ai = aitop; ai; ai = ai->ai_next) {
11986 if (ai->ai_addr == NULL ||
11987 ai->ai_addrlen == 0 ||
11988 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11989 straddr, sizeof(straddr), strport, sizeof(strport),
11990 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11991 goto bad;
11992 }
11993 switch (ai->ai_family) {
11994 case AF_INET:
11995 if (strcmp(strport, "54321") != 0) {
11996 goto bad;
11997 }
11998 if (passive) {
11999 if (strcmp(straddr, "0.0.0.0") != 0) {
12000 goto bad;
12001 }
12002 } else {
12003 if (strcmp(straddr, "127.0.0.1") != 0) {
12004 goto bad;
12005 }
12006 }
12007 inet4++;
12008 break;
12009 case AF_INET6:
12010 if (strcmp(strport, "54321") != 0) {
12011 goto bad;
12012 }
12013 if (passive) {
12014 if (strcmp(straddr, "::") != 0) {
12015 goto bad;
12016 }
12017 } else {
12018 if (strcmp(straddr, "::1") != 0) {
12019 goto bad;
12020 }
12021 }
12022 inet6++;
12023 break;
12024 case AF_UNSPEC:
12025 goto bad;
12026 break;
12027 default:
12028 /* another family support? */
12029 break;
12030 }
12031 }
12032 }
12033
12034 if (!(inet4 == 0 || inet4 == 2))
12035 goto bad;
12036 if (!(inet6 == 0 || inet6 == 2))
12037 goto bad;
12038
12039 if (aitop)
12040 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012041 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012042
12043 bad:
12044 if (aitop)
12045 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012046 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012047}
12048
Martin v. Löwis11437992002-04-12 09:54:03 +000012049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012050if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012051 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012052else
Matthias Kloseb9621712010-04-24 17:59:49 +000012053 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012059fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012060
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12064$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12065
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012066if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012067then
12068 if test $ipv6 = yes
12069 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012070 echo 'Fatal: You must get working getaddrinfo() function.'
12071 echo ' or you can specify "--disable-ipv6"'.
12072 exit 1
12073 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012074else
Martin v. Löwis11437992002-04-12 09:54:03 +000012075
Matthias Kloseb9621712010-04-24 17:59:49 +000012076$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012077
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012078fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012079
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012080for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012081do :
12082 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012083if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012086_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012087
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012088fi
12089done
12090
Michael W. Hudson54241132001-12-07 15:38:26 +000012091
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012092# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12094$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012095if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012099/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012100#include <sys/types.h>
12101#include <sys/time.h>
12102#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012103
Martin v. Löwis11437992002-04-12 09:54:03 +000012104int
12105main ()
12106{
12107if ((struct tm *) 0)
12108return 0;
12109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012114 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012115else
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12121$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012122if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125
12126fi
12127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12129$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012130if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012134/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012135#include <sys/types.h>
12136#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012137
Martin v. Löwis11437992002-04-12 09:54:03 +000012138int
12139main ()
12140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141struct tm tm;
12142 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 ;
12145 return 0;
12146}
12147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012148if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149 ac_cv_struct_tm=time.h
12150else
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12156$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012157if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012158
Matthias Kloseb9621712010-04-24 17:59:49 +000012159$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160
12161fi
12162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163ac_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 +000012164#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166"
Victor Stinnere0be4232011-10-25 13:06:09 +020012167if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012168
12169cat >>confdefs.h <<_ACEOF
12170#define HAVE_STRUCT_TM_TM_ZONE 1
12171_ACEOF
12172
12173
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012174fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012175
Martin v. Löwis11437992002-04-12 09:54:03 +000012176if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12177
Matthias Kloseb9621712010-04-24 17:59:49 +000012178$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012179
12180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12182"
Victor Stinnere0be4232011-10-25 13:06:09 +020012183if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185else
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187fi
12188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012189cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012190#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012191_ACEOF
12192
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12194$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012195if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197else
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012199/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012200#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201#if !HAVE_DECL_TZNAME
12202extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205int
12206main ()
12207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 ;
12210 return 0;
12211}
12212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012213if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012214 ac_cv_var_tzname=yes
12215else
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012218rm -f core conftest.err conftest.$ac_objext \
12219 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12222$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012223 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012224
Matthias Kloseb9621712010-04-24 17:59:49 +000012225$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012227 fi
12228fi
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012231if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012232
12233cat >>confdefs.h <<_ACEOF
12234#define HAVE_STRUCT_STAT_ST_RDEV 1
12235_ACEOF
12236
12237
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012238fi
12239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012242
Martin v. Löwis11437992002-04-12 09:54:03 +000012243cat >>confdefs.h <<_ACEOF
12244#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12245_ACEOF
12246
12247
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012248fi
12249
Matthias Kloseb9621712010-04-24 17:59:49 +000012250ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012251if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012252
12253cat >>confdefs.h <<_ACEOF
12254#define HAVE_STRUCT_STAT_ST_FLAGS 1
12255_ACEOF
12256
12257
12258fi
12259
Matthias Kloseb9621712010-04-24 17:59:49 +000012260ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012261if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012262
12263cat >>confdefs.h <<_ACEOF
12264#define HAVE_STRUCT_STAT_ST_GEN 1
12265_ACEOF
12266
12267
12268fi
12269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012271if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012272
12273cat >>confdefs.h <<_ACEOF
12274#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12275_ACEOF
12276
12277
12278fi
12279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012281if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012282
Martin v. Löwis11437992002-04-12 09:54:03 +000012283cat >>confdefs.h <<_ACEOF
12284#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12285_ACEOF
12286
12287
Matthias Kloseb9621712010-04-24 17:59:49 +000012288$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012289
12290else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012292 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12294 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012295esac
12296
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012297fi
12298
Michael W. Hudson54241132001-12-07 15:38:26 +000012299
Martin v. Löwis11437992002-04-12 09:54:03 +000012300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12302$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012303if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012305else
Matthias Kloseb159a552010-04-25 21:00:44 +000012306
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012308/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012309#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012310int
12311main ()
12312{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012313return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012314 ;
12315 return 0;
12316}
12317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012318if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012319 ac_cv_header_time_altzone=yes
12320else
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325fi
12326
Matthias Kloseb9621712010-04-24 17:59:49 +000012327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12328$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012332
12333fi
12334
Guido van Rossumda88dad1995-01-26 00:46:29 +000012335was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12337$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012339/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012340
12341#include <sys/types.h>
12342#include <sys/select.h>
12343#include <sys/time.h>
12344
Martin v. Löwis11437992002-04-12 09:54:03 +000012345int
12346main ()
12347{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012348;
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 ;
12350 return 0;
12351}
12352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
12355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012358 was_it_defined=yes
12359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12363$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364
Matthias Kloseb9621712010-04-24 17:59:49 +000012365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12366$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012367if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012369else
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012371/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012372#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012373int
12374main ()
12375{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012376struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 ;
12378 return 0;
12379}
12380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012382 ac_cv_struct_addrinfo=yes
12383else
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12387fi
12388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12390$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012394
12395fi
12396
Matthias Kloseb9621712010-04-24 17:59:49 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12398$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012399if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012401else
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012403/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012404
12405# include <sys/types.h>
12406# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012407int
12408main ()
12409{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012410struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 ;
12412 return 0;
12413}
12414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012416 ac_cv_struct_sockaddr_storage=yes
12417else
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12421fi
12422
Matthias Kloseb9621712010-04-24 17:59:49 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12424$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012425if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012428
12429fi
12430
Guido van Rossum627b2d71993-12-24 10:39:16 +000012431# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12434$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012435if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012436 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012437else
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012440$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012441int
12442main ()
12443{
12444static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012445test_array [0] = 0;
12446return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
12448 ;
12449 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012450}
Martin v. Löwis11437992002-04-12 09:54:03 +000012451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012453 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12460$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012461if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012463
12464fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12467$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012468if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012470else
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012472/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012473
Martin v. Löwis11437992002-04-12 09:54:03 +000012474int
12475main ()
12476{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012479 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012481 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483 char const *const *pcpcc;
12484 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012485 /* NEC SVR4.0.2 mips cc rejects this. */
12486 struct point {int x, y;};
12487 static struct point const zero = {0,0};
12488 /* AIX XL C 1.02.0.0 rejects this.
12489 It does not let you subtract one const X* pointer from another in
12490 an arm of an if-expression whose if-part is not a constant
12491 expression */
12492 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012494 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495 ++pcpcc;
12496 ppc = (char**) pcpcc;
12497 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012498 { /* SCO 3.2v4 cc rejects this sort of thing. */
12499 char tx;
12500 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012502
Martin v. Löwis11437992002-04-12 09:54:03 +000012503 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 }
12506 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12507 int x[] = {25, 17};
12508 const int *foo = &x[0];
12509 ++foo;
12510 }
12511 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12512 typedef const int *iptr;
12513 iptr p = 0;
12514 ++p;
12515 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012516 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012518 struct s { int j; const int *ap[3]; } bx;
12519 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 }
12521 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12522 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012526#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012527
Martin v. Löwis11437992002-04-12 09:54:03 +000012528 ;
12529 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012530}
Martin v. Löwis11437992002-04-12 09:54:03 +000012531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012532if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533 ac_cv_c_const=yes
12534else
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12540$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012541if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012542
Matthias Kloseb9621712010-04-24 17:59:49 +000012543$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012544
12545fi
12546
Michael W. Hudson54241132001-12-07 15:38:26 +000012547
Guido van Rossumda88dad1995-01-26 00:46:29 +000012548works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12550$as_echo_n "checking for working volatile... " >&6; }
12551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012552/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012553
Martin v. Löwis11437992002-04-12 09:54:03 +000012554int
12555main ()
12556{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012557volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 ;
12559 return 0;
12560}
12561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012562if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012563 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012564else
Skip Montanaro6dead952003-09-25 14:50:04 +000012565
Matthias Kloseb9621712010-04-24 17:59:49 +000012566$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012567
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012568
Guido van Rossum627b2d71993-12-24 10:39:16 +000012569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12572$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012573
Guido van Rossumda88dad1995-01-26 00:46:29 +000012574works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12576$as_echo_n "checking for working signed char... " >&6; }
12577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012578/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580int
12581main ()
12582{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012583signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 ;
12585 return 0;
12586}
12587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012588if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012589 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012590else
Skip Montanaro6dead952003-09-25 14:50:04 +000012591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012593
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012594
Guido van Rossum7f43da71994-08-01 12:15:30 +000012595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12598$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012599
Guido van Rossumda88dad1995-01-26 00:46:29 +000012600have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12602$as_echo_n "checking for prototypes... " >&6; }
12603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012605int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012606int
12607main ()
12608{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012609return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 ;
12611 return 0;
12612}
12613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012615
Matthias Kloseb9621712010-04-24 17:59:49 +000012616$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012617
Matthias Kloseb159a552010-04-25 21:00:44 +000012618 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12622$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623
Guido van Rossumda88dad1995-01-26 00:46:29 +000012624works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12626$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012628/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012629
12630#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012631int foo(int x, ...) {
12632 va_list va;
12633 va_start(va, x);
12634 va_arg(va, int);
12635 va_arg(va, char *);
12636 va_arg(va, double);
12637 return 0;
12638}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012639
Martin v. Löwis11437992002-04-12 09:54:03 +000012640int
12641main ()
12642{
Guido van Rossum90eea071996-08-30 20:58:57 +000012643return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ;
12645 return 0;
12646}
12647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
12650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012653 works=yes
12654
Guido van Rossum627b2d71993-12-24 10:39:16 +000012655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12658$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012659
Martin v. Löwisd6320502004-08-12 13:45:08 +000012660# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12662$as_echo_n "checking for socketpair... " >&6; }
12663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012664/* end confdefs.h. */
12665
12666#include <sys/types.h>
12667#include <sys/socket.h>
12668
12669int
12670main ()
12671{
12672void *x=socketpair
12673 ;
12674 return 0;
12675}
12676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012678
Matthias Kloseb9621712010-04-24 17:59:49 +000012679$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012680
Matthias Kloseb159a552010-04-25 21:00:44 +000012681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012682$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012683else
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12685$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012686
12687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012689
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012690# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12692$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012694/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012695#include <sys/types.h>
12696#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012697int
12698main ()
12699{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012700struct sockaddr x;
12701x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 ;
12703 return 0;
12704}
12705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012706if ac_fn_c_try_compile "$LINENO"; then :
12707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12708$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012711
12712else
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12714$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012715
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012718
Guido van Rossumda88dad1995-01-26 00:46:29 +000012719va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12721$as_echo_n "checking whether va_list is an array... " >&6; }
12722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012723/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012724
12725#ifdef HAVE_STDARG_PROTOTYPES
12726#include <stdarg.h>
12727#else
12728#include <varargs.h>
12729#endif
12730
Martin v. Löwis11437992002-04-12 09:54:03 +000012731int
12732main ()
12733{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739if ac_fn_c_try_compile "$LINENO"; then :
12740
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012741else
Skip Montanaro6dead952003-09-25 14:50:04 +000012742
Martin v. Löwis11437992002-04-12 09:54:03 +000012743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
Guido van Rossumda88dad1995-01-26 00:46:29 +000012746 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12751$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012752
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012753# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012754
12755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012757if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12762$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012763 OLD_CFLAGS=$CFLAGS
12764 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012766/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012767
12768# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
Martin v. Löwis11437992002-04-12 09:54:03 +000012770int
12771main ()
12772{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012773
12774 char *name;
12775 struct hostent *he, *res;
12776 char buffer[2048];
12777 int buflen = 2048;
12778 int h_errnop;
12779
12780 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
12782 ;
12783 return 0;
12784}
12785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012789
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012792
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12794$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012796else
Skip Montanaro6dead952003-09-25 14:50:04 +000012797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12799$as_echo "no" >&6; }
12800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12801$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012804
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012805# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Martin v. Löwis11437992002-04-12 09:54:03 +000012807int
12808main ()
12809{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012810
12811 char *name;
12812 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012813 char buffer[2048];
12814 int buflen = 2048;
12815 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012816
Matthias Kloseb159a552010-04-25 21:00:44 +000012817 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012818
12819 ;
12820 return 0;
12821}
12822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012826
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
Matthias Kloseb159a552010-04-25 21:00:44 +000012828$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12831$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012832
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012833else
Skip Montanaro6dead952003-09-25 14:50:04 +000012834
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12836$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12838$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12840/* end confdefs.h. */
12841
12842# include <netdb.h>
12843
12844int
12845main ()
12846{
12847
12848 char *name;
12849 struct hostent *he;
12850 struct hostent_data data;
12851
12852 (void) gethostbyname_r(name, he, &data);
12853
12854 ;
12855 return 0;
12856}
12857_ACEOF
12858if ac_fn_c_try_compile "$LINENO"; then :
12859
12860 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12861
12862
12863$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12864
12865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12866$as_echo "yes" >&6; }
12867
12868else
12869
12870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12871$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012878
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012881 CFLAGS=$OLD_CFLAGS
12882
12883else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 for ac_func in gethostbyname
12886do :
12887 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012888if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012890#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012891_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012892
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012893fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012894done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012895
Michael W. Hudson54241132001-12-07 15:38:26 +000012896
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012897fi
12898
Michael W. Hudson54241132001-12-07 15:38:26 +000012899
12900
12901
12902
12903
12904
Guido van Rossum627b2d71993-12-24 10:39:16 +000012905# checks for system services
12906# (none yet)
12907
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012908# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012909ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012910if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012911
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012912else
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12914$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012915if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012917else
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012919LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923/* Override any GCC internal prototype to avoid an error.
12924 Use char because int might match the return type of a GCC
12925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012926#ifdef __cplusplus
12927extern "C"
12928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012929char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012930int
12931main ()
12932{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 ;
12935 return 0;
12936}
12937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012938if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012940else
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012943rm -f core conftest.err conftest.$ac_objext \
12944 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012945LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12948$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012949if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 cat >>confdefs.h <<_ACEOF
12951#define HAVE_LIBIEEE 1
12952_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012954 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012955
Guido van Rossum627b2d71993-12-24 10:39:16 +000012956fi
12957
Michael W. Hudson54241132001-12-07 15:38:26 +000012958
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012959fi
12960
Michael W. Hudson54241132001-12-07 15:38:26 +000012961
Guido van Rossum7f253911997-05-09 02:42:48 +000012962# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12964$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012967if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012969if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012970then
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12975$as_echo "yes" >&6; }
12976else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12977$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012978fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012979else
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12981$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982fi
12983
Guido van Rossum7f253911997-05-09 02:42:48 +000012984
Guido van Rossum7f43da71994-08-01 12:15:30 +000012985# check for --with-libm=...
12986
Guido van Rossum563e7081996-09-10 18:20:48 +000012987case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012988Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012989*) LIBM=-lm
12990esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12992$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012995if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012997if test "$withval" = no
12998then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13000$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013001elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013002then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13004$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013005else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013006fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013007else
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13009$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010fi
13011
Guido van Rossum7f43da71994-08-01 12:15:30 +000013012
13013# check for --with-libc=...
13014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13016$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013019if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013021if test "$withval" = no
13022then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13024$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013025elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013026then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13028$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013029else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013030fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13033$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034fi
13035
Guido van Rossum7f43da71994-08-01 12:15:30 +000013036
Stefan Krah1919b7e2012-03-21 18:25:23 +010013037# **************************************
13038# * Check for gcc x64 inline assembler *
13039# **************************************
13040
13041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13042$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13044/* end confdefs.h. */
13045
13046int
13047main ()
13048{
13049
13050 __asm__ __volatile__ ("movq %rcx, %rax");
13051
13052 ;
13053 return 0;
13054}
13055_ACEOF
13056if ac_fn_c_try_compile "$LINENO"; then :
13057 have_gcc_asm_for_x64=yes
13058else
13059 have_gcc_asm_for_x64=no
13060fi
13061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13063$as_echo "$have_gcc_asm_for_x64" >&6; }
13064if test "$have_gcc_asm_for_x64" = yes
13065then
13066
13067$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13068
13069fi
13070
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013071# **************************************************
13072# * Check for various properties of floating point *
13073# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13076$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013077if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013079else
13080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013082 ac_cv_little_endian_double=no
13083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013085/* end confdefs.h. */
13086
13087#include <string.h>
13088int main() {
13089 double x = 9006104071832581.0;
13090 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13091 return 0;
13092 else
13093 return 1;
13094}
13095
13096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013097if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013098 ac_cv_little_endian_double=yes
13099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013104fi
13105
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013106fi
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13109$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013110if test "$ac_cv_little_endian_double" = yes
13111then
13112
Matthias Kloseb9621712010-04-24 17:59:49 +000013113$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013114
13115fi
13116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13118$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013119if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013121else
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013124 ac_cv_big_endian_double=no
13125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013127/* end confdefs.h. */
13128
13129#include <string.h>
13130int main() {
13131 double x = 9006104071832581.0;
13132 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13133 return 0;
13134 else
13135 return 1;
13136}
13137
13138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013139if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013140 ac_cv_big_endian_double=yes
13141else
Matthias Kloseb9621712010-04-24 17:59:49 +000013142 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013146fi
13147
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013148fi
13149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13151$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013152if test "$ac_cv_big_endian_double" = yes
13153then
13154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013156
13157fi
13158
13159# Some ARM platforms use a mixed-endian representation for doubles.
13160# While Python doesn't currently have full support for these platforms
13161# (see e.g., issue 1762561), we can at least make sure that float <-> string
13162# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13164$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013165if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013167else
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013170 ac_cv_mixed_endian_double=no
13171else
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013173/* end confdefs.h. */
13174
13175#include <string.h>
13176int main() {
13177 double x = 9006104071832581.0;
13178 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13179 return 0;
13180 else
13181 return 1;
13182}
13183
13184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013185if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013186 ac_cv_mixed_endian_double=yes
13187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013192fi
13193
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013194fi
13195
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13197$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013198if test "$ac_cv_mixed_endian_double" = yes
13199then
13200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013202
13203fi
13204
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013205# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013206# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013207# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013208# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013209# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013210# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013211
13212# This inline assembler syntax may also work for suncc and icc,
13213# so we try it on all platforms.
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13216$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013218/* end confdefs.h. */
13219
13220int
13221main ()
13222{
13223
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013224 unsigned short cw;
13225 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13226 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013227
13228 ;
13229 return 0;
13230}
13231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013232if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013233 have_gcc_asm_for_x87=yes
13234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013236fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13239$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013240if test "$have_gcc_asm_for_x87" = yes
13241then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013244
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013245fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013246
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013247# Detect whether system arithmetic is subject to x87-style double
13248# rounding issues. The result of this test has little meaning on non
13249# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13250# mode is round-to-nearest and double rounding issues are present, and
13251# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13253$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013254# $BASECFLAGS may affect the result
13255ac_save_cc="$CC"
13256CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013257if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013258 ac_cv_x87_double_rounding=no
13259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013261/* end confdefs.h. */
13262
13263#include <stdlib.h>
13264#include <math.h>
13265int main() {
13266 volatile double x, y, z;
13267 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13268 x = 0.99999999999999989; /* 1-2**-53 */
13269 y = 1./x;
13270 if (y != 1.)
13271 exit(0);
13272 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13273 x = 1e16;
13274 y = 2.99999;
13275 z = x + y;
13276 if (z != 1e16+4.)
13277 exit(0);
13278 /* both tests show evidence of double rounding */
13279 exit(1);
13280}
13281
13282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013283if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013284 ac_cv_x87_double_rounding=no
13285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013290fi
13291
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013292CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13294$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013295if test "$ac_cv_x87_double_rounding" = yes
13296then
13297
Matthias Kloseb9621712010-04-24 17:59:49 +000013298$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013299
13300fi
13301
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013302# ************************************
13303# * Check for mathematical functions *
13304# ************************************
13305
13306LIBS_SAVE=$LIBS
13307LIBS="$LIBS $LIBM"
13308
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013309for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13310do :
13311 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13312ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013313if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013314 cat >>confdefs.h <<_ACEOF
13315#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13316_ACEOF
13317
13318fi
13319done
13320
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013321for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013322do :
13323 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13324ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013325if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013326 cat >>confdefs.h <<_ACEOF
13327#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13328_ACEOF
13329
13330fi
13331done
13332
13333ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13334"
Victor Stinnere0be4232011-10-25 13:06:09 +020013335if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013336 ac_have_decl=1
13337else
13338 ac_have_decl=0
13339fi
13340
13341cat >>confdefs.h <<_ACEOF
13342#define HAVE_DECL_ISINF $ac_have_decl
13343_ACEOF
13344ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13345"
Victor Stinnere0be4232011-10-25 13:06:09 +020013346if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013347 ac_have_decl=1
13348else
13349 ac_have_decl=0
13350fi
13351
13352cat >>confdefs.h <<_ACEOF
13353#define HAVE_DECL_ISNAN $ac_have_decl
13354_ACEOF
13355ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13356"
Victor Stinnere0be4232011-10-25 13:06:09 +020013357if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013358 ac_have_decl=1
13359else
13360 ac_have_decl=0
13361fi
13362
13363cat >>confdefs.h <<_ACEOF
13364#define HAVE_DECL_ISFINITE $ac_have_decl
13365_ACEOF
13366
13367
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013368# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13369# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13371$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013372if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013374else
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013377 ac_cv_tanh_preserves_zero_sign=no
13378else
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013380/* end confdefs.h. */
13381
13382#include <math.h>
13383#include <stdlib.h>
13384int main() {
13385 /* return 0 if either negative zeros don't exist
13386 on this platform or if negative zeros exist
13387 and tanh(-0.) == -0. */
13388 if (atan2(0., -1.) == atan2(-0., -1.) ||
13389 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13390 else exit(1);
13391}
13392
13393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013394if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013395 ac_cv_tanh_preserves_zero_sign=yes
13396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13400 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013401fi
13402
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013403fi
13404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13406$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013407if test "$ac_cv_tanh_preserves_zero_sign" = yes
13408then
13409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013411
13412fi
13413
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013414if test "$ac_cv_func_log1p" = yes
13415then
13416 # On some versions of AIX, log1p(-0.) returns 0. instead of
13417 # -0. See issue #9920.
13418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13419$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013420 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013421 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013422else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013423
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013424 if test "$cross_compiling" = yes; then :
13425 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013426else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13428/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013429
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013430 #include <math.h>
13431 #include <stdlib.h>
13432 int main() {
13433 /* Fail if the signs of log1p(-0.) and -0. can be
13434 distinguished. */
13435 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13436 return 0;
13437 else
13438 return 1;
13439 }
13440
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013441_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013442if ac_fn_c_try_run "$LINENO"; then :
13443 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013444else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013445 ac_cv_log1p_drops_zero_sign=yes
13446fi
13447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013449fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013450
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013451fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013452
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13454$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13455fi
13456if test "$ac_cv_log1p_drops_zero_sign" = yes
13457then
13458
13459$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13460
13461fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013462
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013463LIBS=$LIBS_SAVE
13464
Mark Dickinsona614f042009-11-28 12:48:43 +000013465# For multiprocessing module, check that sem_open
13466# actually works. For FreeBSD versions <= 7.2,
13467# the kernel module that provides POSIX semaphores
13468# isn't loaded by default, so an attempt to call
13469# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13471$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013472if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013476 ac_cv_posix_semaphores_enabled=yes
13477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013479/* end confdefs.h. */
13480
13481#include <unistd.h>
13482#include <fcntl.h>
13483#include <stdio.h>
13484#include <semaphore.h>
13485#include <sys/stat.h>
13486
13487int main(void) {
13488 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13489 if (a == SEM_FAILED) {
13490 perror("sem_open");
13491 return 1;
13492 }
13493 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013494 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013495 return 0;
13496}
13497
13498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013499if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013500 ac_cv_posix_semaphores_enabled=yes
13501else
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13505 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013506fi
13507
13508
Mark Dickinsona614f042009-11-28 12:48:43 +000013509fi
13510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13512$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013513if test $ac_cv_posix_semaphores_enabled = no
13514then
13515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013517
13518fi
13519
Mark Dickinson10683072009-04-18 21:18:19 +000013520# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13522$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013523if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013525else
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013527 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013530/* end confdefs.h. */
13531
13532#include <unistd.h>
13533#include <fcntl.h>
13534#include <stdio.h>
13535#include <semaphore.h>
13536#include <sys/stat.h>
13537
13538int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013539 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013540 int count;
13541 int res;
13542 if(a==SEM_FAILED){
13543 perror("sem_open");
13544 return 1;
13545
13546 }
13547 res = sem_getvalue(a, &count);
13548 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013549 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013550 return res==-1 ? 1 : 0;
13551}
13552
Mark Dickinson10683072009-04-18 21:18:19 +000013553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013554if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013555 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013556else
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13560 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013561fi
13562
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013563
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013564fi
13565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13567$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013568if test $ac_cv_broken_sem_getvalue = yes
13569then
13570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013572
13573fi
13574
Mark Dickinsonbd792642009-03-18 20:06:12 +000013575# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13577$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013578# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013580 enableval=$enable_big_digits; case $enable_big_digits in
13581yes)
13582 enable_big_digits=30 ;;
13583no)
13584 enable_big_digits=15 ;;
1358515|30)
13586 ;;
13587*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013588 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 +000013589esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13591$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013592
13593cat >>confdefs.h <<_ACEOF
13594#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13595_ACEOF
13596
13597
13598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13600$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013601fi
13602
13603
Guido van Rossumef2255b2000-03-10 22:30:29 +000013604# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013605ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013606if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013610
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013611 wchar_h="yes"
13612
Guido van Rossumef2255b2000-03-10 22:30:29 +000013613else
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013615
13616fi
13617
Michael W. Hudson54241132001-12-07 15:38:26 +000013618
Martin v. Löwis11437992002-04-12 09:54:03 +000013619
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013620# determine wchar_t size
13621if test "$wchar_h" = yes
13622then
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13626# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13628$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013629if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13633"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013634
Martin v. Löwis11437992002-04-12 09:54:03 +000013635else
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 if test "$ac_cv_type_wchar_t" = yes; then
13637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013639as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013640See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641 else
13642 ac_cv_sizeof_wchar_t=0
13643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013645
Martin v. Löwis11437992002-04-12 09:54:03 +000013646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13648$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013649
13650
13651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013653#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013654_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013655
Michael W. Hudson54241132001-12-07 15:38:26 +000013656
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013657fi
13658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13660$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013661have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013663/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013664
13665#include <tcl.h>
13666#if TCL_UTF_MAX != 6
13667# error "NOT UCS4_TCL"
13668#endif
13669int
13670main ()
13671{
13672
13673 ;
13674 return 0;
13675}
13676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013678
13679
Matthias Kloseb9621712010-04-24 17:59:49 +000013680$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013681
13682 have_ucs4_tcl=yes
13683
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13687$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013688
Skip Montanaro6dead952003-09-25 14:50:04 +000013689# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013690if test "$wchar_h" = yes
13691then
13692 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13694$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013695 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013697else
13698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013700 ac_cv_wchar_t_signed=yes
13701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013703/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013704
13705 #include <wchar.h>
13706 int main()
13707 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013708 /* Success: exit code 0 */
13709 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013710 }
13711
13712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013714 ac_cv_wchar_t_signed=yes
13715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013720fi
13721
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013722fi
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13725$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726fi
13727
Georg Brandl52d168a2008-01-07 18:10:24 +000013728# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013729if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013730 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013731then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013732 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013735
Georg Brandl52d168a2008-01-07 18:10:24 +000013736else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013737 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013738fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13740$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013741
13742# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13744$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013745if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 ac_cv_c_bigendian=unknown
13749 # See if we're dealing with a universal compiler.
13750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13751/* end confdefs.h. */
13752#ifndef __APPLE_CC__
13753 not a universal capable compiler
13754 #endif
13755 typedef int dummy;
13756
Skip Montanaro6dead952003-09-25 14:50:04 +000013757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013758if ac_fn_c_try_compile "$LINENO"; then :
13759
13760 # Check for potential -arch flags. It is not universal unless
13761 # there are at least two -arch flags with different values.
13762 ac_arch=
13763 ac_prev=
13764 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13765 if test -n "$ac_prev"; then
13766 case $ac_word in
13767 i?86 | x86_64 | ppc | ppc64)
13768 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13769 ac_arch=$ac_word
13770 else
13771 ac_cv_c_bigendian=universal
13772 break
13773 fi
13774 ;;
13775 esac
13776 ac_prev=
13777 elif test "x$ac_word" = "x-arch"; then
13778 ac_prev=arch
13779 fi
13780 done
13781fi
13782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13783 if test $ac_cv_c_bigendian = unknown; then
13784 # See if sys/param.h defines the BYTE_ORDER macro.
13785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013786/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013787#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013789
Martin v. Löwis11437992002-04-12 09:54:03 +000013790int
13791main ()
13792{
Matthias Kloseb9621712010-04-24 17:59:49 +000013793#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13794 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13795 && LITTLE_ENDIAN)
13796 bogus endian macros
13797 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013798
13799 ;
13800 return 0;
13801}
13802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013803if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013804 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013806/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013807#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013809
Martin v. Löwis11437992002-04-12 09:54:03 +000013810int
13811main ()
13812{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013813#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 not big endian
13815 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
13817 ;
13818 return 0;
13819}
13820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013821if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013822 ac_cv_c_bigendian=yes
13823else
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013827fi
13828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13829 fi
13830 if test $ac_cv_c_bigendian = unknown; then
13831 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013833/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013834#include <limits.h>
13835
Martin v. Löwis11437992002-04-12 09:54:03 +000013836int
13837main ()
13838{
Matthias Kloseb9621712010-04-24 17:59:49 +000013839#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13840 bogus endian macros
13841 #endif
13842
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 ;
13844 return 0;
13845}
13846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013847if ac_fn_c_try_compile "$LINENO"; then :
13848 # It does; now see whether it defined to _BIG_ENDIAN or not.
13849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13850/* end confdefs.h. */
13851#include <limits.h>
13852
13853int
13854main ()
13855{
13856#ifndef _BIG_ENDIAN
13857 not big endian
13858 #endif
13859
13860 ;
13861 return 0;
13862}
13863_ACEOF
13864if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13870fi
13871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13872 fi
13873 if test $ac_cv_c_bigendian = unknown; then
13874 # Compile a test program.
13875 if test "$cross_compiling" = yes; then :
13876 # Try to guess by grepping values from an object file.
13877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13878/* end confdefs.h. */
13879short int ascii_mm[] =
13880 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13881 short int ascii_ii[] =
13882 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13883 int use_ascii (int i) {
13884 return ascii_mm[i] + ascii_ii[i];
13885 }
13886 short int ebcdic_ii[] =
13887 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13888 short int ebcdic_mm[] =
13889 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13890 int use_ebcdic (int i) {
13891 return ebcdic_mm[i] + ebcdic_ii[i];
13892 }
13893 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895int
13896main ()
13897{
13898return use_ascii (foo) == use_ebcdic (foo);
13899 ;
13900 return 0;
13901}
13902_ACEOF
13903if ac_fn_c_try_compile "$LINENO"; then :
13904 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13905 ac_cv_c_bigendian=yes
13906 fi
13907 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13908 if test "$ac_cv_c_bigendian" = unknown; then
13909 ac_cv_c_bigendian=no
13910 else
13911 # finding both strings is unlikely to happen, but who knows?
13912 ac_cv_c_bigendian=unknown
13913 fi
13914 fi
13915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013919/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013921int
13922main ()
13923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 /* Are we little or big endian? From Harbison&Steele. */
13926 union
13927 {
13928 long int l;
13929 char c[sizeof (long int)];
13930 } u;
13931 u.l = 1;
13932 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933
13934 ;
13935 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013936}
Martin v. Löwis11437992002-04-12 09:54:03 +000013937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013938if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013939 ac_cv_c_bigendian=no
13940else
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13950$as_echo "$ac_cv_c_bigendian" >&6; }
13951 case $ac_cv_c_bigendian in #(
13952 yes)
13953 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13954;; #(
13955 no)
13956 ;; #(
13957 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 ;; #(
13962 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013963 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013964 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013966
Michael W. Hudson54241132001-12-07 15:38:26 +000013967
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013968# ABI version string for Python extension modules. This appears between the
13969# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13970# from the following attributes which affect the ABI of this Python build (in
13971# this order):
13972#
13973# * The Python implementation (always 'cpython-' for us)
13974# * The major and minor version numbers
13975# * --with-pydebug (adds a 'd')
13976# * --with-pymalloc (adds a 'm')
13977# * --with-wide-unicode (adds a 'u')
13978#
13979# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013980# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13981# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013982
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13984$as_echo_n "checking ABIFLAGS... " >&6; }
13985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13986$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13988$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013989SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13991$as_echo "$SOABI" >&6; }
13992
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013993
13994case $ac_sys_system in
13995 Linux*|GNU*)
13996 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13997 *)
13998 EXT_SUFFIX=${SHLIB_SUFFIX};;
13999esac
14000
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14002$as_echo_n "checking LDVERSION... " >&6; }
14003LDVERSION='$(VERSION)$(ABIFLAGS)'
14004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14005$as_echo "$LDVERSION" >&6; }
14006
doko@python.org87421192013-01-26 11:39:31 +010014007
14008LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14009
14010
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014011# Check whether right shifting a negative integer extends the sign bit
14012# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14014$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014015if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014017else
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
Matthias Kloseb9621712010-04-24 17:59:49 +000014019if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014020 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014021else
Matthias Kloseb9621712010-04-24 17:59:49 +000014022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014023/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014024
14025int main()
14026{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014027 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014028}
14029
Martin v. Löwis11437992002-04-12 09:54:03 +000014030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014031if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014032 ac_cv_rshift_extends_sign=yes
14033else
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014038fi
14039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014040fi
14041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14043$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014044if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014045then
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014048
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014049fi
14050
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014051# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14053$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014054if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014056else
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
Matthias Kloseb9621712010-04-24 17:59:49 +000014058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014059/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014060#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014061int
14062main ()
14063{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014064
14065 FILE *f = fopen("/dev/null", "r");
14066 flockfile(f);
14067 getc_unlocked(f);
14068 funlockfile(f);
14069
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 ;
14071 return 0;
14072}
14073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014074if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014075 ac_cv_have_getc_unlocked=yes
14076else
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 ac_cv_have_getc_unlocked=no
14078fi
14079rm -f core conftest.err conftest.$ac_objext \
14080 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14084$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014085if test "$ac_cv_have_getc_unlocked" = yes
14086then
Martin v. Löwis11437992002-04-12 09:54:03 +000014087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014089
14090fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014091
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014092# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014093# save the value of LIBS so we don't actually link Python with readline
14094LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014095
Gregory P. Smith18820942008-09-07 06:24:49 +000014096# On some systems we need to link readline to a termcap compatible
14097# library. NOTE: Keep the precedence of listed libraries synchronised
14098# with setup.py.
14099py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14101$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014102for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014103 if test -z "$py_libtermcap"; then
14104 READLINE_LIBS="-lreadline"
14105 else
14106 READLINE_LIBS="-lreadline -l$py_libtermcap"
14107 fi
14108 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014110/* end confdefs.h. */
14111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014112/* Override any GCC internal prototype to avoid an error.
14113 Use char because int might match the return type of a GCC
14114 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014115#ifdef __cplusplus
14116extern "C"
14117#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014118char readline ();
14119int
14120main ()
14121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014123 ;
14124 return 0;
14125}
14126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014127if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014128 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014130rm -f core conftest.err conftest.$ac_objext \
14131 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014132 if test $py_cv_lib_readline = yes; then
14133 break
14134 fi
14135done
14136# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14137#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014138if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14140$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014141else
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14143$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014144
Matthias Kloseb9621712010-04-24 17:59:49 +000014145$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014146
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014147fi
14148
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014149# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14151$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014152if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014154else
14155 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014156LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014158/* end confdefs.h. */
14159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160/* Override any GCC internal prototype to avoid an error.
14161 Use char because int might match the return type of a GCC
14162 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014163#ifdef __cplusplus
14164extern "C"
14165#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014166char rl_callback_handler_install ();
14167int
14168main ()
14169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014171 ;
14172 return 0;
14173}
14174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014175if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014176 ac_cv_lib_readline_rl_callback_handler_install=yes
14177else
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014180rm -f core conftest.err conftest.$ac_objext \
14181 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014182LIBS=$ac_check_lib_save_LIBS
14183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14185$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014186if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014187
Matthias Kloseb9621712010-04-24 17:59:49 +000014188$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014189
14190fi
14191
14192
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014193# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014195/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014196#include <readline/readline.h>
14197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014198if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014199 have_readline=yes
14200else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014201 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014202
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014203fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014204rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014205if test $have_readline = yes
14206then
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014208/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014209#include <readline/readline.h>
14210
14211_ACEOF
14212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014216
14217fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014218rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014219
Matthias Kloseb9621712010-04-24 17:59:49 +000014220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014221/* end confdefs.h. */
14222#include <readline/readline.h>
14223
14224_ACEOF
14225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014229
14230fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014231rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014232
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014233fi
14234
Martin v. Löwis0daad592001-09-30 21:09:59 +000014235# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14237$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014238if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014240else
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014242LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246/* Override any GCC internal prototype to avoid an error.
14247 Use char because int might match the return type of a GCC
14248 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014249#ifdef __cplusplus
14250extern "C"
14251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014252char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014253int
14254main ()
14255{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 ;
14258 return 0;
14259}
14260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014263else
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014266rm -f core conftest.err conftest.$ac_objext \
14267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014268LIBS=$ac_check_lib_save_LIBS
14269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14271$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014272if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014275
Martin v. Löwis0daad592001-09-30 21:09:59 +000014276fi
14277
Michael W. Hudson54241132001-12-07 15:38:26 +000014278
Thomas Wouters89d996e2007-09-08 17:39:28 +000014279# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14281$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014282if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014284else
14285 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014286LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014288/* end confdefs.h. */
14289
14290/* Override any GCC internal prototype to avoid an error.
14291 Use char because int might match the return type of a GCC
14292 builtin and then its argument prototype would still apply. */
14293#ifdef __cplusplus
14294extern "C"
14295#endif
14296char rl_completion_display_matches_hook ();
14297int
14298main ()
14299{
14300return rl_completion_display_matches_hook ();
14301 ;
14302 return 0;
14303}
14304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014305if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014306 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14307else
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014310rm -f core conftest.err conftest.$ac_objext \
14311 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014312LIBS=$ac_check_lib_save_LIBS
14313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14315$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014316if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014319
14320fi
14321
14322
Martin v. Löwis0daad592001-09-30 21:09:59 +000014323# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14325$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014326if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014328else
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014330LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334/* Override any GCC internal prototype to avoid an error.
14335 Use char because int might match the return type of a GCC
14336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014337#ifdef __cplusplus
14338extern "C"
14339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014340char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014341int
14342main ()
14343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 ;
14346 return 0;
14347}
14348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014354rm -f core conftest.err conftest.$ac_objext \
14355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014356LIBS=$ac_check_lib_save_LIBS
14357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14359$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014360if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014361
Matthias Kloseb9621712010-04-24 17:59:49 +000014362$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014363
Guido van Rossum353ae582001-07-10 16:45:32 +000014364fi
14365
Jack Jansendd19cf82001-12-06 22:36:17 +000014366
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014367# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014369/* end confdefs.h. */
14370#include <readline/readline.h>
14371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014372if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014373 have_readline=yes
14374else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014375 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014376
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014377fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014378rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014379if test $have_readline = yes
14380then
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014382/* end confdefs.h. */
14383#include <readline/readline.h>
14384
14385_ACEOF
14386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014387 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014388
Matthias Kloseb9621712010-04-24 17:59:49 +000014389$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014390
14391fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014392rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014393
14394fi
14395
Martin v. Löwis82bca632006-02-10 20:49:30 +000014396# End of readline checks: restore LIBS
14397LIBS=$LIBS_no_readline
14398
Matthias Kloseb9621712010-04-24 17:59:49 +000014399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14400$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014401if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014403else
Martin v. Löwis11437992002-04-12 09:54:03 +000014404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014406 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014409/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014410
14411int main()
14412{
14413 int val1 = nice(1);
14414 if (val1 != -1 && val1 == nice(2))
14415 exit(0);
14416 exit(1);
14417}
14418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014420if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014421 ac_cv_broken_nice=yes
14422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14426 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014427fi
14428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429fi
14430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14432$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014433if test "$ac_cv_broken_nice" = yes
14434then
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014437
14438fi
14439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14441$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014442if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014444else
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014446 ac_cv_broken_poll=no
14447else
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014449/* end confdefs.h. */
14450
14451#include <poll.h>
14452
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014453int main()
14454{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014455 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014456 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014457
14458 close (42);
14459
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014460 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014461 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014462 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014463 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014464 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014465 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014466 return 1;
14467}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014468
14469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014470if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014471 ac_cv_broken_poll=yes
14472else
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014479fi
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14482$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014483if test "$ac_cv_broken_poll" = yes
14484then
14485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014487
14488fi
14489
Brett Cannon43802422005-02-10 20:48:03 +000014490# 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 +000014491# (which is not required by ISO C or UNIX spec) and/or if we support
14492# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014493ac_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 +000014494#include <$ac_cv_struct_tm>
14495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496"
Victor Stinnere0be4232011-10-25 13:06:09 +020014497if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014498
14499cat >>confdefs.h <<_ACEOF
14500#define HAVE_STRUCT_TM_TM_ZONE 1
14501_ACEOF
14502
14503
14504fi
14505
14506if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14507
Matthias Kloseb9621712010-04-24 17:59:49 +000014508$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014509
14510else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14512"
Victor Stinnere0be4232011-10-25 13:06:09 +020014513if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515else
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517fi
14518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014520#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014521_ACEOF
14522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14524$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014525if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527else
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014529/* end confdefs.h. */
14530#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531#if !HAVE_DECL_TZNAME
14532extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014533#endif
14534
14535int
14536main ()
14537{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014539 ;
14540 return 0;
14541}
14542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014543if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014544 ac_cv_var_tzname=yes
14545else
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014548rm -f core conftest.err conftest.$ac_objext \
14549 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14552$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014553 if test $ac_cv_var_tzname = yes; then
14554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014556
14557 fi
14558fi
14559
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014560
Martin v. Löwis1d459062005-03-14 21:23:33 +000014561# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14563$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014564if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014566else
14567
Matthias Kloseb9621712010-04-24 17:59:49 +000014568if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014569 ac_cv_working_tzset=no
14570else
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014572/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014573
14574#include <stdlib.h>
14575#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014576#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014577
14578#if HAVE_TZNAME
14579extern char *tzname[];
14580#endif
14581
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014582int main()
14583{
Brett Cannon18367812003-09-19 00:59:16 +000014584 /* Note that we need to ensure that not only does tzset(3)
14585 do 'something' with localtime, but it works as documented
14586 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014587 This includes making sure that tzname is set properly if
14588 tm->tm_zone does not exist since it is the alternative way
14589 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014590
14591 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014592 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014593 */
14594
Martin v. Löwis1d459062005-03-14 21:23:33 +000014595 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014596 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14597
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014598 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014599 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014600 if (localtime(&groundhogday)->tm_hour != 0)
14601 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014602#if HAVE_TZNAME
14603 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14604 if (strcmp(tzname[0], "UTC") ||
14605 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14606 exit(1);
14607#endif
Brett Cannon18367812003-09-19 00:59:16 +000014608
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014609 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014610 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014611 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014612 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014613#if HAVE_TZNAME
14614 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14615 exit(1);
14616#endif
Brett Cannon18367812003-09-19 00:59:16 +000014617
14618 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14619 tzset();
14620 if (localtime(&groundhogday)->tm_hour != 11)
14621 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014622#if HAVE_TZNAME
14623 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14624 exit(1);
14625#endif
14626
14627#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014628 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14629 exit(1);
14630 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14631 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014632#endif
Brett Cannon18367812003-09-19 00:59:16 +000014633
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014634 exit(0);
14635}
14636
14637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014638if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014639 ac_cv_working_tzset=yes
14640else
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014645fi
14646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647fi
14648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14650$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014651if test "$ac_cv_working_tzset" = yes
14652then
14653
Matthias Kloseb9621712010-04-24 17:59:49 +000014654$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014655
14656fi
14657
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014658# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14660$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014661if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014663else
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014665/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014666#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014667int
14668main ()
14669{
14670
14671struct stat st;
14672st.st_mtim.tv_nsec = 1;
14673
14674 ;
14675 return 0;
14676}
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014679 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014680else
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14684fi
14685
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14687$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014688if test "$ac_cv_stat_tv_nsec" = yes
14689then
14690
Matthias Kloseb9621712010-04-24 17:59:49 +000014691$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014692
14693fi
14694
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014695# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14697$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014698if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014700else
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014702/* end confdefs.h. */
14703#include <sys/stat.h>
14704int
14705main ()
14706{
14707
14708struct stat st;
14709st.st_mtimespec.tv_nsec = 1;
14710
14711 ;
14712 return 0;
14713}
14714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014716 ac_cv_stat_tv_nsec2=yes
14717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14721fi
14722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14724$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014725if test "$ac_cv_stat_tv_nsec2" = yes
14726then
14727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014729
14730fi
14731
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014732ac_save_cppflags="$CPPFLAGS"
14733CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014734# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14736$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014737if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014739else
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014741/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014742#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014743int
14744main ()
14745{
Jack Jansen666b1e72001-10-31 12:11:48 +000014746
14747 int rtn;
14748 rtn = mvwdelch(0,0,0);
14749
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 ;
14751 return 0;
14752}
14753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014755 ac_cv_mvwdelch_is_expression=yes
14756else
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14760fi
14761
Matthias Kloseb9621712010-04-24 17:59:49 +000014762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14763$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014764
14765if test "$ac_cv_mvwdelch_is_expression" = yes
14766then
Martin v. Löwis11437992002-04-12 09:54:03 +000014767
Matthias Kloseb9621712010-04-24 17:59:49 +000014768$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014769
14770fi
14771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14773$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014774if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014776else
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014778/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014779#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014780int
14781main ()
14782{
Jack Jansen666b1e72001-10-31 12:11:48 +000014783
14784 WINDOW *w;
14785 w->_flags = 0;
14786
Martin v. Löwis11437992002-04-12 09:54:03 +000014787 ;
14788 return 0;
14789}
14790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014791if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014792 ac_cv_window_has_flags=yes
14793else
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14797fi
14798
Matthias Kloseb9621712010-04-24 17:59:49 +000014799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14800$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014801
Jack Jansen666b1e72001-10-31 12:11:48 +000014802
14803if test "$ac_cv_window_has_flags" = yes
14804then
Martin v. Löwis11437992002-04-12 09:54:03 +000014805
Matthias Kloseb9621712010-04-24 17:59:49 +000014806$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014807
14808fi
14809
Matthias Kloseb9621712010-04-24 17:59:49 +000014810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14811$as_echo_n "checking for is_term_resized... " >&6; }
14812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014813/* end confdefs.h. */
14814#include <curses.h>
14815int
14816main ()
14817{
14818void *x=is_term_resized
14819 ;
14820 return 0;
14821}
14822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014826
Matthias Kloseb159a552010-04-25 21:00:44 +000014827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014828$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14831$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014832
14833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14837$as_echo_n "checking for resize_term... " >&6; }
14838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014839/* end confdefs.h. */
14840#include <curses.h>
14841int
14842main ()
14843{
14844void *x=resize_term
14845 ;
14846 return 0;
14847}
14848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014849if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014852
Matthias Kloseb159a552010-04-25 21:00:44 +000014853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014854$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014855else
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14857$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014858
14859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14863$as_echo_n "checking for resizeterm... " >&6; }
14864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014865/* end confdefs.h. */
14866#include <curses.h>
14867int
14868main ()
14869{
14870void *x=resizeterm
14871 ;
14872 return 0;
14873}
14874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014875if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014878
Matthias Kloseb159a552010-04-25 21:00:44 +000014879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014880$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14883$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014884
14885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014887# last curses configure check
14888CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14891$as_echo "$as_me: checking for device files" >&6;}
14892
14893if test "x$cross_compiling" = xyes; then
14894 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14896$as_echo_n "checking for /dev/ptmx... " >&6; }
14897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14898$as_echo "not set" >&6; }
14899 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14900 fi
14901 if test "${ac_cv_file__dev_ptc+set}" != set; then
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14903$as_echo_n "checking for /dev/ptc... " >&6; }
14904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14905$as_echo "not set" >&6; }
14906 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14907 fi
14908fi
14909
Matthias Kloseb9621712010-04-24 17:59:49 +000014910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14911$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014912if ${ac_cv_file__dev_ptmx+:} false; then :
14913 $as_echo_n "(cached) " >&6
14914else
14915 test "$cross_compiling" = yes &&
14916 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14917if test -r "/dev/ptmx"; then
14918 ac_cv_file__dev_ptmx=yes
14919else
14920 ac_cv_file__dev_ptmx=no
14921fi
14922fi
14923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14924$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14925if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014926
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014927fi
14928
14929if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014930
Matthias Kloseb9621712010-04-24 17:59:49 +000014931$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014932
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14935$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014936if ${ac_cv_file__dev_ptc+:} false; then :
14937 $as_echo_n "(cached) " >&6
14938else
14939 test "$cross_compiling" = yes &&
14940 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14941if test -r "/dev/ptc"; then
14942 ac_cv_file__dev_ptc=yes
14943else
14944 ac_cv_file__dev_ptc=no
14945fi
14946fi
14947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14948$as_echo "$ac_cv_file__dev_ptc" >&6; }
14949if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014950
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014951fi
14952
14953if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014954
Matthias Kloseb9621712010-04-24 17:59:49 +000014955$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014956
Neal Norwitz865400f2003-03-21 01:42:58 +000014957fi
14958
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014959if test "$have_long_long" = yes
14960then
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14962$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014963 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014965else
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014967 ac_cv_have_long_long_format="cross -- assuming no"
14968 if test x$GCC = xyes; then
14969 save_CFLAGS=$CFLAGS
14970 CFLAGS="$CFLAGS -Werror -Wformat"
14971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14972/* end confdefs.h. */
14973
14974 #include <stdio.h>
14975 #include <stddef.h>
14976
14977int
14978main ()
14979{
14980
14981 char *buffer;
14982 sprintf(buffer, "%lld", (long long)123);
14983 sprintf(buffer, "%lld", (long long)-123);
14984 sprintf(buffer, "%llu", (unsigned long long)123);
14985
14986 ;
14987 return 0;
14988}
14989_ACEOF
14990if ac_fn_c_try_compile "$LINENO"; then :
14991 ac_cv_have_long_long_format=yes
14992
14993fi
14994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14995 CFLAGS=$save_CFLAGS
14996 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014997else
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014999/* end confdefs.h. */
15000
15001 #include <stdio.h>
15002 #include <stddef.h>
15003 #include <string.h>
15004
15005 #ifdef HAVE_SYS_TYPES_H
15006 #include <sys/types.h>
15007 #endif
15008
15009 int main()
15010 {
15011 char buffer[256];
15012
15013 if (sprintf(buffer, "%lld", (long long)123) < 0)
15014 return 1;
15015 if (strcmp(buffer, "123"))
15016 return 1;
15017
15018 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15019 return 1;
15020 if (strcmp(buffer, "-123"))
15021 return 1;
15022
15023 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15024 return 1;
15025 if (strcmp(buffer, "123"))
15026 return 1;
15027
15028 return 0;
15029 }
15030
15031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015032if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015033 ac_cv_have_long_long_format=yes
15034else
Matthias Kloseb9621712010-04-24 17:59:49 +000015035 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015039fi
15040
15041
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015042fi
15043
Matthias Kloseb9621712010-04-24 17:59:49 +000015044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15045$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015046fi
15047
Mark Dickinson89d7d412009-12-31 20:50:59 +000015048if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015049then
15050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015052
15053fi
15054
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015055if test $ac_sys_system = Darwin
15056then
15057 LIBS="$LIBS -framework CoreFoundation"
15058fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15061$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015062if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015064else
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015066 ac_cv_have_size_t_format="cross -- assuming yes"
15067
Thomas Wouters477c8d52006-05-27 19:21:47 +000015068else
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015070/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015071
Thomas Wouters477c8d52006-05-27 19:21:47 +000015072#include <stdio.h>
15073#include <stddef.h>
15074#include <string.h>
15075
Christian Heimes2c181612007-12-17 20:04:13 +000015076#ifdef HAVE_SYS_TYPES_H
15077#include <sys/types.h>
15078#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015079
15080#ifdef HAVE_SSIZE_T
15081typedef ssize_t Py_ssize_t;
15082#elif SIZEOF_VOID_P == SIZEOF_LONG
15083typedef long Py_ssize_t;
15084#else
15085typedef int Py_ssize_t;
15086#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015087
Christian Heimes2c181612007-12-17 20:04:13 +000015088int main()
15089{
15090 char buffer[256];
15091
Thomas Wouters477c8d52006-05-27 19:21:47 +000015092 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15093 return 1;
15094
Thomas Wouters89f507f2006-12-13 04:49:30 +000015095 if (strcmp(buffer, "123"))
15096 return 1;
15097
15098 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15099 return 1;
15100
15101 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015102 return 1;
15103
15104 return 0;
15105}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015106
Thomas Wouters477c8d52006-05-27 19:21:47 +000015107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015108if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015109 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015110else
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015115fi
15116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15119$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015120if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015121
Matthias Kloseb9621712010-04-24 17:59:49 +000015122$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015123
15124fi
15125
Matthias Kloseb9621712010-04-24 17:59:49 +000015126ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015127#ifdef HAVE_SYS_TYPES_H
15128#include <sys/types.h>
15129#endif
15130#ifdef HAVE_SYS_SOCKET_H
15131#include <sys/socket.h>
15132#endif
15133
Matthias Kloseb9621712010-04-24 17:59:49 +000015134"
Victor Stinnere0be4232011-10-25 13:06:09 +020015135if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015136
Martin v. Löwis11437992002-04-12 09:54:03 +000015137else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015140
15141fi
15142
Michael W. Hudson54241132001-12-07 15:38:26 +000015143
Matthias Kloseb9621712010-04-24 17:59:49 +000015144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15145$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015146if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015148else
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015150 ac_cv_broken_mbstowcs=no
15151else
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015153/* end confdefs.h. */
15154
Stefan Krah19c21392012-11-22 23:47:32 +010015155#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015156#include<stdlib.h>
15157int main() {
15158 size_t len = -1;
15159 const char *str = "text";
15160 len = mbstowcs(NULL, str, 0);
15161 return (len != 4);
15162}
15163
15164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015165if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015166 ac_cv_broken_mbstowcs=no
15167else
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15171 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015172fi
15173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015174fi
15175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15177$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015178if test "$ac_cv_broken_mbstowcs" = yes
15179then
15180
Matthias Kloseb9621712010-04-24 17:59:49 +000015181$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015182
15183fi
15184
Antoine Pitroub52ec782009-01-25 16:34:23 +000015185# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15187$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015188
15189# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015190if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015191 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015192if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015193then
15194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015196
Matthias Kloseb9621712010-04-24 17:59:49 +000015197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15198$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015199fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015200if test "$withval" = no
15201then
15202
15203$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15206$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015207fi
15208
Antoine Pitrou042b1282010-08-13 21:15:58 +000015209else
15210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15211$as_echo "no value specified" >&6; }
15212fi
15213
Antoine Pitroub52ec782009-01-25 16:34:23 +000015214
Matthias Kloseb17289e2012-03-15 19:51:34 +010015215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15216$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15217if ${ac_cv_computed_gotos+:} false; then :
15218 $as_echo_n "(cached) " >&6
15219else
15220 if test "$cross_compiling" = yes; then :
15221 if test "${with_computed_gotos+set}" = set; then
15222 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15223 else
15224 ac_cv_computed_gotos=no
15225 fi
15226else
15227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15228/* end confdefs.h. */
15229
15230int main(int argc, char **argv)
15231{
15232 static void *targets[1] = { &&LABEL1 };
15233 goto LABEL2;
15234LABEL1:
15235 return 0;
15236LABEL2:
15237 goto *targets[0];
15238 return 1;
15239}
15240
15241_ACEOF
15242if ac_fn_c_try_run "$LINENO"; then :
15243 ac_cv_computed_gotos=yes
15244else
15245 ac_cv_computed_gotos=no
15246fi
15247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15248 conftest.$ac_objext conftest.beam conftest.$ac_ext
15249fi
15250
15251fi
15252
15253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15254$as_echo "$ac_cv_computed_gotos" >&6; }
15255case "$ac_cv_computed_gotos" in yes*)
15256
15257$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15258
15259esac
15260
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015261case $ac_sys_system in
15262AIX*)
15263
15264$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15265 ;;
15266esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015267
Michael W. Hudson54241132001-12-07 15:38:26 +000015268
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015269
15270
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015271for h in `(cd $srcdir;echo Python/thread_*.h)`
15272do
15273 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15274done
15275
Michael W. Hudson54241132001-12-07 15:38:26 +000015276
Neal Norwitzd24499d2005-12-18 21:36:39 +000015277SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15279$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015280for dir in $SRCDIRS; do
15281 if test ! -d $dir; then
15282 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015283 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015284done
Matthias Kloseb9621712010-04-24 17:59:49 +000015285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15286$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015287
Stefan Krah1919b7e2012-03-21 18:25:23 +010015288# Availability of -O2:
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15290$as_echo_n "checking for -O2... " >&6; }
15291saved_cflags="$CFLAGS"
15292CFLAGS="-O2"
15293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15294/* end confdefs.h. */
15295
15296int
15297main ()
15298{
15299
15300
15301 ;
15302 return 0;
15303}
15304_ACEOF
15305if ac_fn_c_try_compile "$LINENO"; then :
15306 have_O2=yes
15307else
15308 have_O2=no
15309fi
15310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15312$as_echo "$have_O2" >&6; }
15313CFLAGS="$saved_cflags"
15314
15315# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15316# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15318$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15319saved_cflags="$CFLAGS"
15320CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15321if test "$have_O2" = no; then
15322 CFLAGS=""
15323fi
15324if test "$cross_compiling" = yes; then :
15325 have_glibc_memmove_bug=undefined
15326else
15327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15328/* end confdefs.h. */
15329
15330#include <stdio.h>
15331#include <stdlib.h>
15332#include <string.h>
15333void foo(void *p, void *q) { memmove(p, q, 19); }
15334int main() {
15335 char a[32] = "123456789000000000";
15336 foo(&a[9], a);
15337 if (strcmp(a, "123456789123456789000000000") != 0)
15338 return 1;
15339 foo(a, &a[9]);
15340 if (strcmp(a, "123456789000000000") != 0)
15341 return 1;
15342 return 0;
15343}
15344
15345_ACEOF
15346if ac_fn_c_try_run "$LINENO"; then :
15347 have_glibc_memmove_bug=no
15348else
15349 have_glibc_memmove_bug=yes
15350fi
15351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15352 conftest.$ac_objext conftest.beam conftest.$ac_ext
15353fi
15354
15355CFLAGS="$saved_cflags"
15356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15357$as_echo "$have_glibc_memmove_bug" >&6; }
15358if test "$have_glibc_memmove_bug" = yes; then
15359
15360$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15361
15362fi
15363
15364if test "$have_gcc_asm_for_x87" = yes; then
15365 # Some versions of gcc miscompile inline asm:
15366 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15367 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15368 case $CC in
15369 *gcc*)
15370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15371$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15372 saved_cflags="$CFLAGS"
15373 CFLAGS="-O2"
15374 if test "$cross_compiling" = yes; then :
15375 have_ipa_pure_const_bug=undefined
15376else
15377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15378/* end confdefs.h. */
15379
15380 __attribute__((noinline)) int
15381 foo(int *p) {
15382 int r;
15383 asm ( "movl \$6, (%1)\n\t"
15384 "xorl %0, %0\n\t"
15385 : "=r" (r) : "r" (p) : "memory"
15386 );
15387 return r;
15388 }
15389 int main() {
15390 int p = 8;
15391 if ((foo(&p) ? : p) != 6)
15392 return 1;
15393 return 0;
15394 }
15395
15396_ACEOF
15397if ac_fn_c_try_run "$LINENO"; then :
15398 have_ipa_pure_const_bug=no
15399else
15400 have_ipa_pure_const_bug=yes
15401fi
15402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15403 conftest.$ac_objext conftest.beam conftest.$ac_ext
15404fi
15405
15406 CFLAGS="$saved_cflags"
15407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15408$as_echo "$have_ipa_pure_const_bug" >&6; }
15409 if test "$have_ipa_pure_const_bug" = yes; then
15410
15411$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15412
15413 fi
15414 ;;
15415 esac
15416fi
15417
Ned Deily322f5ba2013-11-21 23:01:59 -080015418# ensurepip option
15419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15420$as_echo_n "checking for ensurepip... " >&6; }
15421
15422# Check whether --with-ensurepip was given.
15423if test "${with_ensurepip+set}" = set; then :
15424 withval=$with_ensurepip;
15425else
15426 with_ensurepip=upgrade
15427fi
15428
15429case $with_ensurepip in #(
15430 yes|upgrade) :
15431 ENSUREPIP=upgrade ;; #(
15432 install) :
15433 ENSUREPIP=install ;; #(
15434 no) :
15435 ENSUREPIP=no ;; #(
15436 *) :
15437 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15438esac
15439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15440$as_echo "$ENSUREPIP" >&6; }
15441
15442
Guido van Rossum627b2d71993-12-24 10:39:16 +000015443# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015444ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015445
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015446ac_config_files="$ac_config_files Modules/ld_so_aix"
15447
Martin v. Löwis11437992002-04-12 09:54:03 +000015448cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015449# This file is a shell script that caches the results of configure
15450# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015451# scripts and configure runs, see configure's option --config-cache.
15452# It is not useful on other systems. If it contains results you don't
15453# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015454#
Martin v. Löwis11437992002-04-12 09:54:03 +000015455# config.status only pays attention to the cache file if you give it
15456# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015457#
Skip Montanaro6dead952003-09-25 14:50:04 +000015458# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015459# loading this file, other *unset* `ac_cv_foo' will be assigned the
15460# following values.
15461
15462_ACEOF
15463
Guido van Rossumf78abae1997-01-21 22:02:36 +000015464# The following way of writing the cache mishandles newlines in values,
15465# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015467# Ultrix sh set writes to stderr and can't be redirected directly,
15468# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015469(
15470 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15471 eval ac_val=\$$ac_var
15472 case $ac_val in #(
15473 *${as_nl}*)
15474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015477 esac
15478 case $ac_var in #(
15479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482 esac ;;
15483 esac
15484 done
15485
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15488 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 # `set' does not quote correctly, so add quotes: double-quote
15490 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015492 "s/'/'\\\\''/g;
15493 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015494 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 *)
15496 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015499 esac |
15500 sort
15501) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015503 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015505 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015506 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15507 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15509 :end' >>confcache
15510if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15511 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015512 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15514$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015515 if test ! -f "$cache_file" || test -h "$cache_file"; then
15516 cat confcache >"$cache_file"
15517 else
15518 case $cache_file in #(
15519 */* | ?:*)
15520 mv -f confcache "$cache_file"$$ &&
15521 mv -f "$cache_file"$$ "$cache_file" ;; #(
15522 *)
15523 mv -f confcache "$cache_file" ;;
15524 esac
15525 fi
15526 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015527 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15529$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015530 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015531fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015532rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015533
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015534test "x$prefix" = xNONE && prefix=$ac_default_prefix
15535# Let make expand exec_prefix.
15536test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015537
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015538DEFS=-DHAVE_CONFIG_H
15539
Skip Montanaro6dead952003-09-25 14:50:04 +000015540ac_libobjs=
15541ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015542U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015543for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15544 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015545 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15548 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015549 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15550 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015551done
15552LIBOBJS=$ac_libobjs
15553
15554LTLIBOBJS=$ac_ltlibobjs
15555
15556
Martin v. Löwis11437992002-04-12 09:54:03 +000015557
Matthias Kloseb9621712010-04-24 17:59:49 +000015558
Victor Stinnere0be4232011-10-25 13:06:09 +020015559: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015560ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015561ac_clean_files_save=$ac_clean_files
15562ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015563{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15564$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15565as_write_fail=0
15566cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015567#! $SHELL
15568# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015569# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015570# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015571# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015574ac_cs_recheck=false
15575ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577SHELL=\${CONFIG_SHELL-$SHELL}
15578export SHELL
15579_ASEOF
15580cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15581## -------------------- ##
15582## M4sh Initialization. ##
15583## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585# Be more Bourne compatible
15586DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015587if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 emulate sh
15589 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015591 # is contrary to our usage. Disable this feature.
15592 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015593 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015594else
Matthias Kloseb9621712010-04-24 17:59:49 +000015595 case `(set -o) 2>/dev/null` in #(
15596 *posix*) :
15597 set -o posix ;; #(
15598 *) :
15599 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015601fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015602
15603
Matthias Kloseb9621712010-04-24 17:59:49 +000015604as_nl='
15605'
15606export as_nl
15607# Printing a long string crashes Solaris 7 /usr/bin/printf.
15608as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15609as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15610as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15611# Prefer a ksh shell builtin over an external printf program on Solaris,
15612# but without wasting forks for bash or zsh.
15613if test -z "$BASH_VERSION$ZSH_VERSION" \
15614 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15615 as_echo='print -r --'
15616 as_echo_n='print -rn --'
15617elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15618 as_echo='printf %s\n'
15619 as_echo_n='printf %s'
15620else
15621 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15622 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15623 as_echo_n='/usr/ucb/echo -n'
15624 else
15625 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15626 as_echo_n_body='eval
15627 arg=$1;
15628 case $arg in #(
15629 *"$as_nl"*)
15630 expr "X$arg" : "X\\(.*\\)$as_nl";
15631 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15632 esac;
15633 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15634 '
15635 export as_echo_n_body
15636 as_echo_n='sh -c $as_echo_n_body as_echo'
15637 fi
15638 export as_echo_body
15639 as_echo='sh -c $as_echo_body as_echo'
15640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
15642# The user is always right.
15643if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 PATH_SEPARATOR=:
15645 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15646 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15647 PATH_SEPARATOR=';'
15648 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015651
15652# IFS
15653# We need space, tab and new line, in precisely that order. Quoting is
15654# there to prevent editors from complaining about space-tab.
15655# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15656# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657IFS=" "" $as_nl"
15658
15659# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015660as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015661case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662 *[\\/]* ) as_myself=$0 ;;
15663 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015664for as_dir in $PATH
15665do
15666 IFS=$as_save_IFS
15667 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015668 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15669 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015670IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672 ;;
15673esac
15674# We did not find ourselves, most probably we were run as `sh COMMAND'
15675# in which case we are not to be found in the path.
15676if test "x$as_myself" = x; then
15677 as_myself=$0
15678fi
15679if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15681 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682fi
15683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684# Unset variables that we do not need and which cause bugs (e.g. in
15685# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15686# suppresses any "Segmentation fault" message there. '((' could
15687# trigger a bug in pdksh 5.2.14.
15688for as_var in BASH_ENV ENV MAIL MAILPATH
15689do eval test x\${$as_var+set} = xset \
15690 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691done
15692PS1='$ '
15693PS2='> '
15694PS4='+ '
15695
15696# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015697LC_ALL=C
15698export LC_ALL
15699LANGUAGE=C
15700export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701
Matthias Kloseb9621712010-04-24 17:59:49 +000015702# CDPATH.
15703(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15704
15705
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015706# as_fn_error STATUS ERROR [LINENO LOG_FD]
15707# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015708# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15709# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015710# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015711as_fn_error ()
15712{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015713 as_status=$1; test $as_status -eq 0 && as_status=1
15714 if test "$4"; then
15715 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15716 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015718 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 as_fn_exit $as_status
15720} # as_fn_error
15721
15722
15723# as_fn_set_status STATUS
15724# -----------------------
15725# Set $? to STATUS, without forking.
15726as_fn_set_status ()
15727{
15728 return $1
15729} # as_fn_set_status
15730
15731# as_fn_exit STATUS
15732# -----------------
15733# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15734as_fn_exit ()
15735{
15736 set +e
15737 as_fn_set_status $1
15738 exit $1
15739} # as_fn_exit
15740
15741# as_fn_unset VAR
15742# ---------------
15743# Portably unset VAR.
15744as_fn_unset ()
15745{
15746 { eval $1=; unset $1;}
15747}
15748as_unset=as_fn_unset
15749# as_fn_append VAR VALUE
15750# ----------------------
15751# Append the text in VALUE to the end of the definition contained in VAR. Take
15752# advantage of any shell optimizations that allow amortized linear growth over
15753# repeated appends, instead of the typical quadratic growth present in naive
15754# implementations.
15755if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15756 eval 'as_fn_append ()
15757 {
15758 eval $1+=\$2
15759 }'
15760else
15761 as_fn_append ()
15762 {
15763 eval $1=\$$1\$2
15764 }
15765fi # as_fn_append
15766
15767# as_fn_arith ARG...
15768# ------------------
15769# Perform arithmetic evaluation on the ARGs, and store the result in the
15770# global $as_val. Take advantage of shells that can avoid forks. The arguments
15771# must be portable across $(()) and expr.
15772if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15773 eval 'as_fn_arith ()
15774 {
15775 as_val=$(( $* ))
15776 }'
15777else
15778 as_fn_arith ()
15779 {
15780 as_val=`expr "$@" || test $? -eq 1`
15781 }
15782fi # as_fn_arith
15783
15784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785if expr a : '\(a\)' >/dev/null 2>&1 &&
15786 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15787 as_expr=expr
15788else
15789 as_expr=false
15790fi
15791
15792if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15793 as_basename=basename
15794else
15795 as_basename=false
15796fi
15797
Matthias Kloseb9621712010-04-24 17:59:49 +000015798if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15799 as_dirname=dirname
15800else
15801 as_dirname=false
15802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015804as_me=`$as_basename -- "$0" ||
15805$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15806 X"$0" : 'X\(//\)$' \| \
15807 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015808$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809 sed '/^.*\/\([^/][^/]*\)\/*$/{
15810 s//\1/
15811 q
15812 }
15813 /^X\/\(\/\/\)$/{
15814 s//\1/
15815 q
15816 }
15817 /^X\/\(\/\).*/{
15818 s//\1/
15819 q
15820 }
15821 s/.*/./; q'`
15822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823# Avoid depending upon Character Ranges.
15824as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15825as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15826as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15827as_cr_digits='0123456789'
15828as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829
15830ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015831case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 xy) ECHO_C='\c';;
15836 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15837 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838 esac;;
15839*)
15840 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015841esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844if test -d conf$$.dir; then
15845 rm -f conf$$.dir/conf$$.file
15846else
15847 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015850if (echo >conf$$.file) 2>/dev/null; then
15851 if ln -s conf$$.file conf$$ 2>/dev/null; then
15852 as_ln_s='ln -s'
15853 # ... but there are two gotchas:
15854 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15855 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015856 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015858 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015859 elif ln conf$$.file conf$$ 2>/dev/null; then
15860 as_ln_s=ln
15861 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015862 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015864else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015865 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15868rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
Matthias Kloseb9621712010-04-24 17:59:49 +000015870
15871# as_fn_mkdir_p
15872# -------------
15873# Create "$as_dir" as a directory, including parents if necessary.
15874as_fn_mkdir_p ()
15875{
15876
15877 case $as_dir in #(
15878 -*) as_dir=./$as_dir;;
15879 esac
15880 test -d "$as_dir" || eval $as_mkdir_p || {
15881 as_dirs=
15882 while :; do
15883 case $as_dir in #(
15884 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15885 *) as_qdir=$as_dir;;
15886 esac
15887 as_dirs="'$as_qdir' $as_dirs"
15888 as_dir=`$as_dirname -- "$as_dir" ||
15889$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15890 X"$as_dir" : 'X\(//\)[^/]' \| \
15891 X"$as_dir" : 'X\(//\)$' \| \
15892 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15893$as_echo X"$as_dir" |
15894 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15895 s//\1/
15896 q
15897 }
15898 /^X\(\/\/\)[^/].*/{
15899 s//\1/
15900 q
15901 }
15902 /^X\(\/\/\)$/{
15903 s//\1/
15904 q
15905 }
15906 /^X\(\/\).*/{
15907 s//\1/
15908 q
15909 }
15910 s/.*/./; q'`
15911 test -d "$as_dir" && break
15912 done
15913 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015914 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015915
15916
15917} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015918if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015920else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015921 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015922 as_mkdir_p=false
15923fi
15924
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015925
15926# as_fn_executable_p FILE
15927# -----------------------
15928# Test if FILE is an executable regular file.
15929as_fn_executable_p ()
15930{
15931 test -f "$1" && test -x "$1"
15932} # as_fn_executable_p
15933as_test_x='test -x'
15934as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
15936# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015937as_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 +000015938
15939# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015940as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015941
15942
Martin v. Löwis11437992002-04-12 09:54:03 +000015943exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015944## ----------------------------------- ##
15945## Main body of $CONFIG_STATUS script. ##
15946## ----------------------------------- ##
15947_ASEOF
15948test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015949
Matthias Kloseb9621712010-04-24 17:59:49 +000015950cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15951# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015952# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015953# values after options handling.
15954ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070015955This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015956generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015957
15958 CONFIG_FILES = $CONFIG_FILES
15959 CONFIG_HEADERS = $CONFIG_HEADERS
15960 CONFIG_LINKS = $CONFIG_LINKS
15961 CONFIG_COMMANDS = $CONFIG_COMMANDS
15962 $ $0 $@
15963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015964on `(hostname || uname -n) 2>/dev/null | sed 1q`
15965"
15966
Martin v. Löwis11437992002-04-12 09:54:03 +000015967_ACEOF
15968
Matthias Kloseb9621712010-04-24 17:59:49 +000015969case $ac_config_files in *"
15970"*) set x $ac_config_files; shift; ac_config_files=$*;;
15971esac
15972
15973case $ac_config_headers in *"
15974"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15975esac
15976
15977
15978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015979# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015980config_files="$ac_config_files"
15981config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015984
Matthias Kloseb9621712010-04-24 17:59:49 +000015985cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015986ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015987\`$as_me' instantiates files and other configuration actions
15988from templates according to the current configuration. Unless the files
15989and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Matthias Kloseb9621712010-04-24 17:59:49 +000015991Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015992
15993 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015995 --config print configuration, then exit
15996 -q, --quiet, --silent
15997 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 -d, --debug don't remove temporary files
15999 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 --file=FILE[:TEMPLATE]
16001 instantiate the configuration file FILE
16002 --header=FILE[:TEMPLATE]
16003 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016004
16005Configuration files:
16006$config_files
16007
16008Configuration headers:
16009$config_headers
16010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16015ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016016ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016017python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016018configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016019 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016020
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016021Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016022This config.status script is free software; the Free Software Foundation
16023gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016024
16025ac_pwd='$ac_pwd'
16026srcdir='$srcdir'
16027INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016028MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016029test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016030_ACEOF
16031
Matthias Kloseb9621712010-04-24 17:59:49 +000016032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16033# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016034ac_need_defaults=:
16035while test $# != 0
16036do
16037 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016038 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16040 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016041 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016042 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016043 --*=)
16044 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16045 ac_optarg=
16046 ac_shift=:
16047 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016049 ac_option=$1
16050 ac_optarg=$2
16051 ac_shift=shift
16052 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016053 esac
16054
Skip Montanaro6dead952003-09-25 14:50:04 +000016055 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016057 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16058 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016060 $as_echo "$ac_cs_version"; exit ;;
16061 --config | --confi | --conf | --con | --co | --c )
16062 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016063 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016064 debug=: ;;
16065 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016066 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 case $ac_optarg in
16068 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016069 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 esac
16071 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 ac_need_defaults=false;;
16073 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016074 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016075 case $ac_optarg in
16076 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16077 esac
16078 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016080 --he | --h)
16081 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016082 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016083Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016085 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016086 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16087 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16088 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016089
16090 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016091 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016092Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016093
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016095 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
16097 esac
16098 shift
16099done
16100
Skip Montanaro6dead952003-09-25 14:50:04 +000016101ac_configure_extra_args=
16102
16103if $ac_cs_silent; then
16104 exec 6>/dev/null
16105 ac_configure_extra_args="$ac_configure_extra_args --silent"
16106fi
16107
16108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016110if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016111 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016112 shift
16113 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16114 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016115 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016116 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016117fi
16118
Martin v. Löwis11437992002-04-12 09:54:03 +000016119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016121exec 5>>config.log
16122{
16123 echo
16124 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16125## Running $as_me. ##
16126_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016131cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016132_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016133
Matthias Kloseb9621712010-04-24 17:59:49 +000016134cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016135
16136# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016137for ac_config_target in $ac_config_targets
16138do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139 case $ac_config_target in
16140 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16141 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16142 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016143 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16144 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16146 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016147 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016148 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016149 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150
Victor Stinnere0be4232011-10-25 13:06:09 +020016151 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016152 esac
16153done
16154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155
Martin v. Löwis11437992002-04-12 09:54:03 +000016156# If the user did not use the arguments to specify the items to instantiate,
16157# then the envvar interface is used. Set only those that are not.
16158# We use the long form for the default assignment because of an extremely
16159# bizarre bug on SunOS 4.1.3.
16160if $ac_need_defaults; then
16161 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16162 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16163fi
16164
Skip Montanaro6dead952003-09-25 14:50:04 +000016165# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016167# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168# Hook for its removal unless debugging.
16169# Note that there is a small window in which the directory will not be cleaned:
16170# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016171$debug ||
16172{
Victor Stinnere0be4232011-10-25 13:06:09 +020016173 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016175 : "${ac_tmp:=$tmp}"
16176 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016177' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016178 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016179}
Martin v. Löwis11437992002-04-12 09:54:03 +000016180# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016181
Martin v. Löwis11437992002-04-12 09:54:03 +000016182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016183 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016184 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016185} ||
16186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187 tmp=./conf$$-$RANDOM
16188 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016189} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016190ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016191
Matthias Kloseb9621712010-04-24 17:59:49 +000016192# Set up the scripts for CONFIG_FILES section.
16193# No need to generate them if there are no CONFIG_FILES.
16194# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016196
Matthias Kloseb9621712010-04-24 17:59:49 +000016197
16198ac_cr=`echo X | tr X '\015'`
16199# On cygwin, bash can eat \r inside `` if the user requested igncr.
16200# But we know of no other shell where ac_cr would be empty at this
16201# point, so we can use a bashism as a fallback.
16202if test "x$ac_cr" = x; then
16203 eval ac_cr=\$\'\\r\'
16204fi
16205ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16206if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016207 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016208else
16209 ac_cs_awk_cr=$ac_cr
16210fi
16211
Victor Stinnere0be4232011-10-25 13:06:09 +020016212echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016213_ACEOF
16214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215
Matthias Kloseb9621712010-04-24 17:59:49 +000016216{
16217 echo "cat >conf$$subs.awk <<_ACEOF" &&
16218 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16219 echo "_ACEOF"
16220} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016221 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16222ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016223ac_delim='%!_!# '
16224for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016225 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016226 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227
Matthias Kloseb9621712010-04-24 17:59:49 +000016228 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16229 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 break
16231 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016232 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 else
16234 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236done
Matthias Kloseb9621712010-04-24 17:59:49 +000016237rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238
Matthias Kloseb9621712010-04-24 17:59:49 +000016239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016240cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016242sed -n '
16243h
16244s/^/S["/; s/!.*/"]=/
16245p
16246g
16247s/^[^!]*!//
16248:repl
16249t repl
16250s/'"$ac_delim"'$//
16251t delim
16252:nl
16253h
16254s/\(.\{148\}\)..*/\1/
16255t more1
16256s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16257p
16258n
16259b repl
16260:more1
16261s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16262p
16263g
16264s/.\{148\}//
16265t nl
16266:delim
16267h
16268s/\(.\{148\}\)..*/\1/
16269t more2
16270s/["\\]/\\&/g; s/^/"/; s/$/"/
16271p
16272b
16273:more2
16274s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16275p
16276g
16277s/.\{148\}//
16278t delim
16279' <conf$$subs.awk | sed '
16280/^[^""]/{
16281 N
16282 s/\n//
16283}
16284' >>$CONFIG_STATUS || ac_write_fail=1
16285rm -f conf$$subs.awk
16286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16287_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016288cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016289 for (key in S) S_is_set[key] = 1
16290 FS = ""
16291
16292}
16293{
16294 line = $ 0
16295 nfields = split(line, field, "@")
16296 substed = 0
16297 len = length(field[1])
16298 for (i = 2; i < nfields; i++) {
16299 key = field[i]
16300 keylen = length(key)
16301 if (S_is_set[key]) {
16302 value = S[key]
16303 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16304 len += length(value) + length(field[++i])
16305 substed = 1
16306 } else
16307 len += 1 + keylen
16308 }
16309
16310 print line
16311}
16312
16313_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016315cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16316if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16317 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16318else
16319 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016320fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016321 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016322_ACEOF
16323
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016324# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16325# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326# trailing colons and then remove the whole line if VPATH becomes empty
16327# (actually we leave an empty line to preserve line numbers).
16328if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016329 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16330h
16331s///
16332s/^/:/
16333s/[ ]*$/:/
16334s/:\$(srcdir):/:/g
16335s/:\${srcdir}:/:/g
16336s/:@srcdir@:/:/g
16337s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016339x
16340s/\(=[ ]*\).*/\1/
16341G
16342s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343s/^[^=]*=[ ]*$//
16344}'
16345fi
16346
Matthias Kloseb9621712010-04-24 17:59:49 +000016347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016348fi # test -n "$CONFIG_FILES"
16349
Matthias Kloseb9621712010-04-24 17:59:49 +000016350# Set up the scripts for CONFIG_HEADERS section.
16351# No need to generate them if there are no CONFIG_HEADERS.
16352# This happens for instance with `./config.status Makefile'.
16353if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016354cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016355BEGIN {
16356_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357
Matthias Kloseb9621712010-04-24 17:59:49 +000016358# Transform confdefs.h into an awk script `defines.awk', embedded as
16359# here-document in config.status, that substitutes the proper values into
16360# config.h.in to produce config.h.
16361
16362# Create a delimiter string that does not exist in confdefs.h, to ease
16363# handling of long lines.
16364ac_delim='%!_!# '
16365for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016366 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16367 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016368 break
16369 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016370 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 else
16372 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16373 fi
16374done
16375
16376# For the awk script, D is an array of macro values keyed by name,
16377# likewise P contains macro parameters if any. Preserve backslash
16378# newline sequences.
16379
16380ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16381sed -n '
16382s/.\{148\}/&'"$ac_delim"'/g
16383t rset
16384:rset
16385s/^[ ]*#[ ]*define[ ][ ]*/ /
16386t def
16387d
16388:def
16389s/\\$//
16390t bsnl
16391s/["\\]/\\&/g
16392s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16393D["\1"]=" \3"/p
16394s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16395d
16396:bsnl
16397s/["\\]/\\&/g
16398s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16399D["\1"]=" \3\\\\\\n"\\/p
16400t cont
16401s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16402t cont
16403d
16404:cont
16405n
16406s/.\{148\}/&'"$ac_delim"'/g
16407t clear
16408:clear
16409s/\\$//
16410t bsnlc
16411s/["\\]/\\&/g; s/^/"/; s/$/"/p
16412d
16413:bsnlc
16414s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16415b cont
16416' <confdefs.h | sed '
16417s/'"$ac_delim"'/"\\\
16418"/g' >>$CONFIG_STATUS || ac_write_fail=1
16419
16420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16421 for (key in D) D_is_set[key] = 1
16422 FS = ""
16423}
16424/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16425 line = \$ 0
16426 split(line, arg, " ")
16427 if (arg[1] == "#") {
16428 defundef = arg[2]
16429 mac1 = arg[3]
16430 } else {
16431 defundef = substr(arg[1], 2)
16432 mac1 = arg[2]
16433 }
16434 split(mac1, mac2, "(") #)
16435 macro = mac2[1]
16436 prefix = substr(line, 1, index(line, defundef) - 1)
16437 if (D_is_set[macro]) {
16438 # Preserve the white space surrounding the "#".
16439 print prefix "define", macro P[macro] D[macro]
16440 next
16441 } else {
16442 # Replace #undef with comments. This is necessary, for example,
16443 # in the case of _POSIX_SOURCE, which is predefined and required
16444 # on some systems where configure will not decide to define it.
16445 if (defundef == "undef") {
16446 print "/*", prefix defundef, macro, "*/"
16447 next
16448 }
16449 }
16450}
16451{ print }
16452_ACAWK
16453_ACEOF
16454cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016455 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016456fi # test -n "$CONFIG_HEADERS"
16457
16458
16459eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16460shift
16461for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016462do
16463 case $ac_tag in
16464 :[FHLC]) ac_mode=$ac_tag; continue;;
16465 esac
16466 case $ac_mode$ac_tag in
16467 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016468 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016469 :[FH]-) ac_tag=-:-;;
16470 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16471 esac
16472 ac_save_IFS=$IFS
16473 IFS=:
16474 set x $ac_tag
16475 IFS=$ac_save_IFS
16476 shift
16477 ac_file=$1
16478 shift
16479
16480 case $ac_mode in
16481 :L) ac_source=$1;;
16482 :[FH])
16483 ac_file_inputs=
16484 for ac_f
16485 do
16486 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016487 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488 *) # Look for the file first in the build tree, then in the source tree
16489 # (if the path is not absolute). The absolute path cannot be DOS-style,
16490 # because $ac_f cannot contain `:'.
16491 test -f "$ac_f" ||
16492 case $ac_f in
16493 [\\/$]*) false;;
16494 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16495 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016496 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016497 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16499 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016500 done
16501
16502 # Let's still pretend it is `configure' which instantiates (i.e., don't
16503 # use $as_me), people would be surprised to read:
16504 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016505 configure_input='Generated from '`
16506 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16507 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508 if test x"$ac_file" != x-; then
16509 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016510 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16511$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016513 # Neutralize special characters interpreted by sed in replacement strings.
16514 case $configure_input in #(
16515 *\&* | *\|* | *\\* )
16516 ac_sed_conf_input=`$as_echo "$configure_input" |
16517 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16518 *) ac_sed_conf_input=$configure_input;;
16519 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520
16521 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016522 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16523 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524 esac
16525 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 esac
16527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016529$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016530 X"$ac_file" : 'X\(//\)[^/]' \| \
16531 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016533$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16535 s//\1/
16536 q
16537 }
16538 /^X\(\/\/\)[^/].*/{
16539 s//\1/
16540 q
16541 }
16542 /^X\(\/\/\)$/{
16543 s//\1/
16544 q
16545 }
16546 /^X\(\/\).*/{
16547 s//\1/
16548 q
16549 }
16550 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016551 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016552 ac_builddir=.
16553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554case "$ac_dir" in
16555.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16556*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016557 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016559 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560 case $ac_top_builddir_sub in
16561 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16562 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16563 esac ;;
16564esac
16565ac_abs_top_builddir=$ac_pwd
16566ac_abs_builddir=$ac_pwd$ac_dir_suffix
16567# for backward compatibility:
16568ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016569
16570case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016571 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016572 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 ac_top_srcdir=$ac_top_builddir_sub
16574 ac_abs_top_srcdir=$ac_pwd ;;
16575 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016576 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577 ac_top_srcdir=$srcdir
16578 ac_abs_top_srcdir=$srcdir ;;
16579 *) # Relative name.
16580 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16581 ac_top_srcdir=$ac_top_build_prefix$srcdir
16582 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016583esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016585
Martin v. Löwis11437992002-04-12 09:54:03 +000016586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587 case $ac_mode in
16588 :F)
16589 #
16590 # CONFIG_FILE
16591 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016592
16593 case $INSTALL in
16594 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016597 ac_MKDIR_P=$MKDIR_P
16598 case $MKDIR_P in
16599 [\\/$]* | ?:[\\/]* ) ;;
16600 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16601 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016602_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603
Matthias Kloseb9621712010-04-24 17:59:49 +000016604cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605# If the template does not know about datarootdir, expand it.
16606# FIXME: This hack should be removed a few years after 2.60.
16607ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016608ac_sed_dataroot='
16609/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610 p
16611 q
16612}
16613/@datadir@/p
16614/@docdir@/p
16615/@infodir@/p
16616/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016617/@mandir@/p'
16618case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619*datarootdir*) ac_datarootdir_seen=yes;;
16620*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016621 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16622$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625 ac_datarootdir_hack='
16626 s&@datadir@&$datadir&g
16627 s&@docdir@&$docdir&g
16628 s&@infodir@&$infodir&g
16629 s&@localedir@&$localedir&g
16630 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016631 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016632esac
16633_ACEOF
16634
16635# Neutralize VPATH when `$srcdir' = `.'.
16636# Shell code in configure.ac might set extrasub.
16637# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016638cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16639ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016640$extrasub
16641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016643:t
16644/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016645s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016646s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016647s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016648s&@srcdir@&$ac_srcdir&;t t
16649s&@abs_srcdir@&$ac_abs_srcdir&;t t
16650s&@top_srcdir@&$ac_top_srcdir&;t t
16651s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16652s&@builddir@&$ac_builddir&;t t
16653s&@abs_builddir@&$ac_abs_builddir&;t t
16654s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16655s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016656s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016657$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016658"
Victor Stinnere0be4232011-10-25 13:06:09 +020016659eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16660 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016663 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16664 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16665 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016667which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016668$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016669which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016670
Victor Stinnere0be4232011-10-25 13:06:09 +020016671 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016672 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016673 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16674 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016676 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677 ;;
16678 :H)
16679 #
16680 # CONFIG_HEADER
16681 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016683 {
16684 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016685 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16686 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016687 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016688 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016689 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16690$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016691 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016692 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016693 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016694 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 fi
16696 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016697 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016698 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016699 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016700 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703
16704 esac
16705
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016706
16707 case $ac_file$ac_mode in
16708 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16709
16710 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711done # for ac_tag
16712
Guido van Rossum627b2d71993-12-24 10:39:16 +000016713
Matthias Kloseb9621712010-04-24 17:59:49 +000016714as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016715_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016716ac_clean_files=$ac_clean_files_save
16717
Matthias Kloseb9621712010-04-24 17:59:49 +000016718test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016719 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016720
Martin v. Löwis11437992002-04-12 09:54:03 +000016721
16722# configure is writing to config.log, and then calls config.status.
16723# config.status does its own redirection, appending to config.log.
16724# Unfortunately, on DOS this fails, as config.log is still kept open
16725# by configure, so config.status won't be able to write to it; its
16726# output is simply discarded. So we exec the FD to /dev/null,
16727# effectively closing config.log, so it can be properly (re)opened and
16728# appended to by config.status. When coming back to configure, we
16729# need to make the FD available again.
16730if test "$no_create" != yes; then
16731 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016732 ac_config_status_args=
16733 test "$silent" = yes &&
16734 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016736 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 exec 5>>config.log
16738 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16739 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016740 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016741fi
16742if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16744$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016745fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016746
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016747
Christian Heimes75ed8902013-11-20 01:11:18 +010016748echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016749if test ! -f Modules/Setup
16750then
16751 cp $srcdir/Modules/Setup.dist Modules/Setup
16752fi
16753
Christian Heimes75ed8902013-11-20 01:11:18 +010016754echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016755if test ! -f Modules/Setup.local
16756then
16757 echo "# Edit this file for local setup changes" >Modules/Setup.local
16758fi
16759
Christian Heimes75ed8902013-11-20 01:11:18 +010016760echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016761$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16762 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016763 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016764mv config.c Modules