blob: 26b89112dcf65ee6dde359ac0ad92f2856101f81 [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
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530676OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200677PYTHON
678ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200679ac_ct_READELF
680READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000681ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200682ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000683AR
684RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000685USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000686GNULD
687LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000689RUNSHARED
690INSTSONAME
691LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000692PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100697MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000698BUILDEXEEXT
699EGREP
700GREP
701CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200702NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000704MAINCC
705CXX
706OBJEXT
707EXEEXT
708ac_ct_CC
709CPPFLAGS
710LDFLAGS
711CFLAGS
712CC
713EXPORT_MACOSX_DEPLOYMENT_TARGET
714CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1345d202015-04-13 21:59:57 +0200715PLATDIR
Matthias Kloseb9621712010-04-24 17:59:49 +0000716SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200717_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000719FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000720FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800721FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000722FRAMEWORKALTINSTALLLAST
723FRAMEWORKALTINSTALLFIRST
724FRAMEWORKINSTALLLAST
725FRAMEWORKINSTALLFIRST
726PYTHONFRAMEWORKINSTALLDIR
727PYTHONFRAMEWORKPREFIX
728PYTHONFRAMEWORKDIR
729PYTHONFRAMEWORKIDENTIFIER
730PYTHONFRAMEWORK
731LIPO_32BIT_FLAGS
732ARCH_RUN_32BIT
733UNIVERSALSDK
734CONFIG_ARGS
735SOVERSION
736VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200737PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100738host_os
739host_vendor
740host_cpu
741host
742build_os
743build_vendor
744build_cpu
745build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500746HAS_HG
747HGBRANCH
748HGTAG
749HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400750BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000751target_alias
752host_alias
753build_alias
754LIBS
755ECHO_T
756ECHO_N
757ECHO_C
758DEFS
759mandir
760localedir
761libdir
762psdir
763pdfdir
764dvidir
765htmldir
766infodir
767docdir
768oldincludedir
769includedir
770localstatedir
771sharedstatedir
772sysconfdir
773datadir
774datarootdir
775libexecdir
776sbindir
777bindir
778program_transform_name
779prefix
780exec_prefix
781PACKAGE_URL
782PACKAGE_BUGREPORT
783PACKAGE_STRING
784PACKAGE_VERSION
785PACKAGE_TARNAME
786PACKAGE_NAME
787PATH_SEPARATOR
788SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000789ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000790ac_user_opts='
791enable_option_checking
792enable_universalsdk
793with_universal_archs
794with_framework_name
795enable_framework
796with_gcc
797with_cxx_main
798with_suffix
799enable_shared
800enable_profiling
801with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100802with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100803with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_libs
805with_system_expat
806with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100807with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000808enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700809with_tcltk_includes
810with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_dbmliborder
812with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_threads
814with_thread
815enable_ipv6
816with_doc_strings
817with_tsc
818with_pymalloc
819with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_fpectl
821with_libm
822with_libc
823enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800825with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000826'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827 ac_precious_vars='build_alias
828host_alias
829target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100830MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831CC
832CFLAGS
833LDFLAGS
834LIBS
835CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100836CPP
837PKG_CONFIG
838PKG_CONFIG_PATH
839PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000843ac_init_help=
844ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000845ac_unrecognized_opts=
846ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847# The variables have the same names as the options, with
848# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000849cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852no_recursion=
853prefix=NONE
854program_prefix=NONE
855program_suffix=NONE
856program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861x_includes=NONE
862x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000863
864# Installation directory options.
865# These are left unexpanded so users can "make install exec_prefix=/foo"
866# and all the variables that are supposed to be based on exec_prefix
867# by default will actually change.
868# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870bindir='${exec_prefix}/bin'
871sbindir='${exec_prefix}/sbin'
872libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873datarootdir='${prefix}/share'
874datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875sysconfdir='${prefix}/etc'
876sharedstatedir='${prefix}/com'
877localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878includedir='${prefix}/include'
879oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
881infodir='${datarootdir}/info'
882htmldir='${docdir}'
883dvidir='${docdir}'
884pdfdir='${docdir}'
885psdir='${docdir}'
886libdir='${exec_prefix}/lib'
887localedir='${datarootdir}/locale'
888mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000893do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894 # If the previous option needs an argument, assign it.
895 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 ac_prev=
898 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000899 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200902 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
903 *=) ac_optarg= ;;
904 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Accept the important Cygnus configure options, so we can diagnose typos.
908
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909 case $ac_dashdash$ac_option in
910 --)
911 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913 -bindir | --bindir | --bindi | --bind | --bin | --bi)
914 ac_prev=bindir ;;
915 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 -cache-file | --cache-file | --cache-fil | --cache-fi \
924 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
925 ac_prev=cache_file ;;
926 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
927 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 cache_file=$ac_optarg ;;
929
930 --config-cache | -C)
931 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
939 | --dataroo | --dataro | --datar)
940 ac_prev=datarootdir ;;
941 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
942 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
943 datarootdir=$ac_optarg ;;
944
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000946 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000948 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200949 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000950 ac_useropt_orig=$ac_useropt
951 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
952 case $ac_user_opts in
953 *"
954"enable_$ac_useropt"
955"*) ;;
956 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
957 ac_unrecognized_sep=', ';;
958 esac
959 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960
961 -docdir | --docdir | --docdi | --doc | --do)
962 ac_prev=docdir ;;
963 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
964 docdir=$ac_optarg ;;
965
966 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
967 ac_prev=dvidir ;;
968 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
969 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
971 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200975 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000976 ac_useropt_orig=$ac_useropt
977 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
978 case $ac_user_opts in
979 *"
980"enable_$ac_useropt"
981"*) ;;
982 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
983 ac_unrecognized_sep=', ';;
984 esac
985 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
988 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
989 | --exec | --exe | --ex)
990 ac_prev=exec_prefix ;;
991 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
992 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
993 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Obsolete; use --with-gas.
998 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 -help | --help | --hel | --he | -h)
1001 ac_init_help=long ;;
1002 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1003 ac_init_help=recursive ;;
1004 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1005 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
1007 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001012 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1013 ac_prev=htmldir ;;
1014 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1015 | --ht=*)
1016 htmldir=$ac_optarg ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -includedir | --includedir | --includedi | --included | --include \
1019 | --includ | --inclu | --incl | --inc)
1020 ac_prev=includedir ;;
1021 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1022 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -infodir | --infodir | --infodi | --infod | --info | --inf)
1026 ac_prev=infodir ;;
1027 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -libdir | --libdir | --libdi | --libd)
1031 ac_prev=libdir ;;
1032 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1036 | --libexe | --libex | --libe)
1037 ac_prev=libexecdir ;;
1038 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1039 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 -localedir | --localedir | --localedi | --localed | --locale)
1043 ac_prev=localedir ;;
1044 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1045 localedir=$ac_optarg ;;
1046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001048 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 ac_prev=localstatedir ;;
1050 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001051 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1055 ac_prev=mandir ;;
1056 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060 # Obsolete; use --without-fp.
1061 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065 no_create=yes ;;
1066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1068 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1069 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1072 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1073 | --oldin | --oldi | --old | --ol | --o)
1074 ac_prev=oldincludedir ;;
1075 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1076 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1077 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1081 ac_prev=prefix ;;
1082 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1086 | --program-pre | --program-pr | --program-p)
1087 ac_prev=program_prefix ;;
1088 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1089 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1093 | --program-suf | --program-su | --program-s)
1094 ac_prev=program_suffix ;;
1095 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1096 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
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)
1106 ac_prev=program_transform_name ;;
1107 -program-transform-name=* | --program-transform-name=* \
1108 | --program-transform-nam=* | --program-transform-na=* \
1109 | --program-transform-n=* | --program-transform-=* \
1110 | --program-transform=* | --program-transfor=* \
1111 | --program-transfo=* | --program-transf=* \
1112 | --program-trans=* | --program-tran=* \
1113 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001116 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1117 ac_prev=pdfdir ;;
1118 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1119 pdfdir=$ac_optarg ;;
1120
1121 -psdir | --psdir | --psdi | --psd | --ps)
1122 ac_prev=psdir ;;
1123 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1124 psdir=$ac_optarg ;;
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1127 | -silent | --silent | --silen | --sile | --sil)
1128 silent=yes ;;
1129
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001130 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1131 ac_prev=sbindir ;;
1132 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1133 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135
1136 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1137 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1138 | --sharedst | --shareds | --shared | --share | --shar \
1139 | --sha | --sh)
1140 ac_prev=sharedstatedir ;;
1141 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1142 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1143 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1144 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001147 -site | --site | --sit)
1148 ac_prev=site ;;
1149 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1153 ac_prev=srcdir ;;
1154 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1158 | --syscon | --sysco | --sysc | --sys | --sy)
1159 ac_prev=sysconfdir ;;
1160 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1161 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1170 verbose=yes ;;
1171
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 -version | --version | --versio | --versi | --vers | -V)
1173 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001178 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001179 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001180 ac_useropt_orig=$ac_useropt
1181 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1182 case $ac_user_opts in
1183 *"
1184"with_$ac_useropt"
1185"*) ;;
1186 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1187 ac_unrecognized_sep=', ';;
1188 esac
1189 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001195 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt_orig=$ac_useropt
1197 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198 case $ac_user_opts in
1199 *"
1200"with_$ac_useropt"
1201"*) ;;
1202 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1203 ac_unrecognized_sep=', ';;
1204 esac
1205 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 --x)
1208 # Obsolete; use --with-x.
1209 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1212 | --x-incl | --x-inc | --x-in | --x-i)
1213 ac_prev=x_includes ;;
1214 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1215 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
1218 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1219 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1220 ac_prev=x_libraries ;;
1221 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1222 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1226Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227 ;;
1228
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 *=*)
1230 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1231 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 case $ac_envvar in #(
1233 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001234 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 export $ac_envvar ;;
1238
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001239 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001241 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001244 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245 ;;
1246
1247 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248done
1249
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253fi
1254
Matthias Kloseb9621712010-04-24 17:59:49 +00001255if test -n "$ac_unrecognized_opts"; then
1256 case $enable_option_checking in
1257 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1260 esac
1261fi
1262
1263# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1265 datadir sysconfdir sharedstatedir localstatedir includedir \
1266 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1267 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 # Remove trailing slashes.
1271 case $ac_val in
1272 */ )
1273 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1274 eval $ac_var=\$ac_val;;
1275 esac
1276 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 [\\/$]* | ?:[\\/]* ) continue;;
1279 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001282done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Martin v. Löwis11437992002-04-12 09:54:03 +00001284# There might be people who depend on the old broken behavior: `$host'
1285# used to hold the argument of --host etc.
1286# FIXME: To remove some day.
1287build=$build_alias
1288host=$host_alias
1289target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290
Martin v. Löwis11437992002-04-12 09:54:03 +00001291# FIXME: To remove some day.
1292if test "x$host_alias" != x; then
1293 if test "x$build_alias" = x; then
1294 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001295 elif test "x$build_alias" != "x$host_alias"; then
1296 cross_compiling=yes
1297 fi
1298fi
1299
1300ac_tool_prefix=
1301test -n "$host_alias" && ac_tool_prefix=$host_alias-
1302
1303test "$silent" = yes && exec 6>/dev/null
1304
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306ac_pwd=`pwd` && test -n "$ac_pwd" &&
1307ac_ls_di=`ls -di .` &&
1308ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001312
1313
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314# Find the source files, if location was not specified.
1315if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001316 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001318 ac_confdir=`$as_dirname -- "$as_myself" ||
1319$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1320 X"$as_myself" : 'X\(//\)[^/]' \| \
1321 X"$as_myself" : 'X\(//\)$' \| \
1322 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1323$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1325 s//\1/
1326 q
1327 }
1328 /^X\(\/\/\)[^/].*/{
1329 s//\1/
1330 q
1331 }
1332 /^X\(\/\/\)$/{
1333 s//\1/
1334 q
1335 }
1336 /^X\(\/\).*/{
1337 s//\1/
1338 q
1339 }
1340 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343 srcdir=..
1344 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345else
1346 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348if test ! -r "$srcdir/$ac_unique_file"; then
1349 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001350 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1353ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001354 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 pwd)`
1356# When building in place, set srcdir=.
1357if test "$ac_abs_confdir" = "$ac_pwd"; then
1358 srcdir=.
1359fi
1360# Remove unnecessary trailing slashes from srcdir.
1361# Double slashes in file names in object file debugging info
1362# mess up M-x gdb in Emacs.
1363case $srcdir in
1364*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1365esac
1366for ac_var in $ac_precious_vars; do
1367 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1368 eval ac_env_${ac_var}_value=\$${ac_var}
1369 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1370 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1371done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001372
Martin v. Löwis11437992002-04-12 09:54:03 +00001373#
1374# Report the --help message.
1375#
1376if test "$ac_init_help" = "long"; then
1377 # Omit some internal or obsolete options to make the list less imposing.
1378 # This message is too long to be a string in the A/UX 3.1 sh.
1379 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001380\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
1382Usage: $0 [OPTION]... [VAR=VALUE]...
1383
1384To assign environment variables (e.g., CC, CFLAGS...), specify them as
1385VAR=VALUE. See below for descriptions of some of the useful variables.
1386
1387Defaults for the options are specified in brackets.
1388
1389Configuration:
1390 -h, --help display this help and exit
1391 --help=short display options specific to this package
1392 --help=recursive display the short help of all the included packages
1393 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001394 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 --cache-file=FILE cache test results in FILE [disabled]
1396 -C, --config-cache alias for \`--cache-file=config.cache'
1397 -n, --no-create do not create output files
1398 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400Installation directories:
1401 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001402 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406By default, \`make install' will install all the files in
1407\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1408an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1409for instance \`--prefix=\$HOME'.
1410
1411For better control, use the options below.
1412
1413Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001414 --bindir=DIR user executables [EPREFIX/bin]
1415 --sbindir=DIR system admin executables [EPREFIX/sbin]
1416 --libexecdir=DIR program executables [EPREFIX/libexec]
1417 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1418 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1419 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1420 --libdir=DIR object code libraries [EPREFIX/lib]
1421 --includedir=DIR C header files [PREFIX/include]
1422 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1423 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1424 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1425 --infodir=DIR info documentation [DATAROOTDIR/info]
1426 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1427 --mandir=DIR man documentation [DATAROOTDIR/man]
1428 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1429 --htmldir=DIR html documentation [DOCDIR]
1430 --dvidir=DIR dvi documentation [DOCDIR]
1431 --pdfdir=DIR pdf documentation [DOCDIR]
1432 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433_ACEOF
1434
1435 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001436
1437System types:
1438 --build=BUILD configure for building on BUILD [guessed]
1439 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001440_ACEOF
1441fi
1442
1443if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001444 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001445 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001446 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 cat <<\_ACEOF
1448
1449Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1452 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001453 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001454 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --enable-framework[=INSTALLDIR]
1456 Build (MacOSX|Darwin) framework
1457 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001458 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001459 --enable-loadable-sqlite-extensions
1460 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --enable-ipv6 Enable ipv6 (with ipv4) support
1462 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001463 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001464 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465
1466Optional Packages:
1467 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1468 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001469 --with-universal-archs=ARCH
1470 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001471 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001472 --with-framework-name=FRAMEWORK
1473 specify an alternate name of the framework built
1474 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001476 --with-cxx-main=<compiler>
1477 compile main() and link python executable with C++
1478 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with-suffix=.exe set executable suffix
1480 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001481 --with-hash-algorithm=[fnv|siphash24]
1482 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001483 --with-address-sanitizer
1484 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001486 --with-system-expat build pyexpat module using an installed expat
1487 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001488 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001489 --with-system-libmpdec build _decimal module using an installed libmpdec
1490 library
Ned Deilyd819b932013-09-06 01:07:05 -07001491 --with-tcltk-includes='-I...'
1492 override search for Tcl and Tk include files
1493 --with-tcltk-libs='-L...'
1494 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001495 --with-dbmliborder=db1:db2:...
1496 order to check db backends for dbm. Valid value is a
1497 colon separated string with the backend names
1498 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with(out)-threads[=DIRECTORY]
1501 disable/enable thread support
1502 --with(out)-thread[=DIRECTORY]
1503 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001505 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001507 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --with-fpectl enable SIGFPE catching
1509 --with-libm=STRING math library
1510 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001511 --with(out)-computed-gotos
1512 Use computed gotos in evaluation loop (enabled by
1513 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001514 --with(out)-ensurepip=[=upgrade]
1515 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001516
1517Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001518 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 CC C compiler command
1520 CFLAGS C compiler flags
1521 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1522 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001524 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001527 PKG_CONFIG path to pkg-config utility
1528 PKG_CONFIG_PATH
1529 directories to add to pkg-config's search path
1530 PKG_CONFIG_LIBDIR
1531 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001532
1533Use these variables to override the choices made by `configure' or to help
1534it to find libraries and programs with nonstandard names/locations.
1535
Georg Brandle2e15612009-05-20 18:25:10 +00001536Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001537_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001539fi
1540
1541if test "$ac_init_help" = "recursive"; then
1542 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001544 test -d "$ac_dir" ||
1545 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1546 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 ac_builddir=.
1548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549case "$ac_dir" in
1550.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1551*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001552 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001554 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 case $ac_top_builddir_sub in
1556 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1557 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1558 esac ;;
1559esac
1560ac_abs_top_builddir=$ac_pwd
1561ac_abs_builddir=$ac_pwd$ac_dir_suffix
1562# for backward compatibility:
1563ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 ac_top_srcdir=$ac_top_builddir_sub
1569 ac_abs_top_srcdir=$ac_pwd ;;
1570 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572 ac_top_srcdir=$srcdir
1573 ac_abs_top_srcdir=$srcdir ;;
1574 *) # Relative name.
1575 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1576 ac_top_srcdir=$ac_top_build_prefix$srcdir
1577 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001578esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 cd "$ac_dir" || { ac_status=$?; continue; }
1582 # Check for guested configure.
1583 if test -f "$ac_srcdir/configure.gnu"; then
1584 echo &&
1585 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1586 elif test -f "$ac_srcdir/configure"; then
1587 echo &&
1588 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 fi || ac_status=$?
1592 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 done
1594fi
1595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001597if $ac_init_version; then
1598 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001599python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001600generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001601
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001602Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603This configure script is free software; the Free Software Foundation
1604gives unlimited permission to copy, distribute and modify it.
1605_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001608
1609## ------------------------ ##
1610## Autoconf initialization. ##
1611## ------------------------ ##
1612
1613# ac_fn_c_try_compile LINENO
1614# --------------------------
1615# Try to compile conftest.$ac_ext, and return whether this succeeded.
1616ac_fn_c_try_compile ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 rm -f conftest.$ac_objext
1620 if { { ac_try="$ac_compile"
1621case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624esac
1625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626$as_echo "$ac_try_echo"; } >&5
1627 (eval "$ac_compile") 2>conftest.err
1628 ac_status=$?
1629 if test -s conftest.err; then
1630 grep -v '^ *+' conftest.err >conftest.er1
1631 cat conftest.er1 >&5
1632 mv -f conftest.er1 conftest.err
1633 fi
1634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && {
1636 test -z "$ac_c_werror_flag" ||
1637 test ! -s conftest.err
1638 } && test -s conftest.$ac_objext; then :
1639 ac_retval=0
1640else
1641 $as_echo "$as_me: failed program was:" >&5
1642sed 's/^/| /' conftest.$ac_ext >&5
1643
1644 ac_retval=1
1645fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001646 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001647 as_fn_set_status $ac_retval
1648
1649} # ac_fn_c_try_compile
1650
Matthias Kloseb9621712010-04-24 17:59:49 +00001651# ac_fn_c_try_link LINENO
1652# -----------------------
1653# Try to link conftest.$ac_ext, and return whether this succeeded.
1654ac_fn_c_try_link ()
1655{
1656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1657 rm -f conftest.$ac_objext conftest$ac_exeext
1658 if { { ac_try="$ac_link"
1659case "(($ac_try" in
1660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1661 *) ac_try_echo=$ac_try;;
1662esac
1663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1664$as_echo "$ac_try_echo"; } >&5
1665 (eval "$ac_link") 2>conftest.err
1666 ac_status=$?
1667 if test -s conftest.err; then
1668 grep -v '^ *+' conftest.err >conftest.er1
1669 cat conftest.er1 >&5
1670 mv -f conftest.er1 conftest.err
1671 fi
1672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1673 test $ac_status = 0; } && {
1674 test -z "$ac_c_werror_flag" ||
1675 test ! -s conftest.err
1676 } && test -s conftest$ac_exeext && {
1677 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001678 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 }; then :
1680 ac_retval=0
1681else
1682 $as_echo "$as_me: failed program was:" >&5
1683sed 's/^/| /' conftest.$ac_ext >&5
1684
1685 ac_retval=1
1686fi
1687 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1688 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1689 # interfere with the next link command; also delete a directory that is
1690 # left behind by Apple's compiler. We do this before executing the actions.
1691 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_link
1696
Matthias Kloseb9621712010-04-24 17:59:49 +00001697# ac_fn_c_try_cpp LINENO
1698# ----------------------
1699# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1700ac_fn_c_try_cpp ()
1701{
1702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1703 if { { ac_try="$ac_cpp conftest.$ac_ext"
1704case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1711 ac_status=$?
1712 if test -s conftest.err; then
1713 grep -v '^ *+' conftest.err >conftest.er1
1714 cat conftest.er1 >&5
1715 mv -f conftest.er1 conftest.err
1716 fi
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001718 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1720 test ! -s conftest.err
1721 }; then :
1722 ac_retval=0
1723else
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=1
1728fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001729 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_cpp
1733
1734# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1735# -------------------------------------------------------
1736# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1737# the include files in INCLUDES and setting the cache variable VAR
1738# accordingly.
1739ac_fn_c_check_header_mongrel ()
1740{
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001742 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1744$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001745if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 $as_echo_n "(cached) " >&6
1747fi
1748eval ac_res=\$$3
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1750$as_echo "$ac_res" >&6; }
1751else
1752 # Is the header compilable?
1753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1754$as_echo_n "checking $2 usability... " >&6; }
1755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1756/* end confdefs.h. */
1757$4
1758#include <$2>
1759_ACEOF
1760if ac_fn_c_try_compile "$LINENO"; then :
1761 ac_header_compiler=yes
1762else
1763 ac_header_compiler=no
1764fi
1765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1767$as_echo "$ac_header_compiler" >&6; }
1768
1769# Is the header present?
1770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1771$as_echo_n "checking $2 presence... " >&6; }
1772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1773/* end confdefs.h. */
1774#include <$2>
1775_ACEOF
1776if ac_fn_c_try_cpp "$LINENO"; then :
1777 ac_header_preproc=yes
1778else
1779 ac_header_preproc=no
1780fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001781rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1783$as_echo "$ac_header_preproc" >&6; }
1784
1785# So? What about this header?
1786case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1787 yes:no: )
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1789$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1791$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1792 ;;
1793 no:yes:* )
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1795$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1797$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1799$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1801$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1803$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001804( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001805## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 ) | sed "s/^/$as_me: WARNING: /" >&2
1808 ;;
1809esac
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1811$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001812if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001813 $as_echo_n "(cached) " >&6
1814else
1815 eval "$3=\$ac_header_compiler"
1816fi
1817eval ac_res=\$$3
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1819$as_echo "$ac_res" >&6; }
1820fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001821 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001822
1823} # ac_fn_c_check_header_mongrel
1824
1825# ac_fn_c_try_run LINENO
1826# ----------------------
1827# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1828# that executables *can* be run.
1829ac_fn_c_try_run ()
1830{
1831 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1832 if { { ac_try="$ac_link"
1833case "(($ac_try" in
1834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1835 *) ac_try_echo=$ac_try;;
1836esac
1837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1838$as_echo "$ac_try_echo"; } >&5
1839 (eval "$ac_link") 2>&5
1840 ac_status=$?
1841 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1842 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1843 { { case "(($ac_try" in
1844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1845 *) ac_try_echo=$ac_try;;
1846esac
1847eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1848$as_echo "$ac_try_echo"; } >&5
1849 (eval "$ac_try") 2>&5
1850 ac_status=$?
1851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1852 test $ac_status = 0; }; }; then :
1853 ac_retval=0
1854else
1855 $as_echo "$as_me: program exited with status $ac_status" >&5
1856 $as_echo "$as_me: failed program was:" >&5
1857sed 's/^/| /' conftest.$ac_ext >&5
1858
1859 ac_retval=$ac_status
1860fi
1861 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001863 as_fn_set_status $ac_retval
1864
1865} # ac_fn_c_try_run
1866
1867# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1868# -------------------------------------------------------
1869# Tests whether HEADER exists and can be compiled using the include files in
1870# INCLUDES, setting the cache variable VAR accordingly.
1871ac_fn_c_check_header_compile ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001876if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 $as_echo_n "(cached) " >&6
1878else
1879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880/* end confdefs.h. */
1881$4
1882#include <$2>
1883_ACEOF
1884if ac_fn_c_try_compile "$LINENO"; then :
1885 eval "$3=yes"
1886else
1887 eval "$3=no"
1888fi
1889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1890fi
1891eval ac_res=\$$3
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1893$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001895
1896} # ac_fn_c_check_header_compile
1897
Matthias Kloseb9621712010-04-24 17:59:49 +00001898# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1899# -------------------------------------------
1900# Tests whether TYPE exists after having included INCLUDES, setting cache
1901# variable VAR accordingly.
1902ac_fn_c_check_type ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001908 $as_echo_n "(cached) " >&6
1909else
1910 eval "$3=no"
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914int
1915main ()
1916{
1917if (sizeof ($2))
1918 return 0;
1919 ;
1920 return 0;
1921}
1922_ACEOF
1923if ac_fn_c_try_compile "$LINENO"; then :
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930if (sizeof (($2)))
1931 return 0;
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937
1938else
1939 eval "$3=yes"
1940fi
1941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1942fi
1943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1944fi
1945eval ac_res=\$$3
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1947$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001948 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001949
1950} # ac_fn_c_check_type
1951
1952# ac_fn_c_find_uintX_t LINENO BITS VAR
1953# ------------------------------------
1954# Finds an unsigned integer type with width BITS, setting cache variable VAR
1955# accordingly.
1956ac_fn_c_find_uintX_t ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1960$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001961if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001962 $as_echo_n "(cached) " >&6
1963else
1964 eval "$3=no"
1965 # Order is important - never check a type that is potentially smaller
1966 # than half of the expected target width.
1967 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1968 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1970/* end confdefs.h. */
1971$ac_includes_default
1972int
1973main ()
1974{
1975static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001976test_array [0] = 0;
1977return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001978
1979 ;
1980 return 0;
1981}
1982_ACEOF
1983if ac_fn_c_try_compile "$LINENO"; then :
1984 case $ac_type in #(
1985 uint$2_t) :
1986 eval "$3=yes" ;; #(
1987 *) :
1988 eval "$3=\$ac_type" ;;
1989esac
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001992 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994else
1995 break
1996fi
1997 done
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004} # ac_fn_c_find_uintX_t
2005
2006# ac_fn_c_find_intX_t LINENO BITS VAR
2007# -----------------------------------
2008# Finds a signed integer type with width BITS, setting cache variable VAR
2009# accordingly.
2010ac_fn_c_find_intX_t ()
2011{
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2014$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002015if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002016 $as_echo_n "(cached) " >&6
2017else
2018 eval "$3=no"
2019 # Order is important - never check a type that is potentially smaller
2020 # than half of the expected target width.
2021 for ac_type in int$2_t 'int' 'long int' \
2022 'long long int' 'short int' 'signed char'; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002026 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002027int
2028main ()
2029{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002030static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002031test_array [0] = 0;
2032return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002042 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002043int
2044main ()
2045{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002046static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002047 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056
2057else
2058 case $ac_type in #(
2059 int$2_t) :
2060 eval "$3=yes" ;; #(
2061 *) :
2062 eval "$3=\$ac_type" ;;
2063esac
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002068 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002069
2070else
2071 break
2072fi
2073 done
2074fi
2075eval ac_res=\$$3
2076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2077$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002078 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002079
2080} # ac_fn_c_find_intX_t
2081
2082# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2083# --------------------------------------------
2084# Tries to find the compile-time value of EXPR in a program that includes
2085# INCLUDES, setting VAR accordingly. Returns whether the value could be
2086# computed
2087ac_fn_c_compute_int ()
2088{
2089 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2090 if test "$cross_compiling" = yes; then
2091 # Depending upon the size, compute the lo and hi bounds.
2092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002099test_array [0] = 0;
2100return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_lo=0 ac_mid=0
2108 while :; do
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002116test_array [0] = 0;
2117return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"; then :
2124 ac_hi=$ac_mid; break
2125else
2126 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2127 if test $ac_lo -le $ac_mid; then
2128 ac_lo= ac_hi=
2129 break
2130 fi
2131 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134 done
2135else
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002143test_array [0] = 0;
2144return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=-1 ac_mid=-1
2152 while :; do
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002160test_array [0] = 0;
2161return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_lo=$ac_mid; break
2169else
2170 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2171 if test $ac_mid -le $ac_hi; then
2172 ac_lo= ac_hi=
2173 break
2174 fi
2175 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178 done
2179else
2180 ac_lo= ac_hi=
2181fi
2182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2183fi
2184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2185# Binary search between lo and hi bounds.
2186while test "x$ac_lo" != "x$ac_hi"; do
2187 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
2191int
2192main ()
2193{
2194static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002195test_array [0] = 0;
2196return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002197
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_hi=$ac_mid
2204else
2205 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208done
2209case $ac_lo in #((
2210?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2211'') ac_retval=1 ;;
2212esac
2213 else
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216$4
2217static long int longval () { return $2; }
2218static unsigned long int ulongval () { return $2; }
2219#include <stdio.h>
2220#include <stdlib.h>
2221int
2222main ()
2223{
2224
2225 FILE *f = fopen ("conftest.val", "w");
2226 if (! f)
2227 return 1;
2228 if (($2) < 0)
2229 {
2230 long int i = longval ();
2231 if (i != ($2))
2232 return 1;
2233 fprintf (f, "%ld", i);
2234 }
2235 else
2236 {
2237 unsigned long int i = ulongval ();
2238 if (i != ($2))
2239 return 1;
2240 fprintf (f, "%lu", i);
2241 }
2242 /* Do not output a trailing newline, as this causes \r\n confusion
2243 on some platforms. */
2244 return ferror (f) || fclose (f) != 0;
2245
2246 ;
2247 return 0;
2248}
2249_ACEOF
2250if ac_fn_c_try_run "$LINENO"; then :
2251 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2252else
2253 ac_retval=1
2254fi
2255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2256 conftest.$ac_objext conftest.beam conftest.$ac_ext
2257rm -f conftest.val
2258
2259 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002260 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002261 as_fn_set_status $ac_retval
2262
2263} # ac_fn_c_compute_int
2264
2265# ac_fn_c_check_func LINENO FUNC VAR
2266# ----------------------------------
2267# Tests whether FUNC exists, setting the cache variable VAR accordingly
2268ac_fn_c_check_func ()
2269{
2270 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2272$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002273if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002274 $as_echo_n "(cached) " >&6
2275else
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2279 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2280#define $2 innocuous_$2
2281
2282/* System header to define __stub macros and hopefully few prototypes,
2283 which can conflict with char $2 (); below.
2284 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2285 <limits.h> exists even on freestanding compilers. */
2286
2287#ifdef __STDC__
2288# include <limits.h>
2289#else
2290# include <assert.h>
2291#endif
2292
2293#undef $2
2294
2295/* Override any GCC internal prototype to avoid an error.
2296 Use char because int might match the return type of a GCC
2297 builtin and then its argument prototype would still apply. */
2298#ifdef __cplusplus
2299extern "C"
2300#endif
2301char $2 ();
2302/* The GNU C library defines this for functions which it implements
2303 to always fail with ENOSYS. Some functions are actually named
2304 something starting with __ and the normal name is an alias. */
2305#if defined __stub_$2 || defined __stub___$2
2306choke me
2307#endif
2308
2309int
2310main ()
2311{
2312return $2 ();
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_link "$LINENO"; then :
2318 eval "$3=yes"
2319else
2320 eval "$3=no"
2321fi
2322rm -f core conftest.err conftest.$ac_objext \
2323 conftest$ac_exeext conftest.$ac_ext
2324fi
2325eval ac_res=\$$3
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2327$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002328 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002329
2330} # ac_fn_c_check_func
2331
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002332# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2333# ---------------------------------------------
2334# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2335# accordingly.
2336ac_fn_c_check_decl ()
2337{
2338 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2339 as_decl_name=`echo $2|sed 's/ *(.*//'`
2340 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2342$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2343if eval \${$3+:} false; then :
2344 $as_echo_n "(cached) " >&6
2345else
2346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h. */
2348$4
2349int
2350main ()
2351{
2352#ifndef $as_decl_name
2353#ifdef __cplusplus
2354 (void) $as_decl_use;
2355#else
2356 (void) $as_decl_name;
2357#endif
2358#endif
2359
2360 ;
2361 return 0;
2362}
2363_ACEOF
2364if ac_fn_c_try_compile "$LINENO"; then :
2365 eval "$3=yes"
2366else
2367 eval "$3=no"
2368fi
2369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370fi
2371eval ac_res=\$$3
2372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2373$as_echo "$ac_res" >&6; }
2374 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2375
2376} # ac_fn_c_check_decl
2377
Matthias Kloseb9621712010-04-24 17:59:49 +00002378# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2379# ----------------------------------------------------
2380# Tries to find if the field MEMBER exists in type AGGR, after including
2381# INCLUDES, setting cache variable VAR accordingly.
2382ac_fn_c_check_member ()
2383{
2384 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2386$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002387if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002388 $as_echo_n "(cached) " >&6
2389else
2390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391/* end confdefs.h. */
2392$5
2393int
2394main ()
2395{
2396static $2 ac_aggr;
2397if (ac_aggr.$3)
2398return 0;
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$4=yes"
2405else
2406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2407/* end confdefs.h. */
2408$5
2409int
2410main ()
2411{
2412static $2 ac_aggr;
2413if (sizeof ac_aggr.$3)
2414return 0;
2415 ;
2416 return 0;
2417}
2418_ACEOF
2419if ac_fn_c_try_compile "$LINENO"; then :
2420 eval "$4=yes"
2421else
2422 eval "$4=no"
2423fi
2424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2425fi
2426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427fi
2428eval ac_res=\$$4
2429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2430$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002431 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002432
2433} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002435This file contains any messages produced by compilers while
2436running configure, to aid debugging if configure makes a mistake.
2437
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002438It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002439generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441 $ $0 $@
2442
2443_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002445{
2446cat <<_ASUNAME
2447## --------- ##
2448## Platform. ##
2449## --------- ##
2450
2451hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2452uname -m = `(uname -m) 2>/dev/null || echo unknown`
2453uname -r = `(uname -r) 2>/dev/null || echo unknown`
2454uname -s = `(uname -s) 2>/dev/null || echo unknown`
2455uname -v = `(uname -v) 2>/dev/null || echo unknown`
2456
2457/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2458/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2459
2460/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2461/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2462/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002464/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2465/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2466/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2467
2468_ASUNAME
2469
2470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2471for as_dir in $PATH
2472do
2473 IFS=$as_save_IFS
2474 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 $as_echo "PATH: $as_dir"
2476 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002478
2479} >&5
2480
2481cat >&5 <<_ACEOF
2482
2483
2484## ----------- ##
2485## Core tests. ##
2486## ----------- ##
2487
2488_ACEOF
2489
2490
2491# Keep a trace of the command line.
2492# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002493# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002494# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002495# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002496ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002497ac_configure_args0=
2498ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002499ac_must_keep_next=false
2500for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002501do
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 for ac_arg
2503 do
2504 case $ac_arg in
2505 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2506 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2507 | -silent | --silent | --silen | --sile | --sil)
2508 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 esac
2512 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002517 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002519 case $ac_arg in
2520 *=* | --config-cache | -C | -disable-* | --disable-* \
2521 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2522 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2523 | -with-* | --with-* | -without-* | --without-* | --x)
2524 case "$ac_configure_args0 " in
2525 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2526 esac
2527 ;;
2528 -* ) ac_must_keep_next=true ;;
2529 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 ;;
2533 esac
2534 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
Matthias Kloseb9621712010-04-24 17:59:49 +00002536{ ac_configure_args0=; unset ac_configure_args0;}
2537{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
2539# When interrupted or exit'd, cleanup temporary files, and complete
2540# config.log. We remove comments because anyway the quotes in there
2541# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542# WARNING: Use '\'' to represent an apostrophe within the trap.
2543# 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 +00002544trap 'exit_status=$?
2545 # Save into config.log some information that might help in debugging.
2546 {
2547 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002548
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002550## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002551## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 echo
2553 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554(
2555 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2556 eval ac_val=\$$ac_var
2557 case $ac_val in #(
2558 *${as_nl}*)
2559 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2561$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 esac
2563 case $ac_var in #(
2564 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002565 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2566 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 esac ;;
2568 esac
2569 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2572 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 "s/'\''/'\''\\\\'\'''\''/g;
2575 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2576 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002577 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002579 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 esac |
2581 sort
2582)
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002584
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002586## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002588 echo
2589 for ac_var in $ac_subst_vars
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
2599 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002602## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002603 echo
2604 for ac_var in $ac_subst_files
2605 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 eval ac_val=\$$ac_var
2607 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002610 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002611 done | sort
2612 echo
2613 fi
2614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002616 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002617## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002618## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 echo
2622 fi
2623 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 $as_echo "$as_me: caught signal $ac_signal"
2625 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 rm -f core *.core core.conftest.* &&
2628 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002631for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002633done
2634ac_signal=0
2635
2636# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002638
Matthias Kloseb9621712010-04-24 17:59:49 +00002639$as_echo "/* confdefs.h */" > confdefs.h
2640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641# Predefined preprocessor variables.
2642
2643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_NAME "$PACKAGE_NAME"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2649_ACEOF
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_VERSION "$PACKAGE_VERSION"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655cat >>confdefs.h <<_ACEOF
2656#define PACKAGE_STRING "$PACKAGE_STRING"
2657_ACEOF
2658
Martin v. Löwis11437992002-04-12 09:54:03 +00002659cat >>confdefs.h <<_ACEOF
2660#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2661_ACEOF
2662
Matthias Kloseb9621712010-04-24 17:59:49 +00002663cat >>confdefs.h <<_ACEOF
2664#define PACKAGE_URL "$PACKAGE_URL"
2665_ACEOF
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667
2668# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669# Prefer an explicitly selected file to automatically selected ones.
2670ac_site_file1=NONE
2671ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 # We do not want a PATH search for config.site.
2674 case $CONFIG_SITE in #((
2675 -*) ac_site_file1=./$CONFIG_SITE;;
2676 */*) ac_site_file1=$CONFIG_SITE;;
2677 *) ac_site_file1=./$CONFIG_SITE;;
2678 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 ac_site_file1=$prefix/share/config.site
2681 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682else
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 ac_site_file1=$ac_default_prefix/share/config.site
2684 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002686for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687do
Matthias Kloseb9621712010-04-24 17:59:49 +00002688 test "x$ac_site_file" = xNONE && continue
2689 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2691$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002693 . "$ac_site_file" \
2694 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2696as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002697See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698 fi
2699done
2700
2701if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 # Some versions of bash will fail to source /dev/null (special files
2703 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2704 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2706$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002708 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2709 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 esac
2711 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712else
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2714$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 >$cache_file
2716fi
2717
2718# Check that the precious variables saved in the cache have kept the same
2719# value.
2720ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2723 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002724 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2725 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 case $ac_old_set,$ac_new_set in
2727 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2729$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 +00002730 ac_cache_corrupted=: ;;
2731 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002732 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2733$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_cache_corrupted=: ;;
2735 ,);;
2736 *)
2737 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 # differences in whitespace do not lead to failure.
2739 ac_old_val_w=`echo x $ac_old_val`
2740 ac_new_val_w=`echo x $ac_new_val`
2741 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2743$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2744 ac_cache_corrupted=:
2745 else
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2747$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2748 eval $ac_var=\$ac_old_val
2749 fi
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2751$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2753$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 fi;;
2755 esac
2756 # Pass precious variables to config.status.
2757 if test "$ac_new_set" = set; then
2758 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002759 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 *) ac_arg=$ac_var=$ac_new_val ;;
2761 esac
2762 case " $ac_configure_args " in
2763 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002764 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 esac
2766 fi
2767done
2768if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002769 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2772$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002773 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002775## -------------------- ##
2776## Main body of script. ##
2777## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778
Guido van Rossum7f43da71994-08-01 12:15:30 +00002779ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2783ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002784
Guido van Rossum627b2d71993-12-24 10:39:16 +00002785
Michael W. Hudson54241132001-12-07 15:38:26 +00002786
Trent Nelson4d4ec652012-10-16 08:51:24 -04002787
Trent Nelson5595ab52012-10-17 04:47:31 -04002788if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002789 # If we're building out-of-tree, we need to make sure the following
2790 # resources get picked up before their $srcdir counterparts.
2791 # Objects/ -> typeslots.inc
2792 # Include/ -> Python-ast.h, graminit.h
2793 # Python/ -> importlib.h
2794 # (A side effect of this is that these resources will automatically be
2795 # regenerated when building out-of-tree, regardless of whether or not
2796 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2797 # off.)
2798 BASECPPFLAGS="-IObjects -IInclude -IPython"
2799else
2800 BASECPPFLAGS=""
2801fi
2802
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803
2804
2805
2806
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002807if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002808then
2809# Extract the first word of "hg", so it can be a program name with args.
2810set dummy hg; ac_word=$2
2811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2812$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002813if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002814 $as_echo_n "(cached) " >&6
2815else
2816 if test -n "$HAS_HG"; then
2817 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2818else
2819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820for as_dir in $PATH
2821do
2822 IFS=$as_save_IFS
2823 test -z "$as_dir" && as_dir=.
2824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002826 ac_cv_prog_HAS_HG="found"
2827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2828 break 2
2829 fi
2830done
2831 done
2832IFS=$as_save_IFS
2833
2834 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2835fi
2836fi
2837HAS_HG=$ac_cv_prog_HAS_HG
2838if test -n "$HAS_HG"; then
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2840$as_echo "$HAS_HG" >&6; }
2841else
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2843$as_echo "no" >&6; }
2844fi
2845
2846
2847else
2848HAS_HG=no-repository
2849fi
2850if test $HAS_HG = found
2851then
2852 HGVERSION="hg id -i \$(srcdir)"
2853 HGTAG="hg id -t \$(srcdir)"
2854 HGBRANCH="hg id -b \$(srcdir)"
2855else
2856 HGVERSION=""
2857 HGTAG=""
2858 HGBRANCH=""
2859fi
2860
2861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002862ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002863
2864
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002865ac_aux_dir=
2866for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2867 if test -f "$ac_dir/install-sh"; then
2868 ac_aux_dir=$ac_dir
2869 ac_install_sh="$ac_aux_dir/install-sh -c"
2870 break
2871 elif test -f "$ac_dir/install.sh"; then
2872 ac_aux_dir=$ac_dir
2873 ac_install_sh="$ac_aux_dir/install.sh -c"
2874 break
2875 elif test -f "$ac_dir/shtool"; then
2876 ac_aux_dir=$ac_dir
2877 ac_install_sh="$ac_aux_dir/shtool install -c"
2878 break
2879 fi
2880done
2881if test -z "$ac_aux_dir"; then
2882 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2883fi
2884
2885# These three variables are undocumented and unsupported,
2886# and are intended to be withdrawn in a future Autoconf release.
2887# They can cause serious problems if a builder's source tree is in a directory
2888# whose full name contains unusual characters.
2889ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2890ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2891ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2892
2893
2894# Make sure we can run config.sub.
2895$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2896 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2897
2898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2899$as_echo_n "checking build system type... " >&6; }
2900if ${ac_cv_build+:} false; then :
2901 $as_echo_n "(cached) " >&6
2902else
2903 ac_build_alias=$build_alias
2904test "x$ac_build_alias" = x &&
2905 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2906test "x$ac_build_alias" = x &&
2907 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2908ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2909 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2910
2911fi
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2913$as_echo "$ac_cv_build" >&6; }
2914case $ac_cv_build in
2915*-*-*) ;;
2916*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2917esac
2918build=$ac_cv_build
2919ac_save_IFS=$IFS; IFS='-'
2920set x $ac_cv_build
2921shift
2922build_cpu=$1
2923build_vendor=$2
2924shift; shift
2925# Remember, the first character of IFS is used to create $*,
2926# except with old shells:
2927build_os=$*
2928IFS=$ac_save_IFS
2929case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2930
2931
2932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2933$as_echo_n "checking host system type... " >&6; }
2934if ${ac_cv_host+:} false; then :
2935 $as_echo_n "(cached) " >&6
2936else
2937 if test "x$host_alias" = x; then
2938 ac_cv_host=$ac_cv_build
2939else
2940 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2941 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2942fi
2943
2944fi
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2946$as_echo "$ac_cv_host" >&6; }
2947case $ac_cv_host in
2948*-*-*) ;;
2949*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2950esac
2951host=$ac_cv_host
2952ac_save_IFS=$IFS; IFS='-'
2953set x $ac_cv_host
2954shift
2955host_cpu=$1
2956host_vendor=$2
2957shift; shift
2958# Remember, the first character of IFS is used to create $*,
2959# except with old shells:
2960host_os=$*
2961IFS=$ac_save_IFS
2962case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2963
2964
2965
doko@python.orga10e4a92013-01-25 18:45:12 +01002966
2967
Ned Deilyfcbc2462014-08-22 13:32:49 -07002968# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2969rm -f pybuilddir.txt
2970
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002971if test "$cross_compiling" = yes; then
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2973$as_echo_n "checking for python interpreter for cross build... " >&6; }
2974 if test -z "$PYTHON_FOR_BUILD"; then
2975 for interp in python$PACKAGE_VERSION python3 python; do
2976 which $interp >/dev/null 2>&1 || continue
2977 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2978 break
2979 fi
2980 interp=
2981 done
2982 if test x$interp = x; then
2983 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2984 fi
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2986$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002987 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 +02002988 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002989elif test "$cross_compiling" = maybe; then
2990 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002991else
2992 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2993fi
2994
2995
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
Benjamin Petersond23f8222009-04-05 19:13:16 +00002997if test "$prefix" != "/"; then
2998 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2999fi
3000
3001
Martin v. Löwis11437992002-04-12 09:54:03 +00003002
3003
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003004# We don't use PACKAGE_ variables, and they cause conflicts
3005# with other autoconf-based packages that include Python.h
3006grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3007rm confdefs.h
3008mv confdefs.h.new confdefs.h
3009
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003010
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003011VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003012
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003013# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003014
3015SOVERSION=1.0
3016
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003017# The later defininition of _XOPEN_SOURCE disables certain features
3018# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003021
3022
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003023# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3024# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3025# them.
3026
Matthias Kloseb9621712010-04-24 17:59:49 +00003027$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003028
3029
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003030# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3031# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3032# them.
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003035
3036
Martin v. Löwisd6320502004-08-12 13:45:08 +00003037# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3038# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3039
Matthias Kloseb9621712010-04-24 17:59:49 +00003040$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003041
3042
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3044# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3045# them.
3046
Matthias Kloseb9621712010-04-24 17:59:49 +00003047$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003048
3049
3050
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003051define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003052
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003053# Arguments passed to configure.
3054
3055CONFIG_ARGS="$ac_configure_args"
3056
Matthias Kloseb9621712010-04-24 17:59:49 +00003057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3058$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003060if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062 case $enableval in
3063 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064 # Locate the best usable SDK, see Mac/README.txt for more
3065 # information
3066 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003067 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3070 if test ! -d "${enableval}"
3071 then
3072 enableval=/
3073 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003075 ;;
3076 esac
3077 case $enableval in
3078 no)
3079 UNIVERSALSDK=
3080 enable_universalsdk=
3081 ;;
3082 *)
3083 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084 if test ! -d "${UNIVERSALSDK}"
3085 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003086 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003088 ;;
3089 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003090
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092else
3093
3094 UNIVERSALSDK=
3095 enable_universalsdk=
3096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003097fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003098
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003099if test -n "${UNIVERSALSDK}"
3100then
Matthias Kloseb9621712010-04-24 17:59:49 +00003101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3102$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003103else
Matthias Kloseb9621712010-04-24 17:59:49 +00003104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3105$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003106fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003109
Ned Deily87adb6e2013-10-18 21:09:56 -07003110ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003111
Ned Deilycbfb9a52012-06-23 16:02:19 -07003112# For backward compatibility reasons we prefer to select '32-bit' if available,
3113# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003115if test "`uname -s`" = "Darwin"
3116then
3117 if test -n "${UNIVERSALSDK}"
3118 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003119 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003120 then
3121 UNIVERSAL_ARCHS="intel"
3122 fi
3123 fi
3124fi
3125
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003126
Matthias Kloseb9621712010-04-24 17:59:49 +00003127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3128$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003129
3130# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003131if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133 UNIVERSAL_ARCHS="$withval"
3134
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003135fi
3136
Ned Deily87adb6e2013-10-18 21:09:56 -07003137if test -n "${UNIVERSALSDK}"
3138then
3139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3140$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3141else
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3143$as_echo "no" >&6; }
3144fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003145
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003146
3147# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003148if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003149 withval=$with_framework_name;
3150 PYTHONFRAMEWORK=${withval}
3151 PYTHONFRAMEWORKDIR=${withval}.framework
3152 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3153
3154else
3155
3156 PYTHONFRAMEWORK=Python
3157 PYTHONFRAMEWORKDIR=Python.framework
3158 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3159
3160fi
3161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003163if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003165 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003166 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003167 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 esac
3169 case $enableval in
3170 no)
3171 PYTHONFRAMEWORK=
3172 PYTHONFRAMEWORKDIR=no-framework
3173 PYTHONFRAMEWORKPREFIX=
3174 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175 FRAMEWORKINSTALLFIRST=
3176 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003177 FRAMEWORKALTINSTALLFIRST=
3178 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003179 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003180 if test "x${prefix}" = "xNONE"; then
3181 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3182 else
3183 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3184 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003185 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003186 ;;
3187 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003189 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003191 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003192 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3193 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003194 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003196
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003197 if test "x${prefix}" = "xNONE" ; then
3198 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003199
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003200 else
3201 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3202 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003203
3204 case "${enableval}" in
3205 /System*)
3206 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3207 if test "${prefix}" = "NONE" ; then
3208 # See below
3209 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3210 fi
3211 ;;
3212
3213 /Library*)
3214 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3215 ;;
3216
3217 */Library/Frameworks)
3218 MDIR="`dirname "${enableval}"`"
3219 MDIR="`dirname "${MDIR}"`"
3220 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3221
3222 if test "${prefix}" = "NONE"; then
3223 # User hasn't specified the
3224 # --prefix option, but wants to install
3225 # the framework in a non-default location,
3226 # ensure that the compatibility links get
3227 # installed relative to that prefix as well
3228 # instead of in /usr/local.
3229 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3230 fi
3231 ;;
3232
3233 *)
3234 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3235 ;;
3236 esac
3237
Jack Jansen127e56e2001-09-11 14:41:54 +00003238 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003239
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003240 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003241 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003242 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003245
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003246 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3247
3248 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3249
Jack Jansene578a632001-08-15 01:27:14 +00003250 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003251
Guido van Rossum563e7081996-09-10 18:20:48 +00003252else
Martin v. Löwis11437992002-04-12 09:54:03 +00003253
Jack Jansene578a632001-08-15 01:27:14 +00003254 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003255 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003256 PYTHONFRAMEWORKPREFIX=
3257 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258 FRAMEWORKINSTALLFIRST=
3259 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003260 FRAMEWORKALTINSTALLFIRST=
3261 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003262 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003263 if test "x${prefix}" = "xNONE" ; then
3264 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3265 else
3266 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3267 fi
Jack Jansene578a632001-08-15 01:27:14 +00003268 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271fi
3272
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273
3274
Michael W. Hudson54241132001-12-07 15:38:26 +00003275
3276
3277
3278
Jack Jansene578a632001-08-15 01:27:14 +00003279
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003280
3281
3282
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003283
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003284
Ned Deilyb8f944f2013-11-21 22:42:25 -08003285
Jack Jansene578a632001-08-15 01:27:14 +00003286##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003287## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003288## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003289##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290# Set name for machine-dependent library files
3291
Matthias Kloseb9621712010-04-24 17:59:49 +00003292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3293$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294if test -z "$MACHDEP"
3295then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 # avoid using uname for cross builds
3297 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003298 # ac_sys_system and ac_sys_release are used for setting
3299 # a lot of different things including 'define_xopen_source'
3300 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003301 case "$host" in
3302 *-*-linux*)
3303 ac_sys_system=Linux
3304 ;;
3305 *-*-cygwin*)
3306 ac_sys_system=Cygwin
3307 ;;
3308 *)
3309 # for now, limit cross builds to known configurations
3310 MACHDEP="unknown"
3311 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3312 esac
3313 ac_sys_release=
3314 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003315 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003316 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003317 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003318 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003319 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003320 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003321 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 fi
3323 ac_md_system=`echo $ac_sys_system |
3324 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3325 ac_md_release=`echo $ac_sys_release |
3326 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3327 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003328
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003330 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003331 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003332 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003333 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003334 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003335 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003336fi
Guido van Rossum91922671997-10-09 20:24:13 +00003337
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003338
3339if test "$cross_compiling" = yes; then
3340 case "$host" in
3341 *-*-linux*)
3342 case "$host_cpu" in
3343 arm*)
3344 _host_cpu=arm
3345 ;;
3346 *)
3347 _host_cpu=$host_cpu
3348 esac
3349 ;;
3350 *-*-cygwin*)
3351 _host_cpu=
3352 ;;
3353 *)
3354 # for now, limit cross builds to known configurations
3355 MACHDEP="unknown"
3356 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3357 esac
3358 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3359fi
3360
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003361# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3362# disable features if it is defined, without any means to access these
3363# features as extensions. For these systems, we skip the definition of
3364# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3365# some feature, make sure there is no alternative way to access this
3366# feature. Also, when using wildcards, make sure you have verified the
3367# need for not defining _XOPEN_SOURCE on all systems matching the
3368# wildcard, and that the wildcard does not include future systems
3369# (which may remove their limitations).
3370case $ac_sys_system/$ac_sys_release in
3371 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3372 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003373 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003374 # In addition, Stefan Krah confirms that issue #1244610 exists through
3375 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003376 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003377 define_xopen_source=no
3378 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3379 # also defined. This can be overridden by defining _BSD_SOURCE
3380 # As this has a different meaning on Linux, only define it on OpenBSD
3381
Matthias Kloseb9621712010-04-24 17:59:49 +00003382$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003383
3384 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003385 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003386 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3387 # also defined. This can be overridden by defining _BSD_SOURCE
3388 # As this has a different meaning on Linux, only define it on OpenBSD
3389
Matthias Kloseb9621712010-04-24 17:59:49 +00003390$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003391
3392 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003393 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3394 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3395 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003396 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 +00003397 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003398 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3399 # request to enable features supported by the standard as a request
3400 # to disable features not supported by the standard. The best way
3401 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3402 # entirely and define __EXTENSIONS__ instead.
3403 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003404 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003405 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3406 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003407 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003408 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003409 define_xopen_source=no;;
3410 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003411 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003412 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003413 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003414 # On FreeBSD 4, the math functions C89 does not cover are never defined
3415 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3416 FreeBSD/4.*)
3417 define_xopen_source=no;;
3418 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3419 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3420 # identifies itself as Darwin/7.*
3421 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3422 # disables platform specific features beyond repair.
3423 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3424 # has no effect, don't bother defining them
3425 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003426 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003427 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003428 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003429 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3430 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3431 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003432 AIX/4)
3433 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003434 AIX/5)
3435 if test `uname -r` -eq 1; then
3436 define_xopen_source=no
3437 fi
3438 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003439 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3440 # defining NI_NUMERICHOST.
3441 QNX/6.3.2)
3442 define_xopen_source=no
3443 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003444
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003445esac
3446
3447if test $define_xopen_source = yes
3448then
Victor Stinner14d098d2011-09-07 22:29:43 +02003449 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003450
Victor Stinner14d098d2011-09-07 22:29:43 +02003451$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003452
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
3454 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3455 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3456 # several APIs are not declared. Since this is also needed in some
3457 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003458
Matthias Kloseb9621712010-04-24 17:59:49 +00003459$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003460
3461
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003462
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003463$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003464
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003465fi
3466
Christian Heimes647cd872013-12-07 23:39:33 +01003467# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3468case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003469 hp*|HP*)
3470 define_stdc_a1=yes;;
3471 *)
3472 define_stdc_a1=no;;
3473esac
3474
3475if test $define_stdc_a1 = yes
3476then
Christian Heimes647cd872013-12-07 23:39:33 +01003477
3478$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3479
Christian Heimesb02bcae2013-12-08 15:21:08 +01003480fi
Christian Heimes647cd872013-12-07 23:39:33 +01003481
Guido van Rossum91922671997-10-09 20:24:13 +00003482#
3483# SGI compilers allow the specification of the both the ABI and the
3484# ISA on the command line. Depending on the values of these switches,
3485# different and often incompatable code will be generated.
3486#
3487# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3488# thus supply support for various ABI/ISA combinations. The MACHDEP
3489# variable is also adjusted.
3490#
3491
3492if test ! -z "$SGI_ABI"
3493then
3494 CC="cc $SGI_ABI"
3495 LDFLAGS="$SGI_ABI $LDFLAGS"
3496 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3499$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003500
doko@ubuntu.com1345d202015-04-13 21:59:57 +02003501
3502PLATDIR=plat-$MACHDEP
3503
Jack Jansen6b08a402004-06-03 12:41:45 +00003504# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3505# it may influence the way we can build extensions, so distutils
3506# needs to check it
3507
Thomas Wouters477c8d52006-05-27 19:21:47 +00003508
Jack Jansen6b08a402004-06-03 12:41:45 +00003509CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003510EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003511
Guido van Rossum627b2d71993-12-24 10:39:16 +00003512# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003513
3514# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3515# for debug/optimization stuff. BASECFLAGS is for flags that are required
3516# just to get things to compile and link. Users are free to override OPT
3517# when running configure or make. The build should not break if they do.
3518# BASECFLAGS should generally not be messed with, however.
3519
3520# XXX shouldn't some/most/all of this code be merged with the stuff later
3521# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3523$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003526if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003528 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003529 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003530 without_gcc=yes;;
3531 yes) CC=gcc
3532 without_gcc=no;;
3533 *) CC=$withval
3534 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003535 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003536else
Martin v. Löwis11437992002-04-12 09:54:03 +00003537
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003539 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003540 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003541 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003542 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543fi
3544
Matthias Kloseb9621712010-04-24 17:59:49 +00003545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3546$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003547
Guido van Rossum8b131c51995-03-09 14:10:13 +00003548# If the user switches compilers, we can't believe the cache
3549if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3550then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003551 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003552(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003553fi
3554
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003555# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3556# when the compiler supports them, but we don't always want -O2, and
3557# we set -g later.
3558if test -z "$CFLAGS"; then
3559 CFLAGS=
3560fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003561
3562if test "$ac_sys_system" = "Darwin"
3563then
3564 # Compiler selection on MacOSX is more complicated than
3565 # AC_PROG_CC can handle, see Mac/README.txt for more
3566 # information
3567 if test -z "${CC}"
3568 then
3569 found_gcc=
3570 found_clang=
3571 as_save_IFS=$IFS; IFS=:
3572 for as_dir in $PATH
3573 do
3574 IFS=$as_save_IFS
3575 if test -x $as_dir/gcc; then
3576 if test -z "${found_gcc}"; then
3577 found_gcc=$as_dir/gcc
3578 fi
3579 fi
3580 if test -x $as_dir/clang; then
3581 if test -z "${found_clang}"; then
3582 found_clang=$as_dir/clang
3583 fi
3584 fi
3585 done
3586 IFS=$as_save_IFS
3587
3588 if test -n "$found_gcc" -a -n "$found_clang"
3589 then
3590 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3591 then
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3593$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3594 CC="$found_clang"
3595 CXX="$found_clang++"
3596 fi
3597
3598
3599 elif test -z "$found_gcc" -a -n "$found_clang"
3600 then
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3602$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3603 CC="$found_clang"
3604 CXX="$found_clang++"
3605
3606 elif test -z "$found_gcc" -a -z "$found_clang"
3607 then
3608 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3609 if test -n "${found_clang}"
3610 then
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3612$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3613 CC="${found_clang}"
3614 CXX="`/usr/bin/xcrun -find clang++`"
3615
3616 # else: use default behaviour
3617 fi
3618 fi
3619 fi
3620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003621ac_ext=c
3622ac_cpp='$CPP $CPPFLAGS'
3623ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3624ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3625ac_compiler_gnu=$ac_cv_c_compiler_gnu
3626if test -n "$ac_tool_prefix"; then
3627 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3628set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003631if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003633else
3634 if test -n "$CC"; then
3635 ac_cv_prog_CC="$CC" # Let the user override the test.
3636else
Martin v. Löwis11437992002-04-12 09:54:03 +00003637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 $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 +00003646 break 2
3647 fi
3648done
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003651
Jack Jansendd19cf82001-12-06 22:36:17 +00003652fi
3653fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003655if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3657$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003658else
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661fi
3662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664fi
3665if test -z "$ac_cv_prog_CC"; then
3666 ac_ct_CC=$CC
3667 # Extract the first word of "gcc", so it can be a program name with args.
3668set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003671if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
3674 if test -n "$ac_ct_CC"; then
3675 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3676else
3677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH
3679do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 $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 +00003686 break 2
3687 fi
3688done
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003691
3692fi
3693fi
3694ac_ct_CC=$ac_cv_prog_ac_ct_CC
3695if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3697$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003698else
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701fi
3702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703 if test "x$ac_ct_CC" = x; then
3704 CC=""
3705 else
3706 case $cross_compiling:$ac_tool_warned in
3707yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710ac_tool_warned=yes ;;
3711esac
3712 CC=$ac_ct_CC
3713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
3715 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003716fi
3717
Jack Jansendd19cf82001-12-06 22:36:17 +00003718if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719 if test -n "$ac_tool_prefix"; then
3720 # 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 +00003721set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3723$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003724if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003726else
3727 if test -n "$CC"; then
3728 ac_cv_prog_CC="$CC" # Let the user override the test.
3729else
Martin v. Löwis11437992002-04-12 09:54:03 +00003730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3731for as_dir in $PATH
3732do
3733 IFS=$as_save_IFS
3734 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $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 +00003739 break 2
3740 fi
3741done
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003744
3745fi
3746fi
3747CC=$ac_cv_prog_CC
3748if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3750$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003758fi
3759if test -z "$CC"; then
3760 # Extract the first word of "cc", so it can be a program name with args.
3761set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003764if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003766else
3767 if test -n "$CC"; then
3768 ac_cv_prog_CC="$CC" # Let the user override the test.
3769else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3772for as_dir in $PATH
3773do
3774 IFS=$as_save_IFS
3775 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3779 ac_prog_rejected=yes
3780 continue
3781 fi
3782 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 $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 +00003784 break 2
3785 fi
3786done
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003789
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790if test $ac_prog_rejected = yes; then
3791 # We found a bogon in the path, so make sure we never use it.
3792 set dummy $ac_cv_prog_CC
3793 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003795 # We chose a different compiler from the bogus one.
3796 # However, it has the same basename, so the bogon will be chosen
3797 # first if we set CC to just the basename; use the full file name.
3798 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003799 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003800 fi
3801fi
3802fi
3803fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003804CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003805if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3807$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003808else
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3810$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003811fi
3812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813
Martin v. Löwis11437992002-04-12 09:54:03 +00003814fi
3815if test -z "$CC"; then
3816 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 do
3819 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3820set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003823if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003825else
3826 if test -n "$CC"; then
3827 ac_cv_prog_CC="$CC" # Let the user override the test.
3828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $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 +00003838 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003839 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003840done
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
3844fi
3845fi
3846CC=$ac_cv_prog_CC
3847if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3849$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003853fi
3854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 test -n "$CC" && break
3857 done
3858fi
3859if test -z "$CC"; then
3860 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003862do
3863 # Extract the first word of "$ac_prog", so it can be a program name with args.
3864set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3866$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003867if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003869else
3870 if test -n "$ac_ct_CC"; then
3871 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3872else
3873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3874for as_dir in $PATH
3875do
3876 IFS=$as_save_IFS
3877 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003880 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 $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 +00003882 break 2
3883 fi
3884done
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003887
Martin v. Löwis11437992002-04-12 09:54:03 +00003888fi
3889fi
3890ac_ct_CC=$ac_cv_prog_ac_ct_CC
3891if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3893$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003894else
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3896$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003897fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 test -n "$ac_ct_CC" && break
3901done
Michael W. Hudson54241132001-12-07 15:38:26 +00003902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 if test "x$ac_ct_CC" = x; then
3904 CC=""
3905 else
3906 case $cross_compiling:$ac_tool_warned in
3907yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910ac_tool_warned=yes ;;
3911esac
3912 CC=$ac_ct_CC
3913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003914fi
3915
3916fi
3917
3918
Matthias Kloseb9621712010-04-24 17:59:49 +00003919test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003921as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003922See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003923
3924# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003925$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3926set X $ac_compile
3927ac_compiler=$2
3928for ac_option in --version -v -V -qversion; do
3929 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930case "(($ac_try" in
3931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3932 *) ac_try_echo=$ac_try;;
3933esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3935$as_echo "$ac_try_echo"; } >&5
3936 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 if test -s conftest.err; then
3939 sed '10a\
3940... rest of stderr output deleted ...
3941 10q' conftest.err >conftest.er1
3942 cat conftest.er1 >&5
3943 fi
3944 rm -f conftest.er1 conftest.err
3945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3946 test $ac_status = 0; }
3947done
Martin v. Löwis11437992002-04-12 09:54:03 +00003948
Matthias Kloseb9621712010-04-24 17:59:49 +00003949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003950/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003951
Martin v. Löwis11437992002-04-12 09:54:03 +00003952int
3953main ()
3954{
3955
3956 ;
3957 return 0;
3958}
3959_ACEOF
3960ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003961ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003962# Try to create an executable without -o first, disregard a.out.
3963# It will help us diagnose broken compilers, and finding out an intuition
3964# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3966$as_echo_n "checking whether the C compiler works... " >&6; }
3967ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3968
3969# The possible output files:
3970ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972ac_rmfiles=
3973for ac_file in $ac_files
3974do
3975 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3978 esac
3979done
3980rm -f $ac_rmfiles
3981
Matthias Kloseb9621712010-04-24 17:59:49 +00003982if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983case "(($ac_try" in
3984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3985 *) ac_try_echo=$ac_try;;
3986esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003987eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3988$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3992 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3994# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3995# in a Makefile. We should not override ac_cv_exeext if it was cached,
3996# so that the user can short-circuit this test for compilers unknown to
3997# Autoconf.
3998for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003999do
4000 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003 ;;
4004 [ab].out )
4005 # We found the default executable, but exeext='' is most
4006 # certainly right.
4007 break;;
4008 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004009 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010 then :; else
4011 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4012 fi
4013 # We set ac_cv_exeext here because the later test for it is not
4014 # safe: cross compilers may not add the suffix if given an `-o'
4015 # argument, so we may need to know it at that point already.
4016 # Even if this section looks crufty: it has the advantage of
4017 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018 break;;
4019 * )
4020 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 esac
4022done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023test "$ac_cv_exeext" = no && ac_cv_exeext=
4024
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 ac_file=''
4027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004028if test -z "$ac_file"; then :
4029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4030$as_echo "no" >&6; }
4031$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004032sed 's/^/| /' conftest.$ac_ext >&5
4033
Matthias Kloseb9621712010-04-24 17:59:49 +00004034{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004036as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004037See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004038else
4039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4040$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4043$as_echo_n "checking for C compiler default output file name... " >&6; }
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4045$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047
Matthias Kloseb9621712010-04-24 17:59:49 +00004048rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4051$as_echo_n "checking for suffix of executables... " >&6; }
4052if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004053case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4058$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4062 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004063 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4064# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4065# work properly (i.e., refer to `conftest.exe'), while it won't with
4066# `rm'.
4067for ac_file in conftest.exe conftest conftest.*; do
4068 test -f "$ac_file" || continue
4069 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004071 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4072 break;;
4073 * ) break;;
4074 esac
4075done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076else
Matthias Kloseb9621712010-04-24 17:59:49 +00004077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004079as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004080See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004082rm -f conftest conftest$ac_cv_exeext
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4084$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004085
4086rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004087EXEEXT=$ac_cv_exeext
4088ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4090/* end confdefs.h. */
4091#include <stdio.h>
4092int
4093main ()
4094{
4095FILE *f = fopen ("conftest.out", "w");
4096 return ferror (f) || fclose (f) != 0;
4097
4098 ;
4099 return 0;
4100}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004102ac_clean_files="$ac_clean_files conftest.out"
4103# Check that the compiler produces executables we can run. If not, either
4104# the compiler is broken, or we cross compile.
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4106$as_echo_n "checking whether we are cross compiling... " >&6; }
4107if test "$cross_compiling" != yes; then
4108 { { ac_try="$ac_link"
4109case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
4113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4114$as_echo "$ac_try_echo"; } >&5
4115 (eval "$ac_link") 2>&5
4116 ac_status=$?
4117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4118 test $ac_status = 0; }
4119 if { ac_try='./conftest$ac_cv_exeext'
4120 { { case "(($ac_try" in
4121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4122 *) ac_try_echo=$ac_try;;
4123esac
4124eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4125$as_echo "$ac_try_echo"; } >&5
4126 (eval "$ac_try") 2>&5
4127 ac_status=$?
4128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4129 test $ac_status = 0; }; }; then
4130 cross_compiling=no
4131 else
4132 if test "$cross_compiling" = maybe; then
4133 cross_compiling=yes
4134 else
4135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004137as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004138If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004139See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 fi
4141 fi
4142fi
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4144$as_echo "$cross_compiling" >&6; }
4145
4146rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4147ac_clean_files=$ac_clean_files_save
4148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4149$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004150if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo_n "(cached) " >&6
4152else
4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004154/* end confdefs.h. */
4155
4156int
4157main ()
4158{
4159
4160 ;
4161 return 0;
4162}
4163_ACEOF
4164rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004165if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166case "(($ac_try" in
4167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4168 *) ac_try_echo=$ac_try;;
4169esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004170eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4171$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4175 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 for ac_file in conftest.o conftest.obj conftest.*; do
4177 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004180 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4181 break;;
4182 esac
4183done
4184else
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004186sed 's/^/| /' conftest.$ac_ext >&5
4187
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4189$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004190as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004191See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004192fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004193rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4196$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004197OBJEXT=$ac_cv_objext
4198ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4200$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004201if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004203else
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004206
Martin v. Löwis11437992002-04-12 09:54:03 +00004207int
4208main ()
4209{
4210#ifndef __GNUC__
4211 choke me
4212#endif
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004219 ac_compiler_gnu=yes
4220else
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004224ac_cv_c_compiler_gnu=$ac_compiler_gnu
4225
4226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4228$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4229if test $ac_compiler_gnu = yes; then
4230 GCC=yes
4231else
4232 GCC=
4233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004234ac_test_CFLAGS=${CFLAGS+set}
4235ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4237$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004238if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004240else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241 ac_save_c_werror_flag=$ac_c_werror_flag
4242 ac_c_werror_flag=yes
4243 ac_cv_prog_cc_g=no
4244 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004247
Martin v. Löwis11437992002-04-12 09:54:03 +00004248int
4249main ()
4250{
4251
4252 ;
4253 return 0;
4254}
4255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004257 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258else
Matthias Kloseb9621712010-04-24 17:59:49 +00004259 CFLAGS=""
4260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261/* end confdefs.h. */
4262
4263int
4264main ()
4265{
4266
4267 ;
4268 return 0;
4269}
4270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004271if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272
Matthias Kloseb9621712010-04-24 17:59:49 +00004273else
4274 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277/* end confdefs.h. */
4278
4279int
4280main ()
4281{
4282
4283 ;
4284 return 0;
4285}
4286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004287if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295 ac_c_werror_flag=$ac_save_c_werror_flag
4296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4298$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004299if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004301elif test $ac_cv_prog_cc_g = yes; then
4302 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004303 CFLAGS="-g -O2"
4304 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004305 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306 fi
4307else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004308 if test "$GCC" = yes; then
4309 CFLAGS="-O2"
4310 else
4311 CFLAGS=
4312 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4315$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004316if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004318else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004320ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004322/* end confdefs.h. */
4323#include <stdarg.h>
4324#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004325struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004326/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4327struct buf { int x; };
4328FILE * (*rcsopen) (struct buf *, struct stat *, int);
4329static char *e (p, i)
4330 char **p;
4331 int i;
4332{
4333 return p[i];
4334}
4335static char *f (char * (*g) (char **, int), char **p, ...)
4336{
4337 char *s;
4338 va_list v;
4339 va_start (v,p);
4340 s = g (p, va_arg (v,int));
4341 va_end (v);
4342 return s;
4343}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004344
4345/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4346 function prototypes and stuff, but not '\xHH' hex character constants.
4347 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004349 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4350 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004352int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4355 inside strings and character constants. */
4356#define FOO(x) 'x'
4357int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4358
Skip Montanaro6dead952003-09-25 14:50:04 +00004359int test (int i, double x);
4360struct s1 {int (*f) (int a);};
4361struct s2 {int (*f) (double a);};
4362int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4363int argc;
4364char **argv;
4365int
4366main ()
4367{
4368return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4369 ;
4370 return 0;
4371}
4372_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4374 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004375do
4376 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380rm -f core conftest.err conftest.$ac_objext
4381 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004382done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004384CC=$ac_save_CC
4385
4386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387# AC_CACHE_VAL
4388case "x$ac_cv_prog_cc_c89" in
4389 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4391$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4394$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004395 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4398$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004399esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004400if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004401
Matthias Kloseb9621712010-04-24 17:59:49 +00004402fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004403
Martin v. Löwis11437992002-04-12 09:54:03 +00004404ac_ext=c
4405ac_cpp='$CPP $CPPFLAGS'
4406ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4407ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4408ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004410
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004411
4412
Matthias Kloseb9621712010-04-24 17:59:49 +00004413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4414$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004417if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004419
4420 case $withval in
4421 no) with_cxx_main=no
4422 MAINCC='$(CC)';;
4423 yes) with_cxx_main=yes
4424 MAINCC='$(CXX)';;
4425 *) with_cxx_main=yes
4426 MAINCC=$withval
4427 if test -z "$CXX"
4428 then
4429 CXX=$withval
4430 fi;;
4431 esac
4432else
4433
4434 with_cxx_main=no
4435 MAINCC='$(CC)'
4436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437fi
4438
Matthias Kloseb9621712010-04-24 17:59:49 +00004439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4440$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004441
4442preset_cxx="$CXX"
4443if test -z "$CXX"
4444then
4445 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004446 gcc) if test -n "$ac_tool_prefix"; then
4447 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4448set dummy ${ac_tool_prefix}g++; ac_word=$2
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4450$as_echo_n "checking for $ac_word... " >&6; }
4451if ${ac_cv_path_CXX+:} false; then :
4452 $as_echo_n "(cached) " >&6
4453else
4454 case $CXX in
4455 [\\/]* | ?:[\\/]*)
4456 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4457 ;;
4458 *)
4459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460for as_dir in notfound
4461do
4462 IFS=$as_save_IFS
4463 test -z "$as_dir" && as_dir=.
4464 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004465 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004466 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4468 break 2
4469 fi
4470done
4471 done
4472IFS=$as_save_IFS
4473
4474 ;;
4475esac
4476fi
4477CXX=$ac_cv_path_CXX
4478if test -n "$CXX"; then
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4480$as_echo "$CXX" >&6; }
4481else
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4483$as_echo "no" >&6; }
4484fi
4485
4486
4487fi
4488if test -z "$ac_cv_path_CXX"; then
4489 ac_pt_CXX=$CXX
4490 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004491set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4493$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004494if ${ac_cv_path_ac_pt_CXX+:} false; then :
4495 $as_echo_n "(cached) " >&6
4496else
4497 case $ac_pt_CXX in
4498 [\\/]* | ?:[\\/]*)
4499 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4500 ;;
4501 *)
4502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in notfound
4504do
4505 IFS=$as_save_IFS
4506 test -z "$as_dir" && as_dir=.
4507 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004509 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4511 break 2
4512 fi
4513done
4514 done
4515IFS=$as_save_IFS
4516
4517 ;;
4518esac
4519fi
4520ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4521if test -n "$ac_pt_CXX"; then
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4523$as_echo "$ac_pt_CXX" >&6; }
4524else
4525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526$as_echo "no" >&6; }
4527fi
4528
4529 if test "x$ac_pt_CXX" = x; then
4530 CXX="g++"
4531 else
4532 case $cross_compiling:$ac_tool_warned in
4533yes:)
4534{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4535$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4536ac_tool_warned=yes ;;
4537esac
4538 CXX=$ac_pt_CXX
4539 fi
4540else
4541 CXX="$ac_cv_path_CXX"
4542fi
4543 ;;
4544 cc) if test -n "$ac_tool_prefix"; then
4545 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4546set dummy ${ac_tool_prefix}c++; ac_word=$2
4547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4548$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004549if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004550 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551else
4552 case $CXX in
4553 [\\/]* | ?:[\\/]*)
4554 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4555 ;;
4556 *)
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in notfound
4559do
4560 IFS=$as_save_IFS
4561 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004563 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004564 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004566 break 2
4567 fi
4568done
Matthias Kloseb9621712010-04-24 17:59:49 +00004569 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004570IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004571
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004572 ;;
4573esac
4574fi
4575CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004576if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4578$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004579else
Matthias Kloseb9621712010-04-24 17:59:49 +00004580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004583
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004584
4585fi
4586if test -z "$ac_cv_path_CXX"; then
4587 ac_pt_CXX=$CXX
4588 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4591$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004592if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004593 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004595 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004597 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 +00004598 ;;
4599 *)
4600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4601for as_dir in notfound
4602do
4603 IFS=$as_save_IFS
4604 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004605 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004607 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609 break 2
4610 fi
4611done
Matthias Kloseb9621712010-04-24 17:59:49 +00004612 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004613IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004614
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615 ;;
4616esac
4617fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004618ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4619if test -n "$ac_pt_CXX"; then
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4621$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004622else
Matthias Kloseb9621712010-04-24 17:59:49 +00004623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4624$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004626
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004627 if test "x$ac_pt_CXX" = x; then
4628 CXX="c++"
4629 else
4630 case $cross_compiling:$ac_tool_warned in
4631yes:)
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4634ac_tool_warned=yes ;;
4635esac
4636 CXX=$ac_pt_CXX
4637 fi
4638else
4639 CXX="$ac_cv_path_CXX"
4640fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004642 clang|*/clang) if test -n "$ac_tool_prefix"; then
4643 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4644set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4646$as_echo_n "checking for $ac_word... " >&6; }
4647if ${ac_cv_path_CXX+:} false; then :
4648 $as_echo_n "(cached) " >&6
4649else
4650 case $CXX in
4651 [\\/]* | ?:[\\/]*)
4652 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4653 ;;
4654 *)
4655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4656for as_dir in notfound
4657do
4658 IFS=$as_save_IFS
4659 test -z "$as_dir" && as_dir=.
4660 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004662 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4663 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4664 break 2
4665 fi
4666done
4667 done
4668IFS=$as_save_IFS
4669
Ned Deilycbfb9a52012-06-23 16:02:19 -07004670 ;;
4671esac
4672fi
4673CXX=$ac_cv_path_CXX
4674if test -n "$CXX"; then
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4676$as_echo "$CXX" >&6; }
4677else
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4679$as_echo "no" >&6; }
4680fi
4681
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004682
4683fi
4684if test -z "$ac_cv_path_CXX"; then
4685 ac_pt_CXX=$CXX
4686 # Extract the first word of "clang++", so it can be a program name with args.
4687set dummy clang++; ac_word=$2
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4689$as_echo_n "checking for $ac_word... " >&6; }
4690if ${ac_cv_path_ac_pt_CXX+:} false; then :
4691 $as_echo_n "(cached) " >&6
4692else
4693 case $ac_pt_CXX in
4694 [\\/]* | ?:[\\/]*)
4695 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4696 ;;
4697 *)
4698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4699for as_dir in notfound
4700do
4701 IFS=$as_save_IFS
4702 test -z "$as_dir" && as_dir=.
4703 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004705 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4707 break 2
4708 fi
4709done
4710 done
4711IFS=$as_save_IFS
4712
4713 ;;
4714esac
4715fi
4716ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4717if test -n "$ac_pt_CXX"; then
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4719$as_echo "$ac_pt_CXX" >&6; }
4720else
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4722$as_echo "no" >&6; }
4723fi
4724
4725 if test "x$ac_pt_CXX" = x; then
4726 CXX="clang++"
4727 else
4728 case $cross_compiling:$ac_tool_warned in
4729yes:)
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4732ac_tool_warned=yes ;;
4733esac
4734 CXX=$ac_pt_CXX
4735 fi
4736else
4737 CXX="$ac_cv_path_CXX"
4738fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004739 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740 esac
4741 if test "$CXX" = "notfound"
4742 then
4743 CXX=""
4744 fi
4745fi
4746if test -z "$CXX"
4747then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004748 if test -n "$ac_tool_prefix"; then
4749 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4750 do
4751 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4752set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4754$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004755if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757else
4758 if test -n "$CXX"; then
4759 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4760else
4761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4762for as_dir in $PATH
4763do
4764 IFS=$as_save_IFS
4765 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004768 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 break 2
4771 fi
4772done
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004774IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775
4776fi
4777fi
4778CXX=$ac_cv_prog_CXX
4779if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4781$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782else
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785fi
4786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788 test -n "$CXX" && break
4789 done
4790fi
4791if test -z "$CXX"; then
4792 ac_ct_CXX=$CXX
4793 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4794do
4795 # Extract the first word of "$ac_prog", so it can be a program name with args.
4796set dummy $ac_prog; ac_word=$2
4797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4798$as_echo_n "checking for $ac_word... " >&6; }
4799if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4800 $as_echo_n "(cached) " >&6
4801else
4802 if test -n "$ac_ct_CXX"; then
4803 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4804else
4805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in $PATH
4807do
4808 IFS=$as_save_IFS
4809 test -z "$as_dir" && as_dir=.
4810 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812 ac_cv_prog_ac_ct_CXX="$ac_prog"
4813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4814 break 2
4815 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817 done
4818IFS=$as_save_IFS
4819
4820fi
4821fi
4822ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4823if test -n "$ac_ct_CXX"; then
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4825$as_echo "$ac_ct_CXX" >&6; }
4826else
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828$as_echo "no" >&6; }
4829fi
4830
4831
4832 test -n "$ac_ct_CXX" && break
4833done
4834
4835 if test "x$ac_ct_CXX" = x; then
4836 CXX="notfound"
4837 else
4838 case $cross_compiling:$ac_tool_warned in
4839yes:)
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4841$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4842ac_tool_warned=yes ;;
4843esac
4844 CXX=$ac_ct_CXX
4845 fi
4846fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847
4848 if test "$CXX" = "notfound"
4849 then
4850 CXX=""
4851 fi
4852fi
4853if test "$preset_cxx" != "$CXX"
4854then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004855 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004856
4857 By default, distutils will build C++ extension modules with \"$CXX\".
4858 If this is not intended, then set CXX on the configure command line.
4859 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004860$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861
4862 By default, distutils will build C++ extension modules with \"$CXX\".
4863 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004864 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865fi
4866
4867
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4869$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4870save_LDFLAGS="$LDFLAGS"
4871LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004872
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4874/* end confdefs.h. */
4875
4876int
4877main ()
4878{
4879
4880 ;
4881 return 0;
4882}
4883_ACEOF
4884if ac_fn_c_try_link "$LINENO"; then :
4885 NO_AS_NEEDED="-Wl,--no-as-needed"
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4887$as_echo "yes" >&6; }
4888else
4889 NO_AS_NEEDED=""
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893rm -f core conftest.err conftest.$ac_objext \
4894 conftest$ac_exeext conftest.$ac_ext
4895LDFLAGS="$save_LDFLAGS"
4896
4897
4898
4899# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004900ac_ext=c
4901ac_cpp='$CPP $CPPFLAGS'
4902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4904ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4906$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004907# On Suns, sometimes $CPP names a directory.
4908if test -n "$CPP" && test -d "$CPP"; then
4909 CPP=
4910fi
4911if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004912 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004913 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004914else
Martin v. Löwis11437992002-04-12 09:54:03 +00004915 # Double quotes because CPP needs to be expanded
4916 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4917 do
4918 ac_preproc_ok=false
4919for ac_c_preproc_warn_flag in '' yes
4920do
4921 # Use a header file that comes with gcc, so configuring glibc
4922 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004923 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4924 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004925 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004928/* end confdefs.h. */
4929#ifdef __STDC__
4930# include <limits.h>
4931#else
4932# include <assert.h>
4933#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004934 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004936if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004937
Matthias Kloseb9621712010-04-24 17:59:49 +00004938else
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 # Broken: fails on valid input.
4940continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004941fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004942rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004944 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004945 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004948#include <ac_nonexistent.h>
4949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004950if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004951 # Broken: success on invalid input.
4952continue
4953else
Martin v. Löwis11437992002-04-12 09:54:03 +00004954 # Passes both tests.
4955ac_preproc_ok=:
4956break
4957fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004958rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004959
4960done
4961# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004962rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004963if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 break
4965fi
4966
4967 done
4968 ac_cv_prog_CPP=$CPP
4969
4970fi
4971 CPP=$ac_cv_prog_CPP
4972else
4973 ac_cv_prog_CPP=$CPP
4974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4976$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004977ac_preproc_ok=false
4978for ac_c_preproc_warn_flag in '' yes
4979do
4980 # Use a header file that comes with gcc, so configuring glibc
4981 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004982 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4983 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004984 # On the NeXT, cc -E runs the code through the compiler's parser,
4985 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004987/* end confdefs.h. */
4988#ifdef __STDC__
4989# include <limits.h>
4990#else
4991# include <assert.h>
4992#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004993 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004995if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004996
Matthias Kloseb9621712010-04-24 17:59:49 +00004997else
Martin v. Löwis11437992002-04-12 09:54:03 +00004998 # Broken: fails on valid input.
4999continue
5000fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005001rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005003 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00005004 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00005006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005007#include <ac_nonexistent.h>
5008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005009if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005010 # Broken: success on invalid input.
5011continue
5012else
Martin v. Löwis11437992002-04-12 09:54:03 +00005013 # Passes both tests.
5014ac_preproc_ok=:
5015break
5016fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005017rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005018
5019done
5020# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005021rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005022if $ac_preproc_ok; then :
5023
Martin v. Löwis11437992002-04-12 09:54:03 +00005024else
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005027as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005028See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005029fi
5030
5031ac_ext=c
5032ac_cpp='$CPP $CPPFLAGS'
5033ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5034ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5035ac_compiler_gnu=$ac_cv_c_compiler_gnu
5036
5037
Matthias Kloseb9621712010-04-24 17:59:49 +00005038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5039$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005040if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005042else
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005044 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 # Loop through the user's path and test for each of PROGNAME-LIST
5046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005047for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5048do
5049 IFS=$as_save_IFS
5050 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 for ac_prog in grep ggrep; do
5052 for ac_exec_ext in '' $ac_executable_extensions; do
5053 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005054 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005055# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056 # Check for GNU $ac_path_GREP
5057case `"$ac_path_GREP" --version 2>&1` in
5058*GNU*)
5059 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5060*)
5061 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063 while :
5064 do
5065 cat "conftest.in" "conftest.in" >"conftest.tmp"
5066 mv "conftest.tmp" "conftest.in"
5067 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5070 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005072 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5073 # Best one so far, save it but keep looking for a better one
5074 ac_cv_path_GREP="$ac_path_GREP"
5075 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005076 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077 # 10*(2^10) chars as input seems more than enough
5078 test $ac_count -gt 10 && break
5079 done
5080 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5081esac
5082
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $ac_path_GREP_found && break 3
5084 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005085 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005089 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 +00005090 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091else
5092 ac_cv_path_GREP=$GREP
5093fi
5094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5097$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098 GREP="$ac_cv_path_GREP"
5099
5100
Matthias Kloseb9621712010-04-24 17:59:49 +00005101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5102$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005103if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105else
5106 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5107 then ac_cv_path_EGREP="$GREP -E"
5108 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005110 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 # Loop through the user's path and test for each of PROGNAME-LIST
5112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005113for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5114do
5115 IFS=$as_save_IFS
5116 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 for ac_prog in egrep; do
5118 for ac_exec_ext in '' $ac_executable_extensions; do
5119 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005120 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005121# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005122 # Check for GNU $ac_path_EGREP
5123case `"$ac_path_EGREP" --version 2>&1` in
5124*GNU*)
5125 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5126*)
5127 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005129 while :
5130 do
5131 cat "conftest.in" "conftest.in" >"conftest.tmp"
5132 mv "conftest.tmp" "conftest.in"
5133 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005135 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5136 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005138 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5139 # Best one so far, save it but keep looking for a better one
5140 ac_cv_path_EGREP="$ac_path_EGREP"
5141 ac_path_EGREP_max=$ac_count
5142 fi
5143 # 10*(2^10) chars as input seems more than enough
5144 test $ac_count -gt 10 && break
5145 done
5146 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5147esac
5148
Matthias Kloseb9621712010-04-24 17:59:49 +00005149 $ac_path_EGREP_found && break 3
5150 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005151 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005152 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005153IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005155 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 +00005156 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005157else
5158 ac_cv_path_EGREP=$EGREP
5159fi
5160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005161 fi
5162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5164$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005165 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005166
5167
Matthias Kloseb9621712010-04-24 17:59:49 +00005168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5169$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005170if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005171 $as_echo_n "(cached) " >&6
5172else
5173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005174/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005175#include <stdlib.h>
5176#include <stdarg.h>
5177#include <string.h>
5178#include <float.h>
5179
5180int
5181main ()
5182{
5183
5184 ;
5185 return 0;
5186}
5187_ACEOF
5188if ac_fn_c_try_compile "$LINENO"; then :
5189 ac_cv_header_stdc=yes
5190else
5191 ac_cv_header_stdc=no
5192fi
5193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5194
5195if test $ac_cv_header_stdc = yes; then
5196 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5198/* end confdefs.h. */
5199#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005200
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005201_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005203 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005204
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205else
Matthias Kloseb9621712010-04-24 17:59:49 +00005206 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005207fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005208rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209
Matthias Kloseb9621712010-04-24 17:59:49 +00005210fi
5211
5212if test $ac_cv_header_stdc = yes; then
5213 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5215/* end confdefs.h. */
5216#include <stdlib.h>
5217
5218_ACEOF
5219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5220 $EGREP "free" >/dev/null 2>&1; then :
5221
5222else
5223 ac_cv_header_stdc=no
5224fi
5225rm -f conftest*
5226
5227fi
5228
5229if test $ac_cv_header_stdc = yes; then
5230 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5231 if test "$cross_compiling" = yes; then :
5232 :
5233else
5234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235/* end confdefs.h. */
5236#include <ctype.h>
5237#include <stdlib.h>
5238#if ((' ' & 0x0FF) == 0x020)
5239# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5240# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5241#else
5242# define ISLOWER(c) \
5243 (('a' <= (c) && (c) <= 'i') \
5244 || ('j' <= (c) && (c) <= 'r') \
5245 || ('s' <= (c) && (c) <= 'z'))
5246# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5247#endif
5248
5249#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5250int
5251main ()
5252{
5253 int i;
5254 for (i = 0; i < 256; i++)
5255 if (XOR (islower (i), ISLOWER (i))
5256 || toupper (i) != TOUPPER (i))
5257 return 2;
5258 return 0;
5259}
5260_ACEOF
5261if ac_fn_c_try_run "$LINENO"; then :
5262
5263else
5264 ac_cv_header_stdc=no
5265fi
5266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5267 conftest.$ac_objext conftest.beam conftest.$ac_ext
5268fi
5269
5270fi
5271fi
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5273$as_echo "$ac_cv_header_stdc" >&6; }
5274if test $ac_cv_header_stdc = yes; then
5275
5276$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5277
5278fi
5279
5280# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5281for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5282 inttypes.h stdint.h unistd.h
5283do :
5284 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5285ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5286"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005287if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005288 cat >>confdefs.h <<_ACEOF
5289#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5290_ACEOF
5291
5292fi
5293
5294done
5295
5296
5297
5298 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 +02005299if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005300 MINIX=yes
5301else
5302 MINIX=
5303fi
5304
5305
5306 if test "$MINIX" = yes; then
5307
5308$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5309
5310
5311$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5312
5313
5314$as_echo "#define _MINIX 1" >>confdefs.h
5315
5316 fi
5317
5318
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5320$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005321if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005322 $as_echo_n "(cached) " >&6
5323else
5324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5325/* end confdefs.h. */
5326
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005327# define __EXTENSIONS__ 1
5328 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005329int
5330main ()
5331{
5332
5333 ;
5334 return 0;
5335}
5336_ACEOF
5337if ac_fn_c_try_compile "$LINENO"; then :
5338 ac_cv_safe_to_define___extensions__=yes
5339else
5340 ac_cv_safe_to_define___extensions__=no
5341fi
5342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5343fi
5344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5345$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5346 test $ac_cv_safe_to_define___extensions__ = yes &&
5347 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5348
5349 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5350
5351 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5352
5353 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5354
5355 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5356
5357
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359# Check for unsupported systems
5360case $ac_sys_system/$ac_sys_release in
5361atheos*|Linux*/1*)
5362 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5363 echo See README for details.
5364 exit 1;;
5365esac
5366
5367
Matthias Kloseb9621712010-04-24 17:59:49 +00005368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5369$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005370
5371# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005372if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373 withval=$with_suffix;
5374 case $withval in
5375 no) EXEEXT=;;
5376 yes) EXEEXT=.exe;;
5377 *) EXEEXT=$withval;;
5378 esac
5379fi
5380
Matthias Kloseb9621712010-04-24 17:59:49 +00005381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5382$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383
5384# Test whether we're running on a non-case-sensitive system, in which
5385# case we give a warning if no ext is given
5386
Matthias Kloseb9621712010-04-24 17:59:49 +00005387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5388$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389if test ! -d CaseSensitiveTestDir; then
5390mkdir CaseSensitiveTestDir
5391fi
5392
5393if test -d casesensitivetestdir
5394then
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5396$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 BUILDEXEEXT=.exe
5398else
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5400$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401 BUILDEXEEXT=$EXEEXT
5402fi
5403rmdir CaseSensitiveTestDir
5404
5405case $MACHDEP in
5406bsdos*)
5407 case $CC in
5408 gcc) CC="$CC -D_HAVE_BSDI";;
5409 esac;;
5410esac
5411
5412case $ac_sys_system in
5413hp*|HP*)
5414 case $CC in
5415 cc|*/cc) CC="$CC -Ae";;
5416 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417esac
5418
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005419MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5420
5421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422
5423
Matthias Kloseb9621712010-04-24 17:59:49 +00005424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5425$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426if test -z "$LIBRARY"
5427then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005428 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5431$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
5433# LDLIBRARY is the name of the library to link against (as opposed to the
5434# name of the library into which to insert object files). BLDLIBRARY is also
5435# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5436# is blank as the main program is not linked directly against LDLIBRARY.
5437# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5438# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5439# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5440# DLLLIBRARY is the shared (i.e., DLL) library.
5441#
5442# RUNSHARED is used to run shared python without installed libraries
5443#
5444# INSTSONAME is the name of the shared library that will be use to install
5445# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005446#
5447# LDVERSION is the shared library version number, normally the Python version
5448# with the ABI build flags appended.
5449
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
5451
5452
5453
5454
5455
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005456
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457LDLIBRARY="$LIBRARY"
5458BLDLIBRARY='$(LDLIBRARY)'
5459INSTSONAME='$(LDLIBRARY)'
5460DLLLIBRARY=''
5461LDLIBRARYDIR=''
5462RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005463LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464
5465# LINKCC is the command that links the python executable -- default is $(CC).
5466# If CXX is set, and if it is needed to link a main function that was
5467# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5468# python might then depend on the C++ runtime
5469# This is altered for AIX in order to build the export list before
5470# linking.
5471
Matthias Kloseb9621712010-04-24 17:59:49 +00005472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5473$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005474if test -z "$LINKCC"
5475then
5476 LINKCC='$(PURIFY) $(MAINCC)'
5477 case $ac_sys_system in
5478 AIX*)
5479 exp_extra="\"\""
5480 if test $ac_sys_release -ge 5 -o \
5481 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5482 exp_extra="."
5483 fi
5484 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485 QNX*)
5486 # qcc must be used because the other compilers do not
5487 # support -N.
5488 LINKCC=qcc;;
5489 esac
5490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5492$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
5494# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5495# make sure we default having it set to "no": this is used by
5496# distutils.unixccompiler to know if it should add --enable-new-dtags
5497# to linker command lines, and failing to detect GNU ld simply results
5498# in the same bahaviour as before.
5499
Matthias Kloseb9621712010-04-24 17:59:49 +00005500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5501$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502ac_prog=ld
5503if test "$GCC" = yes; then
5504 ac_prog=`$CC -print-prog-name=ld`
5505fi
5506case `"$ac_prog" -V 2>&1 < /dev/null` in
5507 *GNU*)
5508 GNULD=yes;;
5509 *)
5510 GNULD=no;;
5511esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5513$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5516$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005517if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005518 $as_echo_n "(cached) " >&6
5519else
5520 ac_cv_c_inline=no
5521for ac_kw in inline __inline__ __inline; do
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5523/* end confdefs.h. */
5524#ifndef __cplusplus
5525typedef int foo_t;
5526static $ac_kw foo_t static_foo () {return 0; }
5527$ac_kw foo_t foo () {return 0; }
5528#endif
5529
5530_ACEOF
5531if ac_fn_c_try_compile "$LINENO"; then :
5532 ac_cv_c_inline=$ac_kw
5533fi
5534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5535 test "$ac_cv_c_inline" != no && break
5536done
5537
5538fi
5539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5540$as_echo "$ac_cv_c_inline" >&6; }
5541
5542case $ac_cv_c_inline in
5543 inline | yes) ;;
5544 *)
5545 case $ac_cv_c_inline in
5546 no) ac_val=;;
5547 *) ac_val=$ac_cv_c_inline;;
5548 esac
5549 cat >>confdefs.h <<_ACEOF
5550#ifndef __cplusplus
5551#define inline $ac_val
5552#endif
5553_ACEOF
5554 ;;
5555esac
5556
5557if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005558
5559$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005560
5561
5562fi
5563
5564
Matthias Kloseb9621712010-04-24 17:59:49 +00005565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5566$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005568if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 enableval=$enable_shared;
5570fi
5571
5572
5573if test -z "$enable_shared"
5574then
5575 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005576 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005577 enable_shared="yes";;
5578 *)
5579 enable_shared="no";;
5580 esac
5581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5583$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005584
Matthias Kloseb9621712010-04-24 17:59:49 +00005585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5586$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005588if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005589 enableval=$enable_profiling;
5590fi
5591
5592if test "x$enable_profiling" = xyes; then
5593 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005594 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596/* end confdefs.h. */
5597int main() { return 0; }
5598_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005599if ac_fn_c_try_link "$LINENO"; then :
5600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005602 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005604rm -f core conftest.err conftest.$ac_objext \
5605 conftest$ac_exeext conftest.$ac_ext
5606 CC="$ac_save_cc"
5607else
5608 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5611$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
doko@ubuntu.comba015832012-06-30 16:52:05 +02005613if test "x$enable_profiling" = xyes; then
5614 BASECFLAGS="-pg $BASECFLAGS"
5615 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616fi
5617
Matthias Kloseb9621712010-04-24 17:59:49 +00005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5619$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620
5621# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5622# library that we build, but we do not want to link against it (we
5623# will find it with a -framework option). For this reason there is an
5624# extra variable BLDLIBRARY against which Python and the extension
5625# modules are linked, BLDLIBRARY. This is normally the same as
5626# LDLIBRARY, but empty for MacOSX framework builds.
5627if test "$enable_framework"
5628then
5629 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005630 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631 BLDLIBRARY=''
5632else
5633 BLDLIBRARY='$(LDLIBRARY)'
5634fi
5635
5636# Other platforms follow
5637if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005638 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639
Matthias Kloseb9621712010-04-24 17:59:49 +00005640$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
5642 case $ac_sys_system in
5643 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).dll.a'
5645 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646 ;;
5647 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005648 LDLIBRARY='libpython$(LDVERSION).so'
5649 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005650 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005652 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005653 then
5654 PY3LIBRARY=libpython3.so
5655 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005657 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005658 LDLIBRARY='libpython$(LDVERSION).so'
5659 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005660 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005662 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005663 then
5664 PY3LIBRARY=libpython3.so
5665 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 ;;
5667 hp*|HP*)
5668 case `uname -m` in
5669 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005670 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 ;;
5672 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005673 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 ;;
5675 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005676 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005677 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005680 LDLIBRARY='libpython$(LDVERSION).dylib'
5681 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005682 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005684 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005685 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005686 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005687 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689 esac
5690else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005691 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 case $ac_sys_system in
5693 CYGWIN*)
5694 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005695 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 ;;
5697 esac
5698fi
5699
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005700if test "$cross_compiling" = yes; then
5701 RUNSHARED=
5702fi
5703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5705$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
5707if test -n "$ac_tool_prefix"; then
5708 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5709set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005712if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714else
5715 if test -n "$RANLIB"; then
5716 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5717else
5718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5719for as_dir in $PATH
5720do
5721 IFS=$as_save_IFS
5722 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727 break 2
5728 fi
5729done
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731IFS=$as_save_IFS
5732
5733fi
5734fi
5735RANLIB=$ac_cv_prog_RANLIB
5736if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5738$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739else
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
5743
5744
5745fi
5746if test -z "$ac_cv_prog_RANLIB"; then
5747 ac_ct_RANLIB=$RANLIB
5748 # Extract the first word of "ranlib", so it can be a program name with args.
5749set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5751$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005752if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754else
5755 if test -n "$ac_ct_RANLIB"; then
5756 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5757else
5758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5759for as_dir in $PATH
5760do
5761 IFS=$as_save_IFS
5762 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005763 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 break 2
5768 fi
5769done
Matthias Kloseb9621712010-04-24 17:59:49 +00005770 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771IFS=$as_save_IFS
5772
5773fi
5774fi
5775ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5776if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5778$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779else
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782fi
5783
5784 if test "x$ac_ct_RANLIB" = x; then
5785 RANLIB=":"
5786 else
5787 case $cross_compiling:$ac_tool_warned in
5788yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791ac_tool_warned=yes ;;
5792esac
5793 RANLIB=$ac_ct_RANLIB
5794 fi
5795else
5796 RANLIB="$ac_cv_prog_RANLIB"
5797fi
5798
5799
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005800if test -n "$ac_tool_prefix"; then
5801 for ac_prog in ar aal
5802 do
5803 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005807if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809else
5810 if test -n "$AR"; then
5811 ac_cv_prog_AR="$AR" # Let the user override the test.
5812else
5813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816 IFS=$as_save_IFS
5817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005820 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 break 2
5823 fi
5824done
Matthias Kloseb9621712010-04-24 17:59:49 +00005825 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826IFS=$as_save_IFS
5827
5828fi
5829fi
5830AR=$ac_cv_prog_AR
5831if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5833$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834else
Matthias Kloseb9621712010-04-24 17:59:49 +00005835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
5838
5839
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005840 test -n "$AR" && break
5841 done
5842fi
5843if test -z "$AR"; then
5844 ac_ct_AR=$AR
5845 for ac_prog in ar aal
5846do
5847 # Extract the first word of "$ac_prog", so it can be a program name with args.
5848set dummy $ac_prog; ac_word=$2
5849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850$as_echo_n "checking for $ac_word... " >&6; }
5851if ${ac_cv_prog_ac_ct_AR+:} false; then :
5852 $as_echo_n "(cached) " >&6
5853else
5854 if test -n "$ac_ct_AR"; then
5855 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5856else
5857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5858for as_dir in $PATH
5859do
5860 IFS=$as_save_IFS
5861 test -z "$as_dir" && as_dir=.
5862 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005863 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005864 ac_cv_prog_ac_ct_AR="$ac_prog"
5865 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5866 break 2
5867 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005869 done
5870IFS=$as_save_IFS
5871
5872fi
5873fi
5874ac_ct_AR=$ac_cv_prog_ac_ct_AR
5875if test -n "$ac_ct_AR"; then
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5877$as_echo "$ac_ct_AR" >&6; }
5878else
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880$as_echo "no" >&6; }
5881fi
5882
5883
5884 test -n "$ac_ct_AR" && break
5885done
5886
5887 if test "x$ac_ct_AR" = x; then
5888 AR="ar"
5889 else
5890 case $cross_compiling:$ac_tool_warned in
5891yes:)
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5894ac_tool_warned=yes ;;
5895esac
5896 AR=$ac_ct_AR
5897 fi
5898fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899
5900
5901# tweak ARFLAGS only if the user didn't set it on the command line
5902
5903if test -z "$ARFLAGS"
5904then
5905 ARFLAGS="rc"
5906fi
5907
doko@ubuntu.com58844492012-06-30 18:25:32 +02005908if test -n "$ac_tool_prefix"; then
5909 for ac_prog in readelf
5910 do
5911 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5912set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_prog_READELF+:} false; then :
5916 $as_echo_n "(cached) " >&6
5917else
5918 if test -n "$READELF"; then
5919 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5920else
5921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5922for as_dir in $PATH
5923do
5924 IFS=$as_save_IFS
5925 test -z "$as_dir" && as_dir=.
5926 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005928 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5930 break 2
5931 fi
5932done
5933 done
5934IFS=$as_save_IFS
5935
5936fi
5937fi
5938READELF=$ac_cv_prog_READELF
5939if test -n "$READELF"; then
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5941$as_echo "$READELF" >&6; }
5942else
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948 test -n "$READELF" && break
5949 done
5950fi
5951if test -z "$READELF"; then
5952 ac_ct_READELF=$READELF
5953 for ac_prog in readelf
5954do
5955 # Extract the first word of "$ac_prog", so it can be a program name with args.
5956set dummy $ac_prog; ac_word=$2
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
5959if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5960 $as_echo_n "(cached) " >&6
5961else
5962 if test -n "$ac_ct_READELF"; then
5963 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5964else
5965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
5970 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005972 ac_cv_prog_ac_ct_READELF="$ac_prog"
5973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974 break 2
5975 fi
5976done
5977 done
5978IFS=$as_save_IFS
5979
5980fi
5981fi
5982ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5983if test -n "$ac_ct_READELF"; then
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5985$as_echo "$ac_ct_READELF" >&6; }
5986else
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
5989fi
5990
5991
5992 test -n "$ac_ct_READELF" && break
5993done
5994
5995 if test "x$ac_ct_READELF" = x; then
5996 READELF=":"
5997 else
5998 case $cross_compiling:$ac_tool_warned in
5999yes:)
6000{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6001$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6002ac_tool_warned=yes ;;
6003esac
6004 READELF=$ac_ct_READELF
6005 fi
6006fi
6007
6008if test "$cross_compiling" = yes; then
6009 case "$READELF" in
6010 readelf|:)
6011 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6012 ;;
6013 esac
6014fi
6015
6016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017
Matthias Klosec4c48422012-10-21 23:05:35 +02006018for ac_prog in python$PACKAGE_VERSION python3 python
6019do
6020 # Extract the first word of "$ac_prog", so it can be a program name with args.
6021set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6023$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006024if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006025 $as_echo_n "(cached) " >&6
6026else
Matthias Klosec4c48422012-10-21 23:05:35 +02006027 if test -n "$PYTHON"; then
6028 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029else
6030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6031for as_dir in $PATH
6032do
6033 IFS=$as_save_IFS
6034 test -z "$as_dir" && as_dir=.
6035 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006037 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6039 break 2
6040 fi
6041done
6042 done
6043IFS=$as_save_IFS
6044
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006045fi
6046fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006047PYTHON=$ac_cv_prog_PYTHON
6048if test -n "$PYTHON"; then
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6050$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006051else
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053$as_echo "no" >&6; }
6054fi
6055
6056
Matthias Klosec4c48422012-10-21 23:05:35 +02006057 test -n "$PYTHON" && break
6058done
6059test -n "$PYTHON" || PYTHON="not-found"
6060
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006061if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006062 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6063else
6064 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006065fi
6066
6067
Kushal Das02d23a22014-04-15 23:50:06 +05306068for ac_prog in python$PACKAGE_VERSION python3 python
6069do
6070 # Extract the first word of "$ac_prog", so it can be a program name with args.
6071set dummy $ac_prog; ac_word=$2
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
6074if ${ac_cv_prog_PYTHON+:} false; then :
6075 $as_echo_n "(cached) " >&6
6076else
6077 if test -n "$PYTHON"; then
6078 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6079else
6080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083 IFS=$as_save_IFS
6084 test -z "$as_dir" && as_dir=.
6085 for ac_exec_ext in '' $ac_executable_extensions; do
6086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087 ac_cv_prog_PYTHON="$ac_prog"
6088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089 break 2
6090 fi
6091done
6092 done
6093IFS=$as_save_IFS
6094
6095fi
6096fi
6097PYTHON=$ac_cv_prog_PYTHON
6098if test -n "$PYTHON"; then
6099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6100$as_echo "$PYTHON" >&6; }
6101else
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
6104fi
6105
6106
6107 test -n "$PYTHON" && break
6108done
6109test -n "$PYTHON" || PYTHON="not-found"
6110
6111if test "$PYTHON" = not-found; then
6112 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6113else
6114 OPCODEHGEN="$PYTHON"
6115fi
6116
6117
6118
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119case $MACHDEP in
6120bsdos*|hp*|HP*)
6121 # install -d does not work on BSDI or HP-UX
6122 if test -z "$INSTALL"
6123 then
6124 INSTALL="${srcdir}/install-sh -c"
6125 fi
6126esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127# Find a good install program. We prefer a C program (faster),
6128# so one script is as good as another. But avoid the broken or
6129# incompatible versions:
6130# SysV /etc/install, /usr/sbin/install
6131# SunOS /usr/etc/install
6132# IRIX /sbin/install
6133# AIX /bin/install
6134# AmigaOS /C/install, which installs bootblocks on floppy discs
6135# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6136# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6137# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6138# OS/2's system install, which has a completely different semantic
6139# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006140# Reject install programs that cannot install multiple files.
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6142$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006144if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146else
6147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150 IFS=$as_save_IFS
6151 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006152 # Account for people who put trailing slashes in PATH elements.
6153case $as_dir/ in #((
6154 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157 /usr/ucb/* ) ;;
6158 *)
6159 # OSF1 and SCO ODT 3.0 have their own names for install.
6160 # Don't use installbsd from OSF since it installs stuff as root
6161 # by default.
6162 for ac_prog in ginstall scoinst install; do
6163 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006164 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165 if test $ac_prog = install &&
6166 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6167 # AIX install. It has an incompatible calling convention.
6168 :
6169 elif test $ac_prog = install &&
6170 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6171 # program-specific install script used by HP pwplus--don't use.
6172 :
6173 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 rm -rf conftest.one conftest.two conftest.dir
6175 echo one > conftest.one
6176 echo two > conftest.two
6177 mkdir conftest.dir
6178 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6179 test -s conftest.one && test -s conftest.two &&
6180 test -s conftest.dir/conftest.one &&
6181 test -s conftest.dir/conftest.two
6182 then
6183 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6184 break 3
6185 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186 fi
6187 fi
6188 done
6189 done
6190 ;;
6191esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006192
6193 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194IFS=$as_save_IFS
6195
Matthias Kloseb9621712010-04-24 17:59:49 +00006196rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197
6198fi
6199 if test "${ac_cv_path_install+set}" = set; then
6200 INSTALL=$ac_cv_path_install
6201 else
6202 # As a last resort, use the slow shell script. Don't cache a
6203 # value for INSTALL within a source directory, because that will
6204 # break other packages using the cache if that directory is
6205 # removed, or if the value is a relative name.
6206 INSTALL=$ac_install_sh
6207 fi
6208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6210$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211
6212# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6213# It thinks the first close brace ends the variable substitution.
6214test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6215
6216test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6217
6218test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6219
Matthias Klose93a0ef12012-03-15 18:08:34 +01006220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6221$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6222if test -z "$MKDIR_P"; then
6223 if ${ac_cv_path_mkdir+:} false; then :
6224 $as_echo_n "(cached) " >&6
6225else
6226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6228do
6229 IFS=$as_save_IFS
6230 test -z "$as_dir" && as_dir=.
6231 for ac_prog in mkdir gmkdir; do
6232 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006233 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006234 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6235 'mkdir (GNU coreutils) '* | \
6236 'mkdir (coreutils) '* | \
6237 'mkdir (fileutils) '4.1*)
6238 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6239 break 3;;
6240 esac
6241 done
6242 done
6243 done
6244IFS=$as_save_IFS
6245
6246fi
6247
6248 test -d ./--version && rmdir ./--version
6249 if test "${ac_cv_path_mkdir+set}" = set; then
6250 MKDIR_P="$ac_cv_path_mkdir -p"
6251 else
6252 # As a last resort, use the slow shell script. Don't cache a
6253 # value for MKDIR_P within a source directory, because that will
6254 # break other packages using the cache if that directory is
6255 # removed, or if the value is a relative name.
6256 MKDIR_P="$ac_install_sh -d"
6257 fi
6258fi
6259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6260$as_echo "$MKDIR_P" >&6; }
6261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262
6263# Not every filesystem supports hard links
6264
6265if test -z "$LN" ; then
6266 case $ac_sys_system in
6267 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268 *) LN=ln;;
6269 esac
6270fi
6271
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006272# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006273
6274ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006275
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6278$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279
6280# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006281if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282 withval=$with_pydebug;
6283if test "$withval" != no
6284then
6285
Matthias Kloseb9621712010-04-24 17:59:49 +00006286$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6289$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006291 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006292else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6293$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294fi
6295else
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298fi
6299
6300
6301# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6302# merged with this chunk of code?
6303
6304# Optimizer/debugger flags
6305# ------------------------
6306# (The following bit of code is complicated enough - please keep things
6307# indented properly. Just pretend you're editing Python code. ;-)
6308
6309# There are two parallel sets of case statements below, one that checks to
6310# see if OPT was set and one that does BASECFLAGS setting based upon
6311# compiler and platform. BASECFLAGS tweaks need to be made even if the
6312# user set OPT.
6313
6314# tweak OPT based on compiler and platform, only if the user didn't set
6315# it on the command line
6316
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006317if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318then
6319 case $GCC in
6320 yes)
6321 if test "$CC" != 'g++' ; then
6322 STRICT_PROTO="-Wstrict-prototypes"
6323 fi
6324 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6325 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6326 WRAP="-fwrapv"
6327 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006328
6329 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006330 case $CC in
6331 *clang*) WRAP="-fwrapv"
6332 ;;
6333 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006334
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335 case $ac_cv_prog_cc_g in
6336 yes)
6337 if test "$Py_DEBUG" = 'true' ; then
6338 # Optimization messes up debuggers, so turn it off for
6339 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006340 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6341 OPT="-g -Og -Wall $STRICT_PROTO"
6342 else
6343 OPT="-g -O0 -Wall $STRICT_PROTO"
6344 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345 else
6346 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6347 fi
6348 ;;
6349 *)
6350 OPT="-O3 -Wall $STRICT_PROTO"
6351 ;;
6352 esac
6353 case $ac_sys_system in
6354 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6355 ;;
6356 esac
6357 ;;
6358
6359 *)
6360 OPT="-O"
6361 ;;
6362 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363fi
6364
6365
6366
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006367
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368# The -arch flags for universal builds on OSX
6369UNIVERSAL_ARCH_FLAGS=
6370
6371
6372# tweak BASECFLAGS based on compiler and platform
6373case $GCC in
6374yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006375 # Python doesn't violate C99 aliasing rules, but older versions of
6376 # GCC produce warnings for legal Python code. Enable
6377 # -fno-strict-aliasing on versions of GCC that support but produce
6378 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6380$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381 ac_save_cc="$CC"
6382 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006383 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006384 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006385 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006386else
Matthias Kloseb9621712010-04-24 17:59:49 +00006387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006389
Matthias Kloseb159a552010-04-25 21:00:44 +00006390
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006391int
6392main ()
6393{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006394
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006395 ;
6396 return 0;
6397}
Matthias Kloseb159a552010-04-25 21:00:44 +00006398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006400if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006401
6402 CC="$ac_save_cc -fstrict-aliasing"
6403 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006405/* end confdefs.h. */
6406
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006407 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006408int
6409main ()
6410{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006411double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006412 ;
6413 return 0;
6414}
Matthias Kloseb159a552010-04-25 21:00:44 +00006415
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006417if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006418
6419 ac_cv_no_strict_aliasing=no
6420
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421else
Matthias Kloseb159a552010-04-25 21:00:44 +00006422
6423 ac_cv_no_strict_aliasing=yes
6424
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006425fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006427
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006428else
Matthias Kloseb159a552010-04-25 21:00:44 +00006429
6430 ac_cv_no_strict_aliasing=no
6431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006434fi
6435
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006436 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6439$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006440 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441 then
6442 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6443 fi
6444
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6446$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6447 ac_save_cc="$CC"
6448 CC="$CC -Wunused-result -Werror"
6449 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006450 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006451 $as_echo_n "(cached) " >&6
6452else
6453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6454/* end confdefs.h. */
6455
6456
6457int
6458main ()
6459{
6460
6461 ;
6462 return 0;
6463}
6464
6465_ACEOF
6466if ac_fn_c_try_compile "$LINENO"; then :
6467
6468 ac_cv_disable_unused_result_warning=yes
6469
6470else
6471
6472 ac_cv_disable_unused_result_warning=no
6473
6474fi
6475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6476fi
6477
6478 CFLAGS="$save_CFLAGS"
6479 CC="$ac_save_cc"
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6481$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6482
6483 if test $ac_cv_disable_unused_result_warning = yes
6484 then
6485 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6486 fi
6487
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6489$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6490 ac_save_cc="$CC"
6491 CC="$CC -Werror=declaration-after-statement"
6492 save_CFLAGS="$CFLAGS"
6493 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6494 $as_echo_n "(cached) " >&6
6495else
6496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6497/* end confdefs.h. */
6498
6499
6500int
6501main ()
6502{
6503
6504 ;
6505 return 0;
6506}
6507
6508_ACEOF
6509if ac_fn_c_try_compile "$LINENO"; then :
6510
6511 ac_cv_declaration_after_statement_warning=yes
6512
6513else
6514
6515 ac_cv_declaration_after_statement_warning=no
6516
6517fi
6518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6519fi
6520
6521 CFLAGS="$save_CFLAGS"
6522 CC="$ac_save_cc"
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6524$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6525
6526 if test $ac_cv_declaration_after_statement_warning = yes
6527 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006528 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006529 fi
6530
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6532$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6533 ac_save_cc="$CC"
6534 CC="$CC -Wsign-compare"
6535 save_CFLAGS="$CFLAGS"
6536 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6537 $as_echo_n "(cached) " >&6
6538else
6539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6540/* end confdefs.h. */
6541
6542
6543int
6544main ()
6545{
6546
6547 ;
6548 return 0;
6549}
6550
6551_ACEOF
6552if ac_fn_c_try_compile "$LINENO"; then :
6553
6554 ac_cv_enable_sign_compare_warning=yes
6555
6556else
6557
6558 ac_cv_enable_sign_compare_warning=no
6559
6560fi
6561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6562fi
6563
6564 CFLAGS="$save_CFLAGS"
6565 CC="$ac_save_cc"
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6567$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6568
6569 if test $ac_cv_enable_sign_compare_warning = yes
6570 then
6571 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6572 fi
6573
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6575$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6576 ac_save_cc="$CC"
6577 CC="$CC -Wunreachable-code"
6578 save_CFLAGS="$CFLAGS"
6579 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6580 $as_echo_n "(cached) " >&6
6581else
6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6583/* end confdefs.h. */
6584
6585
6586int
6587main ()
6588{
6589
6590 ;
6591 return 0;
6592}
6593
6594_ACEOF
6595if ac_fn_c_try_compile "$LINENO"; then :
6596
6597 ac_cv_enable_unreachable_code_warning=yes
6598
6599else
6600
6601 ac_cv_enable_unreachable_code_warning=no
6602
6603fi
6604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6605fi
6606
6607 CFLAGS="$save_CFLAGS"
6608 CC="$ac_save_cc"
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6610$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6611
6612 # Don't enable unreachable code warning in debug mode, since it usually
6613 # results in non-standard code paths.
6614 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6615 then
6616 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6617 fi
6618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006619 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6620 # support. Without this, treatment of subnormals doesn't follow
6621 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006622 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623 alpha*)
6624 BASECFLAGS="$BASECFLAGS -mieee"
6625 ;;
6626 esac
6627
6628 case $ac_sys_system in
6629 SCO_SV*)
6630 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6631 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006632
6633 # is there any other compiler on Darwin besides gcc?
6634 Darwin*)
6635 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6636 # used to be here, but non-Apple gcc doesn't accept them.
6637 if test "${CC}" = gcc
6638 then
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006640$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006641 case "${UNIVERSALSDK}" in
6642 */MacOSX10.4u.sdk)
6643 # Build using 10.4 SDK, force usage of gcc when the
6644 # compiler is gcc, otherwise the user will get very
6645 # confusing error messages when building on OSX 10.6
6646 CC=gcc-4.0
6647 CPP=cpp-4.0
6648 ;;
6649 esac
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006651$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006652 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653
Ned Deily87adb6e2013-10-18 21:09:56 -07006654 if test "${enable_universalsdk}"
6655 then
6656 case "$UNIVERSAL_ARCHS" in
6657 32-bit)
6658 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6659 LIPO_32BIT_FLAGS=""
6660 ARCH_RUN_32BIT=""
6661 ;;
6662 64-bit)
6663 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6664 LIPO_32BIT_FLAGS=""
6665 ARCH_RUN_32BIT="true"
6666 ;;
6667 all)
6668 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6669 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6670 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6671 ;;
6672 intel)
6673 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6674 LIPO_32BIT_FLAGS="-extract i386"
6675 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6676 ;;
6677 intel-32)
6678 UNIVERSAL_ARCH_FLAGS="-arch i386"
6679 LIPO_32BIT_FLAGS=""
6680 ARCH_RUN_32BIT=""
6681 ;;
6682 3-way)
6683 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6684 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6685 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6686 ;;
6687 *)
6688 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6689 ;;
6690 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691
Ned Deily87adb6e2013-10-18 21:09:56 -07006692 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6693 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6694 if test "${UNIVERSALSDK}" != "/"
6695 then
6696 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6697 fi
6698 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699
Ned Deily87adb6e2013-10-18 21:09:56 -07006700 # Calculate an appropriate deployment target for this build:
6701 # The deployment target value is used explicitly to enable certain
6702 # features are enabled (such as builtin libedit support for readline)
6703 # through the use of Apple's Availabiliy Macros and is used as a
6704 # component of the string returned by distutils.get_platform().
6705 #
6706 # Use the value from:
6707 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6708 # 2. the operating system version of the build machine if >= 10.6
6709 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6710 # below to pick either 10.3, 10.4, or 10.5 as the target.
6711 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006712
Ned Deily87adb6e2013-10-18 21:09:56 -07006713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6714$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006715 cur_target_major=`sw_vers -productVersion | \
6716 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6717 cur_target_minor=`sw_vers -productVersion | \
6718 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6719 cur_target="${cur_target_major}.${cur_target_minor}"
6720 if test ${cur_target_major} -eq 10 && \
6721 test ${cur_target_minor} -ge 3 && \
6722 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006723 then
Ned Deily36820b62014-06-25 13:44:22 -07006724 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006725 cur_target=10.3
6726 if test ${enable_universalsdk}
6727 then
6728 case "$UNIVERSAL_ARCHS" in
6729 all|3-way|intel|64-bit)
6730 # These configurations were first supported in 10.5
6731 cur_target='10.5'
6732 ;;
6733 esac
6734 else
6735 if test `/usr/bin/arch` = "i386"
6736 then
6737 # 10.4 was the first release to support Intel archs
6738 cur_target="10.4"
6739 fi
6740 fi
6741 fi
6742 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006743
Ned Deily87adb6e2013-10-18 21:09:56 -07006744 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6745 # environment with a value that is the same as what we'll use
6746 # in the Makefile to ensure that we'll get the same compiler
6747 # environment during configure and build time.
6748 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6749 export MACOSX_DEPLOYMENT_TARGET
6750 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6752$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006753
Ned Deily87adb6e2013-10-18 21:09:56 -07006754 # end of Darwin* tests
6755 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756 esac
6757 ;;
6758
6759*)
6760 case $ac_sys_system in
6761 OpenUNIX*|UnixWare*)
6762 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6763 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764 SCO_SV*)
6765 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6766 ;;
6767 esac
6768 ;;
6769esac
6770
6771if test "$Py_DEBUG" = 'true'; then
6772 :
6773else
6774 OPT="-DNDEBUG $OPT"
6775fi
6776
6777if test "$ac_arch_flags"
6778then
6779 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6780fi
6781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006782# On some compilers, pthreads are available without further options
6783# (e.g. MacOS X). On some of these systems, the compiler will not
6784# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6785# So we have to see first whether pthreads are available without
6786# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6788$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006789if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006790 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791else
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793 ac_cv_pthread_is_default=no
6794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796/* end confdefs.h. */
6797
Stefan Krah7dba5942012-11-22 22:49:11 +01006798#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799#include <pthread.h>
6800
6801void* routine(void* p){return NULL;}
6802
6803int main(){
6804 pthread_t p;
6805 if(pthread_create(&p,NULL,routine,NULL)!=0)
6806 return 1;
6807 (void)pthread_detach(p);
6808 return 0;
6809}
6810
6811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006812if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813
6814 ac_cv_pthread_is_default=yes
6815 ac_cv_kthread=no
6816 ac_cv_pthread=no
6817
6818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823fi
6824
6825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
6827
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6829$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830
6831
6832if test $ac_cv_pthread_is_default = yes
6833then
6834 ac_cv_kpthread=no
6835else
6836# -Kpthread, if available, provides the right #defines
6837# and linker options to make pthread_create available
6838# Some compilers won't report that they do not support -Kpthread,
6839# so we need to run a program to see whether it really made the
6840# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6842$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006843if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845else
6846 ac_save_cc="$CC"
6847CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006848if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 ac_cv_kpthread=no
6850else
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852/* end confdefs.h. */
6853
Stefan Krah7dba5942012-11-22 22:49:11 +01006854#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855#include <pthread.h>
6856
6857void* routine(void* p){return NULL;}
6858
6859int main(){
6860 pthread_t p;
6861 if(pthread_create(&p,NULL,routine,NULL)!=0)
6862 return 1;
6863 (void)pthread_detach(p);
6864 return 0;
6865}
6866
6867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006868if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869 ac_cv_kpthread=yes
6870else
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875fi
6876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877CC="$ac_save_cc"
6878fi
6879
Matthias Kloseb9621712010-04-24 17:59:49 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6881$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882fi
6883
6884if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6885then
6886# -Kthread, if available, provides the right #defines
6887# and linker options to make pthread_create available
6888# Some compilers won't report that they do not support -Kthread,
6889# so we need to run a program to see whether it really made the
6890# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6892$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006893if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895else
6896 ac_save_cc="$CC"
6897CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006898if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899 ac_cv_kthread=no
6900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902/* end confdefs.h. */
6903
Stefan Krah7dba5942012-11-22 22:49:11 +01006904#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905#include <pthread.h>
6906
6907void* routine(void* p){return NULL;}
6908
6909int main(){
6910 pthread_t p;
6911 if(pthread_create(&p,NULL,routine,NULL)!=0)
6912 return 1;
6913 (void)pthread_detach(p);
6914 return 0;
6915}
6916
6917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006918if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 ac_cv_kthread=yes
6920else
Matthias Kloseb9621712010-04-24 17:59:49 +00006921 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925fi
6926
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927CC="$ac_save_cc"
6928fi
6929
Matthias Kloseb9621712010-04-24 17:59:49 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6931$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932fi
6933
6934if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6935then
6936# -pthread, if available, provides the right #defines
6937# and linker options to make pthread_create available
6938# Some compilers won't report that they do not support -pthread,
6939# so we need to run a program to see whether it really made the
6940# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6942$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006943if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945else
6946 ac_save_cc="$CC"
6947CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006948if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949 ac_cv_pthread=no
6950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006952/* end confdefs.h. */
6953
Stefan Krah7dba5942012-11-22 22:49:11 +01006954#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006955#include <pthread.h>
6956
6957void* routine(void* p){return NULL;}
6958
6959int main(){
6960 pthread_t p;
6961 if(pthread_create(&p,NULL,routine,NULL)!=0)
6962 return 1;
6963 (void)pthread_detach(p);
6964 return 0;
6965}
6966
6967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006968if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969 ac_cv_pthread=yes
6970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975fi
6976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977CC="$ac_save_cc"
6978fi
6979
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6981$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982fi
6983
6984# If we have set a CC compiler flag for thread support then
6985# check if it works for CXX, too.
6986ac_cv_cxx_thread=no
6987if test ! -z "$CXX"
6988then
Matthias Kloseb9621712010-04-24 17:59:49 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6990$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991ac_save_cxx="$CXX"
6992
6993if test "$ac_cv_kpthread" = "yes"
6994then
6995 CXX="$CXX -Kpthread"
6996 ac_cv_cxx_thread=yes
6997elif test "$ac_cv_kthread" = "yes"
6998then
6999 CXX="$CXX -Kthread"
7000 ac_cv_cxx_thread=yes
7001elif test "$ac_cv_pthread" = "yes"
7002then
7003 CXX="$CXX -pthread"
7004 ac_cv_cxx_thread=yes
7005fi
7006
7007if test $ac_cv_cxx_thread = yes
7008then
7009 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7010 $CXX -c conftest.$ac_ext 2>&5
7011 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7012 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7013 then
7014 ac_cv_cxx_thread=yes
7015 else
7016 ac_cv_cxx_thread=no
7017 fi
7018 rm -fr conftest*
7019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7021$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022fi
7023CXX="$ac_save_cxx"
7024
7025
7026# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7028$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007029if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007030 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007033/* end confdefs.h. */
7034#include <stdlib.h>
7035#include <stdarg.h>
7036#include <string.h>
7037#include <float.h>
7038
7039int
7040main ()
7041{
7042
7043 ;
7044 return 0;
7045}
7046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007047if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048 ac_cv_header_stdc=yes
7049else
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7053
7054if test $ac_cv_header_stdc = yes; then
7055 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007057/* end confdefs.h. */
7058#include <string.h>
7059
7060_ACEOF
7061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 $EGREP "memchr" >/dev/null 2>&1; then :
7063
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007064else
7065 ac_cv_header_stdc=no
7066fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007067rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007068
7069fi
7070
7071if test $ac_cv_header_stdc = yes; then
7072 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007074/* end confdefs.h. */
7075#include <stdlib.h>
7076
7077_ACEOF
7078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007079 $EGREP "free" >/dev/null 2>&1; then :
7080
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081else
7082 ac_cv_header_stdc=no
7083fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007084rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007085
7086fi
7087
7088if test $ac_cv_header_stdc = yes; then
7089 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007090 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007091 :
7092else
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007094/* end confdefs.h. */
7095#include <ctype.h>
7096#include <stdlib.h>
7097#if ((' ' & 0x0FF) == 0x020)
7098# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7099# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7100#else
7101# define ISLOWER(c) \
7102 (('a' <= (c) && (c) <= 'i') \
7103 || ('j' <= (c) && (c) <= 'r') \
7104 || ('s' <= (c) && (c) <= 'z'))
7105# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7106#endif
7107
7108#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7109int
7110main ()
7111{
7112 int i;
7113 for (i = 0; i < 256; i++)
7114 if (XOR (islower (i), ISLOWER (i))
7115 || toupper (i) != TOUPPER (i))
7116 return 2;
7117 return 0;
7118}
7119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007120if ac_fn_c_try_run "$LINENO"; then :
7121
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007122else
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007127fi
7128
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007129fi
7130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7132$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133if test $ac_cv_header_stdc = yes; then
7134
Matthias Kloseb9621712010-04-24 17:59:49 +00007135$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007136
7137fi
7138
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007139for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007140fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007141ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007142sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007143unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007144poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007145sys/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 +01007146sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007147sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007148sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007149sys/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 -07007150libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007151bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7152sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007153do :
7154 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7155ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007156if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007157 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007158#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007159_ACEOF
7160
7161fi
7162
Guido van Rossum627b2d71993-12-24 10:39:16 +00007163done
7164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007166for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7169$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007170if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007172else
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007174/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007175#include <sys/types.h>
7176#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007177
Martin v. Löwis11437992002-04-12 09:54:03 +00007178int
7179main ()
7180{
7181if ((DIR *) 0)
7182return 0;
7183 ;
7184 return 0;
7185}
7186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007188 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007189else
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007194eval ac_res=\$$as_ac_Header
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7196$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007197if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007199#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007200_ACEOF
7201
7202ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007204
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007205done
7206# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7207if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7209$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007210if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007212else
Martin v. Löwis11437992002-04-12 09:54:03 +00007213 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007217/* Override any GCC internal prototype to avoid an error.
7218 Use char because int might match the return type of a GCC
7219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007220#ifdef __cplusplus
7221extern "C"
7222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007223char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007224int
7225main ()
7226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007227return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007228 ;
7229 return 0;
7230}
7231_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232for ac_lib in '' dir; do
7233 if test -z "$ac_lib"; then
7234 ac_res="none required"
7235 else
7236 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007238 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007242rm -f core conftest.err conftest.$ac_objext \
7243 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007244 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007245 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007247done
Victor Stinnere0be4232011-10-25 13:06:09 +02007248if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007250else
7251 ac_cv_search_opendir=no
7252fi
7253rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007254LIBS=$ac_func_search_save_LIBS
7255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7257$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007258ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007259if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007261
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007263
Michael W. Hudson54241132001-12-07 15:38:26 +00007264else
Matthias Kloseb9621712010-04-24 17:59:49 +00007265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7266$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007267if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007269else
7270 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007274/* Override any GCC internal prototype to avoid an error.
7275 Use char because int might match the return type of a GCC
7276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007277#ifdef __cplusplus
7278extern "C"
7279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007280char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007281int
7282main ()
7283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007284return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007285 ;
7286 return 0;
7287}
7288_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007289for ac_lib in '' x; do
7290 if test -z "$ac_lib"; then
7291 ac_res="none required"
7292 else
7293 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007294 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007295 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007296 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007297 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007299rm -f core conftest.err conftest.$ac_objext \
7300 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007301 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007302 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007304done
Victor Stinnere0be4232011-10-25 13:06:09 +02007305if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007307else
7308 ac_cv_search_opendir=no
7309fi
7310rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007311LIBS=$ac_func_search_save_LIBS
7312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7314$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007315ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007316if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007317 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007318
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007319fi
7320
7321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007322
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7324$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007325if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007326 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007329/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007330#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007331int
7332main ()
7333{
7334return makedev(0, 0);
7335 ;
7336 return 0;
7337}
7338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007340 ac_cv_header_sys_types_h_makedev=yes
7341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344rm -f core conftest.err conftest.$ac_objext \
7345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007346
7347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7349$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007350
7351if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007352ac_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 +02007353if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007354
Matthias Kloseb9621712010-04-24 17:59:49 +00007355$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007356
7357fi
7358
7359
7360
7361 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 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 +02007363if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007364
Matthias Kloseb9621712010-04-24 17:59:49 +00007365$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007366
7367fi
7368
7369
7370 fi
7371fi
7372
Michael W. Hudson54241132001-12-07 15:38:26 +00007373
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007374# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7375for ac_header in net/if.h
7376do :
7377 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7378#ifdef STDC_HEADERS
7379# include <stdlib.h>
7380# include <stddef.h>
7381#else
7382# ifdef HAVE_STDLIB_H
7383# include <stdlib.h>
7384# endif
7385#endif
7386#ifdef HAVE_SYS_SOCKET_H
7387# include <sys/socket.h>
7388#endif
7389
7390"
Victor Stinnere0be4232011-10-25 13:06:09 +02007391if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007392 cat >>confdefs.h <<_ACEOF
7393#define HAVE_NET_IF_H 1
7394_ACEOF
7395
7396fi
7397
7398done
7399
7400
Martin v. Löwis11017b12006-01-14 18:12:57 +00007401# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007402for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007403do :
7404 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 +00007405#ifdef HAVE_ASM_TYPES_H
7406#include <asm/types.h>
7407#endif
7408#ifdef HAVE_SYS_SOCKET_H
7409#include <sys/socket.h>
7410#endif
7411
Matthias Kloseb9621712010-04-24 17:59:49 +00007412"
Victor Stinnere0be4232011-10-25 13:06:09 +02007413if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007414 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007415#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007416_ACEOF
7417
7418fi
7419
7420done
7421
7422
Charles-François Natali47413c12011-10-06 19:47:44 +02007423# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007424for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007425do :
7426 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7427ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7428#ifdef HAVE_SYS_SOCKET_H
7429#include <sys/socket.h>
7430#endif
7431
7432"
7433if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7434 cat >>confdefs.h <<_ACEOF
7435#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7436_ACEOF
7437
7438fi
7439
7440done
7441
7442
Guido van Rossum627b2d71993-12-24 10:39:16 +00007443# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007444was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7446$as_echo_n "checking for clock_t in time.h... " >&6; }
7447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007448/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007449#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007450
7451_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007454 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007455else
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
7457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007459
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007460
Guido van Rossum627b2d71993-12-24 10:39:16 +00007461fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007462rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7465$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007466
Matthias Kloseb9621712010-04-24 17:59:49 +00007467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7468$as_echo_n "checking for makedev... " >&6; }
7469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007470/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007471
Jesus Cea740f53a2010-04-28 11:35:30 +00007472#if defined(MAJOR_IN_MKDEV)
7473#include <sys/mkdev.h>
7474#elif defined(MAJOR_IN_SYSMACROS)
7475#include <sys/sysmacros.h>
7476#else
7477#include <sys/types.h>
7478#endif
7479
Neal Norwitz11690112002-07-30 01:08:28 +00007480int
7481main ()
7482{
Jesus Cea740f53a2010-04-28 11:35:30 +00007483
7484 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007485 ;
7486 return 0;
7487}
Matthias Kloseb159a552010-04-25 21:00:44 +00007488
Neal Norwitz11690112002-07-30 01:08:28 +00007489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007490if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007491 ac_cv_has_makedev=yes
7492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007495rm -f core conftest.err conftest.$ac_objext \
7496 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7498$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007499if test "$ac_cv_has_makedev" = "yes"; then
7500
Matthias Kloseb9621712010-04-24 17:59:49 +00007501$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007502
7503fi
7504
Christian Heimes985ecdc2013-11-20 11:46:18 +01007505# byte swapping
7506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7507$as_echo_n "checking for le64toh... " >&6; }
7508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7509/* end confdefs.h. */
7510
7511#ifdef HAVE_ENDIAN_H
7512#include <endian.h>
7513#elif defined(HAVE_SYS_ENDIAN_H)
7514#include <sys/endian.h>
7515#endif
7516
7517int
7518main ()
7519{
7520
7521 le64toh(1)
7522 ;
7523 return 0;
7524}
7525
7526_ACEOF
7527if ac_fn_c_try_link "$LINENO"; then :
7528 ac_cv_has_le64toh=yes
7529else
7530 ac_cv_has_le64toh=no
7531fi
7532rm -f core conftest.err conftest.$ac_objext \
7533 conftest$ac_exeext conftest.$ac_ext
7534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7535$as_echo "$ac_cv_has_le64toh" >&6; }
7536if test "$ac_cv_has_le64toh" = "yes"; then
7537
7538$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7539
7540fi
7541
Martin v. Löwis399a6892002-10-04 10:22:02 +00007542# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7543# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7544# defined, but the compiler does not support pragma redefine_extname,
7545# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7546# structures (such as rlimit64) without declaring them. As a
7547# work-around, disable LFS on such configurations
7548
7549use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7551$as_echo_n "checking Solaris LFS bug... " >&6; }
7552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007553/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007554
7555#define _LARGEFILE_SOURCE 1
7556#define _FILE_OFFSET_BITS 64
7557#include <sys/resource.h>
7558
Martin v. Löwis399a6892002-10-04 10:22:02 +00007559int
7560main ()
7561{
7562struct rlimit foo;
7563 ;
7564 return 0;
7565}
7566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007568 sol_lfs_bug=no
7569else
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7574$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007575if test "$sol_lfs_bug" = "yes"; then
7576 use_lfs=no
7577fi
7578
7579if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007580# Two defines needed to enable largefile support on various platforms
7581# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007582case $ac_sys_system/$ac_sys_release in
7583AIX*)
7584
7585$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7586
7587 ;;
7588esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007589
Matthias Kloseb9621712010-04-24 17:59:49 +00007590$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007591
7592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007594
Martin v. Löwis399a6892002-10-04 10:22:02 +00007595fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007596
Guido van Rossum84e7b241996-08-19 21:59:00 +00007597# Add some code to confdefs.h so that the test for off_t works on SCO
7598cat >> confdefs.h <<\EOF
7599#if defined(SCO_DS)
7600#undef _OFF_T
7601#endif
7602EOF
7603
Guido van Rossumef2255b2000-03-10 22:30:29 +00007604# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007605ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007606if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007607
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007608else
Martin v. Löwis11437992002-04-12 09:54:03 +00007609
7610cat >>confdefs.h <<_ACEOF
7611#define mode_t int
7612_ACEOF
7613
7614fi
7615
Matthias Kloseb9621712010-04-24 17:59:49 +00007616ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007617if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007618
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007619else
Martin v. Löwis11437992002-04-12 09:54:03 +00007620
7621cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007622#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007623_ACEOF
7624
7625fi
7626
Matthias Kloseb9621712010-04-24 17:59:49 +00007627ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007628if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007630else
Martin v. Löwis11437992002-04-12 09:54:03 +00007631
7632cat >>confdefs.h <<_ACEOF
7633#define pid_t int
7634_ACEOF
7635
7636fi
7637
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007640#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007641_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007644if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007646else
Martin v. Löwis11437992002-04-12 09:54:03 +00007647
7648cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007650_ACEOF
7651
7652fi
7653
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7655$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007656if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007658else
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007660/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007661#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007662
7663_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007664if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007666 ac_cv_type_uid_t=yes
7667else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007668 ac_cv_type_uid_t=no
7669fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007670rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7674$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007675if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007676
Matthias Kloseb9621712010-04-24 17:59:49 +00007677$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007678
7679
Matthias Kloseb9621712010-04-24 17:59:49 +00007680$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007681
7682fi
7683
Mark Dickinson983bc162012-12-02 12:11:38 +00007684
7685# There are two separate checks for each of the exact-width integer types we
7686# need. First we check whether the type is available using the usual
7687# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7688# and <stdint.h> where available). We then also use the special type checks of
7689# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7690# directly, #define's uint32_t to be a suitable type.
7691
7692ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7693if test "x$ac_cv_type_uint32_t" = xyes; then :
7694
7695$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7696
7697fi
7698
Matthias Kloseb9621712010-04-24 17:59:49 +00007699ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7700case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007701 no|yes) ;; #(
7702 *)
7703
Matthias Kloseb9621712010-04-24 17:59:49 +00007704$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007705
7706
7707cat >>confdefs.h <<_ACEOF
7708#define uint32_t $ac_cv_c_uint32_t
7709_ACEOF
7710;;
7711 esac
7712
Mark Dickinson983bc162012-12-02 12:11:38 +00007713
7714ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7715if test "x$ac_cv_type_uint64_t" = xyes; then :
7716
7717$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7718
7719fi
7720
Matthias Kloseb9621712010-04-24 17:59:49 +00007721ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7722case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007723 no|yes) ;; #(
7724 *)
7725
Matthias Kloseb9621712010-04-24 17:59:49 +00007726$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007727
7728
7729cat >>confdefs.h <<_ACEOF
7730#define uint64_t $ac_cv_c_uint64_t
7731_ACEOF
7732;;
7733 esac
7734
Mark Dickinson983bc162012-12-02 12:11:38 +00007735
7736ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7737if test "x$ac_cv_type_int32_t" = xyes; then :
7738
7739$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7740
7741fi
7742
Matthias Kloseb9621712010-04-24 17:59:49 +00007743ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7744case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007745 no|yes) ;; #(
7746 *)
7747
7748cat >>confdefs.h <<_ACEOF
7749#define int32_t $ac_cv_c_int32_t
7750_ACEOF
7751;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007752esac
7753
Mark Dickinson983bc162012-12-02 12:11:38 +00007754
7755ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7756if test "x$ac_cv_type_int64_t" = xyes; then :
7757
7758$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7759
7760fi
7761
Matthias Kloseb9621712010-04-24 17:59:49 +00007762ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7763case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007764 no|yes) ;; #(
7765 *)
7766
7767cat >>confdefs.h <<_ACEOF
7768#define int64_t $ac_cv_c_int64_t
7769_ACEOF
7770;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007771esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007772
Mark Dickinson983bc162012-12-02 12:11:38 +00007773
Matthias Kloseb9621712010-04-24 17:59:49 +00007774ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007775if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776
Matthias Kloseb9621712010-04-24 17:59:49 +00007777$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007778
7779fi
7780
Stefan Krah1919b7e2012-03-21 18:25:23 +01007781ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7782if test "x$ac_cv_type___uint128_t" = xyes; then :
7783
7784$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7785
7786fi
7787
Jack Jansendd19cf82001-12-06 22:36:17 +00007788
Michael W. Hudson54241132001-12-07 15:38:26 +00007789# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007790# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791# The cast to long int works around a bug in the HP C Compiler
7792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7794# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7796$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007797if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 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 +00007801
Martin v. Löwis11437992002-04-12 09:54:03 +00007802else
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 if test "$ac_cv_type_int" = yes; then
7804 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007806as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007807See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808 else
7809 ac_cv_sizeof_int=0
7810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812
Martin v. Löwis11437992002-04-12 09:54:03 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7815$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816
7817
7818
Martin v. Löwis11437992002-04-12 09:54:03 +00007819cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007820#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007821_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007822
7823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824# The cast to long int works around a bug in the HP C Compiler
7825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7827# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7829$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007830if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007832else
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 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 +00007834
Martin v. Löwis11437992002-04-12 09:54:03 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 if test "$ac_cv_type_long" = yes; then
7837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007839as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007840See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841 else
7842 ac_cv_sizeof_long=0
7843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845
Martin v. Löwis11437992002-04-12 09:54:03 +00007846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7848$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849
7850
7851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007855
7856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857# The cast to long int works around a bug in the HP C Compiler
7858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7862$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007863if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 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 +00007867
Martin v. Löwis11437992002-04-12 09:54:03 +00007868else
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 if test "$ac_cv_type_void_p" = yes; then
7870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007872as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007873See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 else
7875 ac_cv_sizeof_void_p=0
7876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878
Martin v. Löwis11437992002-04-12 09:54:03 +00007879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7881$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882
7883
7884
Martin v. Löwis11437992002-04-12 09:54:03 +00007885cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007886#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007887_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007888
7889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890# The cast to long int works around a bug in the HP C Compiler
7891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7893# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7895$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007896if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007898else
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 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 +00007900
Martin v. Löwis11437992002-04-12 09:54:03 +00007901else
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 if test "$ac_cv_type_short" = yes; then
7903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007905as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007906See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 else
7908 ac_cv_sizeof_short=0
7909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7914$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915
7916
7917
Martin v. Löwis11437992002-04-12 09:54:03 +00007918cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007919#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007921
7922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923# The cast to long int works around a bug in the HP C Compiler
7924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7926# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7928$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007929if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007931else
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 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 +00007933
Martin v. Löwis11437992002-04-12 09:54:03 +00007934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 if test "$ac_cv_type_float" = yes; then
7936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007938as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007939See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940 else
7941 ac_cv_sizeof_float=0
7942 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007944
Martin v. Löwis11437992002-04-12 09:54:03 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7947$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948
7949
7950
Martin v. Löwis11437992002-04-12 09:54:03 +00007951cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007952#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007953_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007954
7955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956# The cast to long int works around a bug in the HP C Compiler
7957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7959# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7961$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007964else
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 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 +00007966
Martin v. Löwis11437992002-04-12 09:54:03 +00007967else
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 if test "$ac_cv_type_double" = yes; then
7969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007971as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007972See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 else
7974 ac_cv_sizeof_double=0
7975 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977
Martin v. Löwis11437992002-04-12 09:54:03 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7980$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981
7982
7983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007985#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007986_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007987
7988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989# The cast to long int works around a bug in the HP C Compiler
7990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7992# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7994$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007995if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 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 +00007999
Martin v. Löwis11437992002-04-12 09:54:03 +00008000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 if test "$ac_cv_type_fpos_t" = yes; then
8002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008004as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008005See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 else
8007 ac_cv_sizeof_fpos_t=0
8008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010
Martin v. Löwis11437992002-04-12 09:54:03 +00008011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8013$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014
8015
8016
Martin v. Löwis11437992002-04-12 09:54:03 +00008017cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008018#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008019_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008020
Michael W. Hudson54241132001-12-07 15:38:26 +00008021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022# The cast to long int works around a bug in the HP C Compiler
8023# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8024# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8025# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8027$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008030else
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 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 +00008032
Martin v. Löwis18e16552006-02-15 17:27:45 +00008033else
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 if test "$ac_cv_type_size_t" = yes; then
8035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008037as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008038See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039 else
8040 ac_cv_sizeof_size_t=0
8041 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043
Martin v. Löwis18e16552006-02-15 17:27:45 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8046$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047
8048
8049
Martin v. Löwis18e16552006-02-15 17:27:45 +00008050cat >>confdefs.h <<_ACEOF
8051#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8052_ACEOF
8053
8054
Christian Heimes400adb02008-02-01 08:12:03 +00008055# The cast to long int works around a bug in the HP C Compiler
8056# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8057# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8058# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8060$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008061if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 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 +00008065
Christian Heimes400adb02008-02-01 08:12:03 +00008066else
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 if test "$ac_cv_type_pid_t" = yes; then
8068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008070as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008071See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008072 else
8073 ac_cv_sizeof_pid_t=0
8074 fi
8075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076
Christian Heimes400adb02008-02-01 08:12:03 +00008077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8079$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008080
8081
8082
8083cat >>confdefs.h <<_ACEOF
8084#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8085_ACEOF
8086
8087
Michael W. Hudson54241132001-12-07 15:38:26 +00008088
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8090$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008091have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008093/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008094
Martin v. Löwis11437992002-04-12 09:54:03 +00008095int
8096main ()
8097{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008098long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ;
8100 return 0;
8101}
8102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
8105
Matthias Kloseb9621712010-04-24 17:59:49 +00008106$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008108 have_long_long=yes
8109
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8113$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008114if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115# The cast to long int works around a bug in the HP C Compiler
8116# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8117# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8118# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8120$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008121if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008123else
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 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 +00008125
Martin v. Löwis11437992002-04-12 09:54:03 +00008126else
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 if test "$ac_cv_type_long_long" = yes; then
8128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008130as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008131See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132 else
8133 ac_cv_sizeof_long_long=0
8134 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008136
Martin v. Löwis11437992002-04-12 09:54:03 +00008137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8139$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140
8141
8142
Martin v. Löwis11437992002-04-12 09:54:03 +00008143cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008144#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008145_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008146
Michael W. Hudson54241132001-12-07 15:38:26 +00008147
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008148fi
8149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8151$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008152have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008154/* end confdefs.h. */
8155
8156int
8157main ()
8158{
8159long double x; x = (long double)0;
8160 ;
8161 return 0;
8162}
8163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008164if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008165
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008168
8169 have_long_double=yes
8170
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008171fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8174$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008175if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008176# The cast to long int works around a bug in the HP C Compiler
8177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8179# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8181$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008182if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008184else
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 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 +00008186
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008187else
Matthias Kloseb9621712010-04-24 17:59:49 +00008188 if test "$ac_cv_type_long_double" = yes; then
8189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008191as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008192See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008193 else
8194 ac_cv_sizeof_long_double=0
8195 fi
8196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008197
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8200$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008201
8202
8203
8204cat >>confdefs.h <<_ACEOF
8205#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8206_ACEOF
8207
8208
8209fi
8210
8211
Matthias Kloseb9621712010-04-24 17:59:49 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8213$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008214have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008216/* end confdefs.h. */
8217
8218int
8219main ()
8220{
8221_Bool x; x = (_Bool)0;
8222 ;
8223 return 0;
8224}
8225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008226if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008227
8228
Matthias Kloseb9621712010-04-24 17:59:49 +00008229$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008230
8231 have_c99_bool=yes
8232
Thomas Woutersb2137042007-02-01 18:02:27 +00008233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8236$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008237if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238# The cast to long int works around a bug in the HP C Compiler
8239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8243$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008244if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 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 +00008248
Thomas Woutersb2137042007-02-01 18:02:27 +00008249else
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 if test "$ac_cv_type__Bool" = yes; then
8251 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008253as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008254See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255 else
8256 ac_cv_sizeof__Bool=0
8257 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008259
Thomas Woutersb2137042007-02-01 18:02:27 +00008260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8262$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263
8264
8265
Thomas Woutersb2137042007-02-01 18:02:27 +00008266cat >>confdefs.h <<_ACEOF
8267#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8268_ACEOF
8269
8270
8271fi
8272
Matthias Kloseb9621712010-04-24 17:59:49 +00008273ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008274 #include <stdint.h>
8275 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008276 #ifdef HAVE_INTTYPES_H
8277 #include <inttypes.h>
8278 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008279"
Victor Stinnere0be4232011-10-25 13:06:09 +02008280if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008281
8282cat >>confdefs.h <<_ACEOF
8283#define HAVE_UINTPTR_T 1
8284_ACEOF
8285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286# The cast to long int works around a bug in the HP C Compiler
8287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8289# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8291$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008292if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008294else
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 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 +00008296
Martin v. Löwis11437992002-04-12 09:54:03 +00008297else
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 if test "$ac_cv_type_uintptr_t" = yes; then
8299 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008301as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008302See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303 else
8304 ac_cv_sizeof_uintptr_t=0
8305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008307
Martin v. Löwis11437992002-04-12 09:54:03 +00008308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8310$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311
8312
8313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008315#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008316_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008317
Michael W. Hudson54241132001-12-07 15:38:26 +00008318
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008319fi
8320
Thomas Wouters89f507f2006-12-13 04:49:30 +00008321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008322# The cast to long int works around a bug in the HP C Compiler
8323# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8324# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8325# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8327$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008328if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008330else
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008332#ifdef HAVE_SYS_TYPES_H
8333#include <sys/types.h>
8334#endif
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008337
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008338else
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 if test "$ac_cv_type_off_t" = yes; then
8340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008342as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008343See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008344 else
8345 ac_cv_sizeof_off_t=0
8346 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008348
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8351$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008352
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008353
8354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008356#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008357_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008358
Michael W. Hudson54241132001-12-07 15:38:26 +00008359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8362$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008363if test "$have_long_long" = yes
8364then
8365if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008366 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8371$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8374$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008375fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008376else
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8378$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008379fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008380
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008381# The cast to long int works around a bug in the HP C Compiler
8382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8384# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8386$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008387if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008389else
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008391#ifdef HAVE_SYS_TYPES_H
8392#include <sys/types.h>
8393#endif
8394#ifdef HAVE_TIME_H
8395#include <time.h>
8396#endif
8397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008399
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 if test "$ac_cv_type_time_t" = yes; then
8402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008404as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008405See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008406 else
8407 ac_cv_sizeof_time_t=0
8408 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008410
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8413$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008414
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008415
8416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008418#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008419_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008420
Michael W. Hudson54241132001-12-07 15:38:26 +00008421
8422
Trent Mick635f6fb2000-08-23 21:33:05 +00008423# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008424ac_save_cc="$CC"
8425if test "$ac_cv_kpthread" = "yes"
8426then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008427elif test "$ac_cv_kthread" = "yes"
8428then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008429elif test "$ac_cv_pthread" = "yes"
8430then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008431fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008432
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8434$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008435have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008437/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008438
8439 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008440int
8441main ()
8442{
Guido van Rossum12580492000-09-24 16:47:19 +00008443pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 ;
8445 return 0;
8446}
Matthias Kloseb159a552010-04-25 21:00:44 +00008447
Martin v. Löwis11437992002-04-12 09:54:03 +00008448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008449if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008450 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8454$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008455if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008457# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8458# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8459# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8461$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008462if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008466#ifdef HAVE_PTHREAD_H
8467#include <pthread.h>
8468#endif
8469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008471
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 if test "$ac_cv_type_pthread_t" = yes; then
8474 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008476as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008477See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008478 else
8479 ac_cv_sizeof_pthread_t=0
8480 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482
Trent Mick635f6fb2000-08-23 21:33:05 +00008483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8485$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008486
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008487
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008490#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008491_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008493
Trent Mick635f6fb2000-08-23 21:33:05 +00008494fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008495CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008496
Michael W. Hudson54241132001-12-07 15:38:26 +00008497
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008498case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008499 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008500 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8501 ;;
8502 Darwin/*)
8503 OTHER_LIBTOOL_OPT=""
8504 ;;
8505esac
8506
8507
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008508
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008509case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008510 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008511 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8512 if test "${enable_universalsdk}"; then
8513 :
8514 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008515 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008516 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008517 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008518 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008519 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008520 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008521 if test ${gcc_version} '<' 4.0
8522 then
8523 LIBTOOL_CRUFT="-lcc_dynamic"
8524 else
8525 LIBTOOL_CRUFT=""
8526 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008528 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008531/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008532
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008533 #include <unistd.h>
8534 int main(int argc, char*argv[])
8535 {
8536 if (sizeof(long) == 4) {
8537 return 0;
8538 } else {
8539 return 1;
8540 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008541 }
8542
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008544if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008545 ac_osx_32bit=yes
8546else
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008551fi
8552
8553
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008554 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008555 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008556 i386)
8557 MACOSX_DEFAULT_ARCH="i386"
8558 ;;
8559 ppc)
8560 MACOSX_DEFAULT_ARCH="ppc"
8561 ;;
8562 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008563 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008564 ;;
8565 esac
8566 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008567 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008568 i386)
8569 MACOSX_DEFAULT_ARCH="x86_64"
8570 ;;
8571 ppc)
8572 MACOSX_DEFAULT_ARCH="ppc64"
8573 ;;
8574 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008575 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008576 ;;
8577 esac
8578
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008579 fi
8580
8581 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008582 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008583 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008584esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8586$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008587if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008588then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008589 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008591 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8596$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008597 if test $enable_shared = "yes"
8598 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008599 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 +00008600 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008601else
Matthias Kloseb9621712010-04-24 17:59:49 +00008602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8603$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008604fi
8605
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8607$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008608case $ac_sys_system/$ac_sys_release in
8609 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008610
Matthias Kloseb9621712010-04-24 17:59:49 +00008611$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8614$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008615 ;;
8616 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8618$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008619 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008620esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008621
Guido van Rossum0a516c91994-09-12 10:58:40 +00008622# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
8625
8626
8627
Benjamin Peterson99f03762010-04-11 22:15:28 +00008628
Thomas Wouters477c8d52006-05-27 19:21:47 +00008629
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008630# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8631# -- usually .so, .sl on HP-UX, .dll on Cygwin
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8633$as_echo_n "checking the extension of shared libraries... " >&6; }
8634if test -z "$SHLIB_SUFFIX"; then
8635 case $ac_sys_system in
8636 hp*|HP*)
8637 case `uname -m` in
8638 ia64) SHLIB_SUFFIX=.so;;
8639 *) SHLIB_SUFFIX=.sl;;
8640 esac
8641 ;;
8642 CYGWIN*) SHLIB_SUFFIX=.dll;;
8643 *) SHLIB_SUFFIX=.so;;
8644 esac
8645fi
8646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8647$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008648
Guido van Rossum0a516c91994-09-12 10:58:40 +00008649# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008650# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008651# (Shared libraries in this instance are shared modules to be loaded into
8652# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8654$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008655if test -z "$LDSHARED"
8656then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008657 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008658 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008659 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008660 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008661 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008662 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008663 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008665 if test "$GCC" = "yes" ; then
8666 LDSHARED='$(CC) -shared'
8667 LDCXXSHARED='$(CXX) -shared'
8668 else
8669 LDSHARED='$(CC) -G'
8670 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008671 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008672 hp*|HP*)
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='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008678 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008679 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008680 LDSHARED='$(CC) -bundle'
8681 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008682 if test "$enable_framework" ; then
8683 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008684 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8685 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008686 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008687 else
8688 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008689 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008690 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008691 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008692 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008693 LDSHARED='$(CC) -bundle'
8694 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008695 if test "$enable_framework" ; then
8696 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008697 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8698 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008699 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008700 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008701 # No framework, use the Python app as bundle-loader
8702 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008703 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008704 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008705 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008706 Darwin/*)
8707 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8708 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008709
Ned Deily36820b62014-06-25 13:44:22 -07008710 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8711 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8712 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8713 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8714 if test ${dep_target_major} -eq 10 && \
8715 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008716 then
Ned Deily36820b62014-06-25 13:44:22 -07008717 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008718 LDSHARED='$(CC) -bundle'
8719 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008720 if test "$enable_framework" ; then
8721 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008722 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8723 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008724 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008725 else
8726 # No framework, use the Python app as bundle-loader
8727 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8728 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008729 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008730 fi
Ned Deily36820b62014-06-25 13:44:22 -07008731 else
8732 # building for OS X 10.3 and later
8733 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8734 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8735 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008736 fi
8737 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008738 Linux*|GNU*|QNX*)
8739 LDSHARED='$(CC) -shared'
8740 LDCXXSHARED='$(CXX) -shared';;
8741 BSD/OS*/4*)
8742 LDSHARED="gcc -shared"
8743 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008744 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008745 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008746 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008747 LDSHARED='$(CC) -shared'
8748 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008749 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008750 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008751 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008752 OpenBSD*)
8753 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8754 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008755 LDSHARED='$(CC) -shared $(CCSHARED)'
8756 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008757 else
8758 case `uname -r` in
8759 [01].* | 2.[0-7] | 2.[0-7].*)
8760 LDSHARED="ld -Bshareable ${LDFLAGS}"
8761 ;;
8762 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008763 LDSHARED='$(CC) -shared $(CCSHARED)'
8764 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008765 ;;
8766 esac
8767 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008768 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008769 LDSHARED='$(CC) -shared'
8770 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008771 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008772 if test "$GCC" = "yes" ; then
8773 LDSHARED='$(CC) -shared'
8774 LDCXXSHARED='$(CXX) -shared'
8775 else
8776 LDSHARED='$(CC) -G'
8777 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008778 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008779 SCO_SV*)
8780 LDSHARED='$(CC) -Wl,-G,-Bexport'
8781 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8782 CYGWIN*)
8783 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8784 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785 *) LDSHARED="ld";;
8786 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8789$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008790LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008791BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008792# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008793# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8795$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008796if test -z "$CCSHARED"
8797then
Guido van Rossum07397971997-04-29 21:49:50 +00008798 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008799 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008800 then CCSHARED="-fPIC";
8801 elif test `uname -p` = sparc;
8802 then CCSHARED="-xcode=pic32";
8803 else CCSHARED="-Kpic";
8804 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008805 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008806 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008807 else CCSHARED="+z";
8808 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008809 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008810 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008811 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008812 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008813 if test "$GCC" = "yes"
8814 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008815 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008816 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008817 SCO_SV*)
8818 if test "$GCC" = "yes"
8819 then CCSHARED="-fPIC"
8820 else CCSHARED="-Kpic -belf"
8821 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008822 IRIX*/6*) case $CC in
8823 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008824 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008825 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008826 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8829$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008830# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008831# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8833$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008834if test -z "$LINKFORSHARED"
8835then
Guido van Rossum07397971997-04-29 21:49:50 +00008836 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008837 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008838 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008839 LINKFORSHARED="-Wl,-E -Wl,+s";;
8840# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008841 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008842 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008843 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008845 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008846
8847 # Issue #18075: the default maximum stack size (8MBytes) is too
8848 # small for the default recursion limit. Increase the stack size
8849 # to ensure that tests don't crash
8850 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8851
Jack Jansene578a632001-08-15 01:27:14 +00008852 if test "$enable_framework"
8853 then
Jack Jansenda49e192005-01-07 13:08:22 +00008854 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008855 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008856 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008857 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008858 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008859 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008860 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008861 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8862 then
8863 LINKFORSHARED="-Wl,--export-dynamic"
8864 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008865 SunOS/5*) case $CC in
8866 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008867 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008868 then
8869 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008870 fi;;
8871 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008872 CYGWIN*)
8873 if test $enable_shared = "no"
8874 then
8875 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8876 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008877 QNX*)
8878 # -Wl,-E causes the symbols to be added to the dynamic
8879 # symbol table so that they can be found when a module
8880 # is loaded. -N 2048K causes the stack size to be set
8881 # to 2048 kilobytes so that the stack doesn't overflow
8882 # when running test_compile.py.
8883 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008884 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8887$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008888
Michael W. Hudson54241132001-12-07 15:38:26 +00008889
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008890
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8892$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008893if test ! "$LIBRARY" = "$LDLIBRARY"
8894then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008895 case $ac_sys_system in
8896 CYGWIN*)
8897 # Cygwin needs CCSHARED when building extension DLLs
8898 # but not when building the interpreter DLL.
8899 CFLAGSFORSHARED='';;
8900 *)
8901 CFLAGSFORSHARED='$(CCSHARED)'
8902 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8905$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008906
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008907# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8908# library (with --enable-shared).
8909# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008910# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8911# if it is not required, since it creates a dependency of the shared library
8912# to LIBS. This, in turn, means that applications linking the shared libpython
8913# don't need to link LIBS explicitly. The default should be only changed
8914# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8917$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008918case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008919 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008920 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8923$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008924
8925
Guido van Rossum627b2d71993-12-24 10:39:16 +00008926# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8928$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008929if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008930 $as_echo_n "(cached) " >&6
8931else
8932 ac_check_lib_save_LIBS=$LIBS
8933LIBS="-lsendfile $LIBS"
8934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8935/* end confdefs.h. */
8936
8937/* Override any GCC internal prototype to avoid an error.
8938 Use char because int might match the return type of a GCC
8939 builtin and then its argument prototype would still apply. */
8940#ifdef __cplusplus
8941extern "C"
8942#endif
8943char sendfile ();
8944int
8945main ()
8946{
8947return sendfile ();
8948 ;
8949 return 0;
8950}
8951_ACEOF
8952if ac_fn_c_try_link "$LINENO"; then :
8953 ac_cv_lib_sendfile_sendfile=yes
8954else
8955 ac_cv_lib_sendfile_sendfile=no
8956fi
8957rm -f core conftest.err conftest.$ac_objext \
8958 conftest$ac_exeext conftest.$ac_ext
8959LIBS=$ac_check_lib_save_LIBS
8960fi
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8962$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008963if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008964 cat >>confdefs.h <<_ACEOF
8965#define HAVE_LIBSENDFILE 1
8966_ACEOF
8967
8968 LIBS="-lsendfile $LIBS"
8969
8970fi
8971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8973$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008974if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008976else
Martin v. Löwis11437992002-04-12 09:54:03 +00008977 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008978LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982/* Override any GCC internal prototype to avoid an error.
8983 Use char because int might match the return type of a GCC
8984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008985#ifdef __cplusplus
8986extern "C"
8987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008988char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008989int
8990main ()
8991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008992return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ;
8994 return 0;
8995}
8996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002rm -f core conftest.err conftest.$ac_objext \
9003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009004LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9007$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009008if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 cat >>confdefs.h <<_ACEOF
9010#define HAVE_LIBDL 1
9011_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009012
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009013 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009014
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009015fi
9016 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9018$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009019if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009023LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027/* Override any GCC internal prototype to avoid an error.
9028 Use char because int might match the return type of a GCC
9029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009030#ifdef __cplusplus
9031extern "C"
9032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009033char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009034int
9035main ()
9036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 ;
9039 return 0;
9040}
9041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009044else
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047rm -f core conftest.err conftest.$ac_objext \
9048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009049LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9052$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009053if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 cat >>confdefs.h <<_ACEOF
9055#define HAVE_LIBDLD 1
9056_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009057
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009058 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009060fi
9061 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9063$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9064if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9065 $as_echo_n "(cached) " >&6
9066else
9067 ac_check_lib_save_LIBS=$LIBS
9068LIBS="-lcrypto $LIBS"
9069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9070/* end confdefs.h. */
9071
9072/* Override any GCC internal prototype to avoid an error.
9073 Use char because int might match the return type of a GCC
9074 builtin and then its argument prototype would still apply. */
9075#ifdef __cplusplus
9076extern "C"
9077#endif
9078char RAND_egd ();
9079int
9080main ()
9081{
9082return RAND_egd ();
9083 ;
9084 return 0;
9085}
9086_ACEOF
9087if ac_fn_c_try_link "$LINENO"; then :
9088 ac_cv_lib_crypto_RAND_egd=yes
9089else
9090 ac_cv_lib_crypto_RAND_egd=no
9091fi
9092rm -f core conftest.err conftest.$ac_objext \
9093 conftest$ac_exeext conftest.$ac_ext
9094LIBS=$ac_check_lib_save_LIBS
9095fi
9096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9097$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9098if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9099
9100$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9101
9102fi
9103
Martin v. Löwis519adae2003-09-20 10:47:47 +00009104
Georg Brandlb1441c72009-01-03 22:33:39 +00009105# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009106if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9108$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009109if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009111else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009112 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009116/* Override any GCC internal prototype to avoid an error.
9117 Use char because int might match the return type of a GCC
9118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009119#ifdef __cplusplus
9120extern "C"
9121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009122char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009123int
9124main ()
9125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 ;
9128 return 0;
9129}
9130_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131for ac_lib in '' pthread rt posix4; do
9132 if test -z "$ac_lib"; then
9133 ac_res="none required"
9134 else
9135 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009137 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009139 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009141rm -f core conftest.err conftest.$ac_objext \
9142 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009143 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009146done
Victor Stinnere0be4232011-10-25 13:06:09 +02009147if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009149else
9150 ac_cv_search_sem_init=no
9151fi
9152rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009153LIBS=$ac_func_search_save_LIBS
9154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9156$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009157ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009158if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009160
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009161fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009162 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009163 # posix4 on Solaris 2.6
9164 # pthread (first!) on Linux
9165fi
9166
Martin v. Löwis19d17342003-06-14 21:03:05 +00009167# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9169$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009170if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009171 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009172else
9173 ac_check_lib_save_LIBS=$LIBS
9174LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009176/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009177
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178/* Override any GCC internal prototype to avoid an error.
9179 Use char because int might match the return type of a GCC
9180 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009181#ifdef __cplusplus
9182extern "C"
9183#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009184char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009185int
9186main ()
9187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009188return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009189 ;
9190 return 0;
9191}
9192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009193if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009194 ac_cv_lib_intl_textdomain=yes
9195else
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009198rm -f core conftest.err conftest.$ac_objext \
9199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009200LIBS=$ac_check_lib_save_LIBS
9201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9203$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009204if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009205
Matthias Kloseb9621712010-04-24 17:59:49 +00009206$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009207
Brett Cannonc6d936e2009-06-07 20:09:53 +00009208 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009209fi
9210
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009211
9212# checks for system dependent C++ extensions support
9213case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009214 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9215$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009217/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009218
Georg Brandl59e87bd2011-02-15 19:48:59 +00009219 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009220int
9221main ()
9222{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009223loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ;
9225 return 0;
9226}
Matthias Kloseb159a552010-04-25 21:00:44 +00009227
Martin v. Löwis11437992002-04-12 09:54:03 +00009228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009229if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009230
Matthias Kloseb159a552010-04-25 21:00:44 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Matthias Kloseb159a552010-04-25 21:00:44 +00009234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009235$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009236
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009237else
Matthias Kloseb159a552010-04-25 21:00:44 +00009238
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009240$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009241
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009243rm -f core conftest.err conftest.$ac_objext \
9244 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009245 *) ;;
9246esac
9247
Christian Heimes985ecdc2013-11-20 11:46:18 +01009248# check for systems that require aligned memory access
9249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9250$as_echo_n "checking aligned memory access is required... " >&6; }
9251if test "$cross_compiling" = yes; then :
9252 aligned_required=yes
9253else
9254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9255/* end confdefs.h. */
9256
9257int main()
9258{
9259 char s[16];
9260 int i, *p1, *p2;
9261 for (i=0; i < 16; i++)
9262 s[i] = i;
9263 p1 = (int*)(s+1);
9264 p2 = (int*)(s+2);
9265 if (*p1 == *p2)
9266 return 1;
9267 return 0;
9268}
9269
9270_ACEOF
9271if ac_fn_c_try_run "$LINENO"; then :
9272 aligned_required=no
9273else
9274 aligned_required=yes
9275fi
9276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9277 conftest.$ac_objext conftest.beam conftest.$ac_ext
9278fi
9279
9280
9281if test "$aligned_required" = yes ; then
9282
9283$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9284
9285fi
9286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9287$as_echo "$aligned_required" >&6; }
9288
9289
9290# str, bytes and memoryview hash algorithm
9291
9292
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9294$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9295
9296# Check whether --with-hash_algorithm was given.
9297if test "${with_hash_algorithm+set}" = set; then :
9298 withval=$with_hash_algorithm;
9299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9300$as_echo "$withval" >&6; }
9301case "$withval" in
9302 siphash24)
9303 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9304
9305 ;;
9306 fnv)
9307 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9308
9309 ;;
9310 *)
9311 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9312 ;;
9313esac
9314
9315else
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9317$as_echo "default" >&6; }
9318fi
9319
9320
Charles-François Natalid30b0222014-05-08 23:08:51 +01009321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9322$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9323
9324# Check whether --with-address_sanitizer was given.
9325if test "${with_address_sanitizer+set}" = set; then :
9326 withval=$with_address_sanitizer;
9327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9328$as_echo "$withval" >&6; }
9329BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9330LDFLAGS="-fsanitize=address $LDFLAGS"
9331
9332else
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9334$as_echo "no" >&6; }
9335fi
9336
9337
Guido van Rossum70c7f481998-03-26 18:44:10 +00009338# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9340$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009341if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009342 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009343else
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009345LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349/* Override any GCC internal prototype to avoid an error.
9350 Use char because int might match the return type of a GCC
9351 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009352#ifdef __cplusplus
9353extern "C"
9354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009355char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009356int
9357main ()
9358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ;
9361 return 0;
9362}
9363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009366else
Matthias Kloseb9621712010-04-24 17:59:49 +00009367 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009369rm -f core conftest.err conftest.$ac_objext \
9370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009371LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9374$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009375if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009376 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009377fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009378 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9380$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009381if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009383else
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009385LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389/* Override any GCC internal prototype to avoid an error.
9390 Use char because int might match the return type of a GCC
9391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009392#ifdef __cplusplus
9393extern "C"
9394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009395char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009396int
9397main ()
9398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 ;
9401 return 0;
9402}
9403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009406else
Matthias Kloseb9621712010-04-24 17:59:49 +00009407 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009409rm -f core conftest.err conftest.$ac_objext \
9410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009411LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9414$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009415if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009416 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009417fi
9418 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9421$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009424if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9427$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009428LIBS="$withval $LIBS"
9429
9430else
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9432$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433fi
9434
Guido van Rossum7f43da71994-08-01 12:15:30 +00009435
Victor Stinner8291b5e2015-03-20 16:03:14 +01009436
9437
9438
9439
9440
9441
9442
9443if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9444 if test -n "$ac_tool_prefix"; then
9445 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9446set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9448$as_echo_n "checking for $ac_word... " >&6; }
9449if ${ac_cv_path_PKG_CONFIG+:} false; then :
9450 $as_echo_n "(cached) " >&6
9451else
9452 case $PKG_CONFIG in
9453 [\\/]* | ?:[\\/]*)
9454 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9455 ;;
9456 *)
9457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9458for as_dir in $PATH
9459do
9460 IFS=$as_save_IFS
9461 test -z "$as_dir" && as_dir=.
9462 for ac_exec_ext in '' $ac_executable_extensions; do
9463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9464 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9466 break 2
9467 fi
9468done
9469 done
9470IFS=$as_save_IFS
9471
9472 ;;
9473esac
9474fi
9475PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9476if test -n "$PKG_CONFIG"; then
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9478$as_echo "$PKG_CONFIG" >&6; }
9479else
9480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
9482fi
9483
9484
9485fi
9486if test -z "$ac_cv_path_PKG_CONFIG"; then
9487 ac_pt_PKG_CONFIG=$PKG_CONFIG
9488 # Extract the first word of "pkg-config", so it can be a program name with args.
9489set dummy pkg-config; ac_word=$2
9490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9491$as_echo_n "checking for $ac_word... " >&6; }
9492if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9493 $as_echo_n "(cached) " >&6
9494else
9495 case $ac_pt_PKG_CONFIG in
9496 [\\/]* | ?:[\\/]*)
9497 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9498 ;;
9499 *)
9500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9501for as_dir in $PATH
9502do
9503 IFS=$as_save_IFS
9504 test -z "$as_dir" && as_dir=.
9505 for ac_exec_ext in '' $ac_executable_extensions; do
9506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9507 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9509 break 2
9510 fi
9511done
9512 done
9513IFS=$as_save_IFS
9514
9515 ;;
9516esac
9517fi
9518ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9519if test -n "$ac_pt_PKG_CONFIG"; then
9520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9521$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9522else
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9524$as_echo "no" >&6; }
9525fi
9526
9527 if test "x$ac_pt_PKG_CONFIG" = x; then
9528 PKG_CONFIG=""
9529 else
9530 case $cross_compiling:$ac_tool_warned in
9531yes:)
9532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9534ac_tool_warned=yes ;;
9535esac
9536 PKG_CONFIG=$ac_pt_PKG_CONFIG
9537 fi
9538else
9539 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9540fi
9541
9542fi
9543if test -n "$PKG_CONFIG"; then
9544 _pkg_min_version=0.9.0
9545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9546$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9547 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9549$as_echo "yes" >&6; }
9550 else
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553 PKG_CONFIG=""
9554 fi
9555fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009556
9557# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9559$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009560
9561# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009563 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009564else
9565 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009566fi
9567
9568
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9570$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009571
9572# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9574$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009575
9576# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009577if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009578 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009579else
9580 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009581fi
9582
9583
9584if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009585 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9586else
9587 LIBFFI_INCLUDEDIR=""
9588fi
9589
9590
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9592$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009593
Stefan Krah60187b52012-03-23 19:06:27 +01009594# Check for use of the system libmpdec library
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9596$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9597
9598# Check whether --with-system_libmpdec was given.
9599if test "${with_system_libmpdec+set}" = set; then :
9600 withval=$with_system_libmpdec;
9601else
9602 with_system_libmpdec="no"
9603fi
9604
9605
9606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9607$as_echo "$with_system_libmpdec" >&6; }
9608
Benjamin Peterson076ed002010-10-31 17:11:02 +00009609# Check for support for loadable sqlite extensions
9610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9611$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9612# Check whether --enable-loadable-sqlite-extensions was given.
9613if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9614 enableval=$enable_loadable_sqlite_extensions;
9615else
9616 enable_loadable_sqlite_extensions="no"
9617fi
9618
9619
9620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9621$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9622
Ned Deilyd819b932013-09-06 01:07:05 -07009623# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9624
9625
9626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9627$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9628
9629# Check whether --with-tcltk-includes was given.
9630if test "${with_tcltk_includes+set}" = set; then :
9631 withval=$with_tcltk_includes;
9632else
9633 with_tcltk_includes="default"
9634fi
9635
9636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9637$as_echo "$with_tcltk_includes" >&6; }
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9639$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9640
9641# Check whether --with-tcltk-libs was given.
9642if test "${with_tcltk_libs+set}" = set; then :
9643 withval=$with_tcltk_libs;
9644else
9645 with_tcltk_libs="default"
9646fi
9647
9648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9649$as_echo "$with_tcltk_libs" >&6; }
9650if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9651then
9652 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9653 then
9654 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9655 fi
9656 TCLTK_INCLUDES=""
9657 TCLTK_LIBS=""
9658else
9659 TCLTK_INCLUDES="$with_tcltk_includes"
9660 TCLTK_LIBS="$with_tcltk_libs"
9661fi
9662
Matthias Klose55708cc2009-04-30 08:06:49 +00009663# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9665$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009666
9667# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009668if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009669 withval=$with_dbmliborder;
9670if test x$with_dbmliborder = xyes
9671then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009672as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009673else
9674 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9675 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9676 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009677 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009678 fi
9679 done
9680fi
9681fi
9682
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9684$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009685
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009686# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009687
9688
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9690$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009694 withval=$with_signal_module;
9695fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009696
9697
9698if test -z "$with_signal_module"
9699then with_signal_module="yes"
9700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9702$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009703
9704if test "${with_signal_module}" = "yes"; then
9705 USE_SIGNAL_MODULE=""
9706 SIGNAL_OBJS=""
9707else
9708 USE_SIGNAL_MODULE="#"
9709 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9710fi
9711
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009712# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009713
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009714USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
9718# Templates for things AC_DEFINEd more than once.
9719# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009720
9721
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
Matthias Kloseb9621712010-04-24 17:59:49 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9724$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009727if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 withval=$with_threads;
9729fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009730
9731
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009732# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009735if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 withval=$with_thread; with_threads=$with_thread
9737fi
9738
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009739
9740if test -z "$with_threads"
9741then with_threads="yes"
9742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9744$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009745
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009746
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009747if test "$with_threads" = "no"
9748then
9749 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009750elif test "$ac_cv_pthread_is_default" = yes
9751then
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009753
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009754 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009756
9757 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009759elif test "$ac_cv_kpthread" = "yes"
9760then
9761 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009762 if test "$ac_cv_cxx_thread" = "yes"; then
9763 CXX="$CXX -Kpthread"
9764 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009765 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009766
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009767 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009768 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009769elif test "$ac_cv_kthread" = "yes"
9770then
9771 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009772 if test "$ac_cv_cxx_thread" = "yes"; then
9773 CXX="$CXX -Kthread"
9774 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009776
9777 posix_threads=yes
9778 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779elif test "$ac_cv_pthread" = "yes"
9780then
9781 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009782 if test "$ac_cv_cxx_thread" = "yes"; then
9783 CXX="$CXX -pthread"
9784 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009786
9787 posix_threads=yes
9788 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009789else
9790 if test ! -z "$with_threads" -a -d "$with_threads"
9791 then LDFLAGS="$LDFLAGS -L$with_threads"
9792 fi
9793 if test ! -z "$withval" -a -d "$withval"
9794 then LDFLAGS="$LDFLAGS -L$withval"
9795 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009796
9797 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009798 # define _POSIX_THREADS in unistd.h. Some apparently don't
9799 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9801$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009804
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009805#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009806#ifdef _POSIX_THREADS
9807yes
9808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009809
9810_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009813 unistd_defines_pthreads=yes
9814else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009815 unistd_defines_pthreads=no
9816fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009817rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009818
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9820$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009821
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009823
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009824 # Just looking for pthread_create in libpthread is not enough:
9825 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9826 # So we really have to include pthread.h, and then link.
9827 _libs=$LIBS
9828 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9830$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009833
9834#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009835#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009836
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009837void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
9840{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009841
9842pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009843 ;
9844 return 0;
9845}
9846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009848
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9850$as_echo "yes" >&6; }
9851 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009852
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009853 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009854 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009855else
Martin v. Löwis11437992002-04-12 09:54:03 +00009856
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009857 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009859if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009861
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009862 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009863 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009864else
Guido van Rossumad678af1998-10-02 14:42:15 +00009865
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9867$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009868if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009870else
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009872LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876/* Override any GCC internal prototype to avoid an error.
9877 Use char because int might match the return type of a GCC
9878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009879#ifdef __cplusplus
9880extern "C"
9881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009882char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009883int
9884main ()
9885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ;
9888 return 0;
9889}
9890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896rm -f core conftest.err conftest.$ac_objext \
9897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009898LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9901$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009902if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009904
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009905 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009906 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009907 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009908else
Greg Steinadf63d62000-07-05 10:38:09 +00009909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9911$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009912if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009914else
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009916LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920/* Override any GCC internal prototype to avoid an error.
9921 Use char because int might match the return type of a GCC
9922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009923#ifdef __cplusplus
9924extern "C"
9925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009926char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009927int
9928main ()
9929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ;
9932 return 0;
9933}
9934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009935if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009937else
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009940rm -f core conftest.err conftest.$ac_objext \
9941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009942LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9945$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009946if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009948
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009949 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009950 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009951 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009952else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9955$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009956if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009958else
Martin v. Löwis11437992002-04-12 09:54:03 +00009959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009960LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964/* Override any GCC internal prototype to avoid an error.
9965 Use char because int might match the return type of a GCC
9966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009967#ifdef __cplusplus
9968extern "C"
9969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009970char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009971int
9972main ()
9973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009974return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 ;
9976 return 0;
9977}
9978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009981else
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009984rm -f core conftest.err conftest.$ac_objext \
9985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009986LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9989$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009990if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009992
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009993 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009994 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009995 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009996else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009997
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9999$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010000if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010002else
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010004LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008/* Override any GCC internal prototype to avoid an error.
10009 Use char because int might match the return type of a GCC
10010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010011#ifdef __cplusplus
10012extern "C"
10013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010014char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010015int
10016main ()
10017{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010018return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ;
10020 return 0;
10021}
10022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010025else
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010028rm -f core conftest.err conftest.$ac_objext \
10029 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010030LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10033$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010034if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010037 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010038 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010039 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010040else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010041
Martin v. Löwis130fb172001-07-19 11:00:41 +000010042 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010043fi
10044
Guido van Rossum627b2d71993-12-24 10:39:16 +000010045
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010046fi
10047
Guido van Rossum0be3e491997-05-22 20:33:33 +000010048fi
10049
Guido van Rossum49545951997-12-02 19:28:29 +000010050fi
10051
Guido van Rossumb93a8621998-05-07 13:27:32 +000010052fi
10053
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010055rm -f core conftest.err conftest.$ac_objext \
10056 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10059$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010060if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010062else
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010064LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068/* Override any GCC internal prototype to avoid an error.
10069 Use char because int might match the return type of a GCC
10070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010071#ifdef __cplusplus
10072extern "C"
10073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010074char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010075int
10076main ()
10077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 ;
10080 return 0;
10081}
10082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010085else
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088rm -f core conftest.err conftest.$ac_objext \
10089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010090LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10093$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010094if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010096
Martin v. Löwis130fb172001-07-19 11:00:41 +000010097 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010098 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010099 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010100fi
10101
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010102
Neal Norwitza978ab02002-11-02 16:58:05 +000010103 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10105$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010106if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010110LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114/* Override any GCC internal prototype to avoid an error.
10115 Use char because int might match the return type of a GCC
10116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010117#ifdef __cplusplus
10118extern "C"
10119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010120char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010121int
10122main ()
10123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ;
10126 return 0;
10127}
10128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010129if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010131else
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134rm -f core conftest.err conftest.$ac_objext \
10135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10139$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010140if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010142
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010143 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010144 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010145 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010146fi
10147
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010148 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010149fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010150
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010151if test "$posix_threads" = "yes"; then
10152 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010153
Matthias Kloseb9621712010-04-24 17:59:49 +000010154$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010155
10156 fi
10157
10158 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10159 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010160 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010161$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010162
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010163 ;;
10164 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010165$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010166
10167 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010168 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010169$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010170
10171 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010172 esac
10173
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10175$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010176 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010178else
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010180 ac_cv_pthread_system_supported=no
10181else
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010184
10185 #include <stdio.h>
10186 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010187 void *foo(void *parm) {
10188 return NULL;
10189 }
10190 main() {
10191 pthread_attr_t attr;
10192 pthread_t id;
10193 if (pthread_attr_init(&attr)) exit(-1);
10194 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10195 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10196 exit(0);
10197 }
10198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010199if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010200 ac_cv_pthread_system_supported=yes
10201else
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010206fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208
Guido van Rossum627b2d71993-12-24 10:39:16 +000010209fi
10210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10212$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010213 if test "$ac_cv_pthread_system_supported" = "yes"; then
10214
Matthias Kloseb9621712010-04-24 17:59:49 +000010215$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010216
10217 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 for ac_func in pthread_sigmask
10219do :
10220 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010221if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010223#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010224_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010225 case $ac_sys_system in
10226 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010227
Matthias Kloseb9621712010-04-24 17:59:49 +000010228$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010229
10230 ;;
10231 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010232fi
10233done
10234
Christian Heimesf77b4b22013-08-21 13:26:05 +020010235 for ac_func in pthread_atfork
10236do :
10237 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10238if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10239 cat >>confdefs.h <<_ACEOF
10240#define HAVE_PTHREAD_ATFORK 1
10241_ACEOF
10242
10243fi
10244done
10245
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010246fi
10247
10248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010249# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Matthias Kloseb9621712010-04-24 17:59:49 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10252$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010254if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010256 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10258$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010259 ipv6=no
10260 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10262$as_echo "yes" >&6; }
10263 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010264
10265 ipv6=yes
10266 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268else
Martin v. Löwis11437992002-04-12 09:54:03 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010271/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272 /* AF_INET6 available check */
10273#include <sys/types.h>
10274#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010275int
10276main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010278int domain = AF_INET6;
10279 ;
10280 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010281}
Martin v. Löwis11437992002-04-12 09:54:03 +000010282_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010283if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010284
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10286$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010287 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010288
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010289else
Matthias Kloseb159a552010-04-25 21:00:44 +000010290
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10292$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010294
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010295fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010298if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10300$as_echo_n "checking if RFC2553 API is available... " >&6; }
10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010302/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010303
10304 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010305#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010306int
10307main ()
10308{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010309struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010310 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ;
10312 return 0;
10313}
Matthias Kloseb159a552010-04-25 21:00:44 +000010314
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010317
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010319$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010320 ipv6=yes
10321
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010322else
Matthias Kloseb159a552010-04-25 21:00:44 +000010323
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010325$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010326 ipv6=no
10327
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010330fi
10331
10332if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010334
10335fi
10336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337fi
10338
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010339
10340ipv6type=unknown
10341ipv6lib=none
10342ipv6trylibc=no
10343
10344if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10346$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010347 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10348 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010349 case $i in
10350 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010352/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010353
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010354#include <netinet/in.h>
10355#ifdef IPV6_INRIA_VERSION
10356yes
10357#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010358_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010361 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010362fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010363rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010364
10365 ;;
10366 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010368/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010369
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010370#include <netinet/in.h>
10371#ifdef __KAME__
10372yes
10373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010377 ipv6type=$i;
10378 ipv6lib=inet6
10379 ipv6libdir=/usr/local/v6/lib
10380 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010381fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010382rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010383
10384 ;;
10385 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010388
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010389#include <features.h>
10390#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10391yes
10392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010393_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010396 ipv6type=$i;
10397 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010398fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010399rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010400
10401 ;;
10402 linux-inet6)
10403 if test -d /usr/inet6; then
10404 ipv6type=$i
10405 ipv6lib=inet6
10406 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010407 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010408 fi
10409 ;;
10410 solaris)
10411 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010412 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010413 ipv6type=$i
10414 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010415 fi
10416 fi
10417 ;;
10418 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010421
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010422#include <sys/param.h>
10423#ifdef _TOSHIBA_INET6
10424yes
10425#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010426_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010429 ipv6type=$i;
10430 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010431 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010432fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010433rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010434
10435 ;;
10436 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010439
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010440#include </usr/local/v6/include/sys/v6config.h>
10441#ifdef __V6D__
10442yes
10443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010444_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010445if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010447 ipv6type=$i;
10448 ipv6lib=v6;
10449 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010450 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010452rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010453
10454 ;;
10455 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010457/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010458
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010459#include <sys/param.h>
10460#ifdef _ZETA_MINAMI_INET6
10461yes
10462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010463_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010466 ipv6type=$i;
10467 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010468 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010469fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010470rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010471
10472 ;;
10473 esac
10474 if test "$ipv6type" != "unknown"; then
10475 break
10476 fi
10477 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10479$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010480fi
10481
10482if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10483 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10484 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10485 echo "using lib$ipv6lib"
10486 else
10487 if test $ipv6trylibc = "yes"; then
10488 echo "using libc"
10489 else
10490 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10491 echo "You need to fetch lib$ipv6lib.a from appropriate"
10492 echo 'ipv6 kit and compile beforehand.'
10493 exit 1
10494 fi
10495 fi
10496fi
10497
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10499$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10501/* end confdefs.h. */
10502 /* CAN_RAW_FD_FRAMES available check */
10503#include <linux/can/raw.h>
10504int
10505main ()
10506{
10507int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10508 ;
10509 return 0;
10510}
10511_ACEOF
10512if ac_fn_c_try_compile "$LINENO"; then :
10513
10514
10515$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10516
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10518$as_echo "yes" >&6; }
10519
10520else
10521
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10523$as_echo "no" >&6; }
10524
10525fi
10526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10529$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010531/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010532
10533 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010534int
10535main ()
10536{
10537FSIORefNum fRef = 0
10538 ;
10539 return 0;
10540}
Matthias Kloseb159a552010-04-25 21:00:44 +000010541
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010543if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010544
Matthias Kloseb159a552010-04-25 21:00:44 +000010545
Matthias Kloseb9621712010-04-24 17:59:49 +000010546$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10549$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010550
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010551else
Matthias Kloseb159a552010-04-25 21:00:44 +000010552
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10554$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010555
10556fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10558
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010559# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10561$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010564if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565 withval=$with_doc_strings;
10566fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010567
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010568
10569if test -z "$with_doc_strings"
10570then with_doc_strings="yes"
10571fi
10572if test "$with_doc_strings" != "no"
10573then
10574
Matthias Kloseb9621712010-04-24 17:59:49 +000010575$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010576
10577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10579$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010580
Antoine Pitrou042b1282010-08-13 21:15:58 +000010581# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10583$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010586if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010588if test "$withval" != no
10589then
10590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10594$as_echo "yes" >&6; }
10595else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010597fi
10598else
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10600$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010601fi
10602
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010603
10604# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10606$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010609if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010610 withval=$with_pymalloc;
10611fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010612
Neil Schemenauera35c6882001-02-27 04:45:05 +000010613
Neil Schemenauer16c22972002-03-22 15:34:49 +000010614if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010615then
10616 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010617fi
10618if test "$with_pymalloc" != "no"
10619then
Martin v. Löwis11437992002-04-12 09:54:03 +000010620
Matthias Kloseb9621712010-04-24 17:59:49 +000010621$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010622
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010623 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10626$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010627
Benjamin Peterson05159c42009-12-03 03:01:27 +000010628# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10630$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010631
10632# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010633if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010634 withval=$with_valgrind;
10635else
10636 with_valgrind=no
10637fi
10638
Matthias Kloseb9621712010-04-24 17:59:49 +000010639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10640$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010641if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 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 +020010643if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010646
10647else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010648 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010649
10650fi
10651
10652
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010653 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010654fi
10655
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010656# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010657
Guido van Rossum98935bf2001-09-05 19:13:16 +000010658DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010659
Guido van Rossume97ee181999-12-20 21:27:22 +000010660# the dlopen() function means we might want to use dynload_shlib.o. some
10661# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010662for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010663do :
10664 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010665if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010668_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010669
Guido van Rossume97ee181999-12-20 21:27:22 +000010670fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010671done
Guido van Rossume97ee181999-12-20 21:27:22 +000010672
Michael W. Hudson54241132001-12-07 15:38:26 +000010673
Guido van Rossume97ee181999-12-20 21:27:22 +000010674# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10675# loading of modules.
10676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10678$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010679if test -z "$DYNLOADFILE"
10680then
10681 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010682 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10683 if test "$ac_cv_func_dlopen" = yes
10684 then DYNLOADFILE="dynload_shlib.o"
10685 else DYNLOADFILE="dynload_aix.o"
10686 fi
10687 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010688 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010689 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10690 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010691 *)
10692 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10693 # out any dynamic loading
10694 if test "$ac_cv_func_dlopen" = yes
10695 then DYNLOADFILE="dynload_shlib.o"
10696 else DYNLOADFILE="dynload_stub.o"
10697 fi
10698 ;;
10699 esac
10700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10702$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010703if test "$DYNLOADFILE" != "dynload_stub.o"
10704then
Martin v. Löwis11437992002-04-12 09:54:03 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010707
10708fi
10709
Neil Schemenauer4e425612001-06-19 15:44:15 +000010710# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10711
Michael W. Hudson54241132001-12-07 15:38:26 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10714$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010715if test -z "$MACHDEP_OBJS"
10716then
Jack Jansene578a632001-08-15 01:27:14 +000010717 MACHDEP_OBJS=$extra_machdep_objs
10718else
10719 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010720fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010721if test -z "$MACHDEP_OBJS"; then
10722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10723$as_echo "none" >&6; }
10724else
10725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10726$as_echo "$MACHDEP_OBJS" >&6; }
10727fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010728
Guido van Rossum627b2d71993-12-24 10:39:16 +000010729# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010730for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010731 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010732 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010733 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010734 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010735 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010736 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010737 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10738 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010739 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010740 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010741 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010742 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010743 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010744 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010745 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10746 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010747 sigaction sigaltstack siginterrupt sigpending sigrelse \
10748 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010749 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010750 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010751 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010752do :
10753 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10754ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010755if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010758_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010759
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010760fi
10761done
10762
Michael W. Hudson54241132001-12-07 15:38:26 +000010763
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010764ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10765 #include <dirent.h>
10766"
10767if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10768
10769$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10770
10771fi
10772
10773
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010774# For some functions, having a definition is not sufficient, since
10775# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10777$as_echo_n "checking for chroot... " >&6; }
10778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010780#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010781int
10782main ()
10783{
10784void *x=chroot
10785 ;
10786 return 0;
10787}
10788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010790
Matthias Kloseb9621712010-04-24 17:59:49 +000010791$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010792
Matthias Kloseb159a552010-04-25 21:00:44 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010794$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010795else
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10797$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010798
10799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10802$as_echo_n "checking for link... " >&6; }
10803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010805#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010806int
10807main ()
10808{
10809void *x=link
10810 ;
10811 return 0;
10812}
10813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010814if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010817
Matthias Kloseb159a552010-04-25 21:00:44 +000010818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010819$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010820else
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010823
10824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10827$as_echo_n "checking for symlink... " >&6; }
10828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010830#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010831int
10832main ()
10833{
10834void *x=symlink
10835 ;
10836 return 0;
10837}
10838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010842
Matthias Kloseb159a552010-04-25 21:00:44 +000010843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010844$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10847$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010848
10849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10852$as_echo_n "checking for fchdir... " >&6; }
10853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010854/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010855#include <unistd.h>
10856int
10857main ()
10858{
10859void *x=fchdir
10860 ;
10861 return 0;
10862}
10863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010864if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010867
Matthias Kloseb159a552010-04-25 21:00:44 +000010868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010869$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010870else
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10872$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010873
10874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10877$as_echo_n "checking for fsync... " >&6; }
10878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010879/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010880#include <unistd.h>
10881int
10882main ()
10883{
10884void *x=fsync
10885 ;
10886 return 0;
10887}
10888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010889if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010892
Matthias Kloseb159a552010-04-25 21:00:44 +000010893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010894$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010895else
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10897$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010898
10899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10902$as_echo_n "checking for fdatasync... " >&6; }
10903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010905#include <unistd.h>
10906int
10907main ()
10908{
10909void *x=fdatasync
10910 ;
10911 return 0;
10912}
10913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010914if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010917
Matthias Kloseb159a552010-04-25 21:00:44 +000010918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010919$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010920else
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10922$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010923
10924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10927$as_echo_n "checking for epoll... " >&6; }
10928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010929/* end confdefs.h. */
10930#include <sys/epoll.h>
10931int
10932main ()
10933{
10934void *x=epoll_create
10935 ;
10936 return 0;
10937}
10938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010939if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010942
Matthias Kloseb159a552010-04-25 21:00:44 +000010943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010944$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010945else
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10947$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010948
10949fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10952$as_echo_n "checking for epoll_create1... " >&6; }
10953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10954/* end confdefs.h. */
10955#include <sys/epoll.h>
10956int
10957main ()
10958{
10959void *x=epoll_create1
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964if ac_fn_c_try_compile "$LINENO"; then :
10965
10966$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10967
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10969$as_echo "yes" >&6; }
10970else
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972$as_echo "no" >&6; }
10973
10974fi
10975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10977$as_echo_n "checking for kqueue... " >&6; }
10978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010979/* end confdefs.h. */
10980
10981#include <sys/types.h>
10982#include <sys/event.h>
10983
10984int
10985main ()
10986{
10987int x=kqueue()
10988 ;
10989 return 0;
10990}
10991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010992if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010995
Matthias Kloseb159a552010-04-25 21:00:44 +000010996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010998else
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011001
11002fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11005$as_echo_n "checking for prlimit... " >&6; }
11006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11007/* end confdefs.h. */
11008
11009#include <sys/time.h>
11010#include <sys/resource.h>
11011
11012int
11013main ()
11014{
11015void *x=prlimit
11016 ;
11017 return 0;
11018}
11019_ACEOF
11020if ac_fn_c_try_compile "$LINENO"; then :
11021
11022$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11023
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11025$as_echo "yes" >&6; }
11026else
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
11029
11030fi
11031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11032
Martin v. Löwisd5843682002-11-21 20:41:28 +000011033# On some systems (eg. FreeBSD 5), we would find a definition of the
11034# functions ctermid_r, setgroups in the library, but no prototype
11035# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11036# address to avoid compiler warnings and potential miscompilations
11037# because of the missing prototypes.
11038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11040$as_echo_n "checking for ctermid_r... " >&6; }
11041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011043
Martin v. Löwisd5843682002-11-21 20:41:28 +000011044#include <stdio.h>
11045
Martin v. Löwisd5843682002-11-21 20:41:28 +000011046int
11047main ()
11048{
11049void* p = ctermid_r
11050 ;
11051 return 0;
11052}
11053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011057
Matthias Kloseb159a552010-04-25 21:00:44 +000011058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011059$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011060else
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11062$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011063
11064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11066
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11068$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011069if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011070 $as_echo_n "(cached) " >&6
11071else
11072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011073/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011074#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011075int
11076main ()
11077{
11078void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011079
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011080 ;
11081 return 0;
11082}
11083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011084if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011085 ac_cv_flock_decl=yes
11086else
11087 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011088
11089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011091
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011092fi
11093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11094$as_echo "$ac_cv_flock_decl" >&6; }
11095if test "x${ac_cv_flock_decl}" = xyes; then
11096 for ac_func in flock
11097do :
11098 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011099if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011100 cat >>confdefs.h <<_ACEOF
11101#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011102_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011103
Antoine Pitroua3000072010-09-07 14:52:42 +000011104else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011106$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011107if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011108 $as_echo_n "(cached) " >&6
11109else
11110 ac_check_lib_save_LIBS=$LIBS
11111LIBS="-lbsd $LIBS"
11112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11113/* end confdefs.h. */
11114
11115/* Override any GCC internal prototype to avoid an error.
11116 Use char because int might match the return type of a GCC
11117 builtin and then its argument prototype would still apply. */
11118#ifdef __cplusplus
11119extern "C"
11120#endif
11121char flock ();
11122int
11123main ()
11124{
11125return flock ();
11126 ;
11127 return 0;
11128}
11129_ACEOF
11130if ac_fn_c_try_link "$LINENO"; then :
11131 ac_cv_lib_bsd_flock=yes
11132else
11133 ac_cv_lib_bsd_flock=no
11134fi
11135rm -f core conftest.err conftest.$ac_objext \
11136 conftest$ac_exeext conftest.$ac_ext
11137LIBS=$ac_check_lib_save_LIBS
11138fi
11139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11140$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011141if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011142 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011143
11144
11145$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11146
11147
11148fi
11149
11150
11151fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011152done
11153
Antoine Pitroua3000072010-09-07 14:52:42 +000011154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155
Matthias Kloseb9621712010-04-24 17:59:49 +000011156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11157$as_echo_n "checking for getpagesize... " >&6; }
11158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011159/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011160
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011161#include <unistd.h>
11162
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011163int
11164main ()
11165{
11166void* p = getpagesize
11167 ;
11168 return 0;
11169}
11170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011172
Matthias Kloseb9621712010-04-24 17:59:49 +000011173$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011174
Matthias Kloseb159a552010-04-25 21:00:44 +000011175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011176$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011177else
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011180
11181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011183
Victor Stinner984890f2011-11-24 13:53:38 +010011184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11185$as_echo_n "checking for broken unsetenv... " >&6; }
11186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11187/* end confdefs.h. */
11188
11189#include <stdlib.h>
11190
11191int
11192main ()
11193{
11194int res = unsetenv("DUMMY")
11195 ;
11196 return 0;
11197}
11198_ACEOF
11199if ac_fn_c_try_compile "$LINENO"; then :
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11201$as_echo "no" >&6; }
11202else
11203
11204$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11205
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11207$as_echo "yes" >&6; }
11208
11209fi
11210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11211
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011212for ac_prog in true
11213do
11214 # Extract the first word of "$ac_prog", so it can be a program name with args.
11215set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11217$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011218if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011220else
11221 if test -n "$TRUE"; then
11222 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11223else
11224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11225for as_dir in $PATH
11226do
11227 IFS=$as_save_IFS
11228 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011229 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011231 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 $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 +000011233 break 2
11234 fi
11235done
Matthias Kloseb9621712010-04-24 17:59:49 +000011236 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011238
11239fi
11240fi
11241TRUE=$ac_cv_prog_TRUE
11242if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11244$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011245else
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11247$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011248fi
11249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011251 test -n "$TRUE" && break
11252done
11253test -n "$TRUE" || TRUE="/bin/true"
11254
11255
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11257$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011258if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011259 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011260else
11261 ac_check_lib_save_LIBS=$LIBS
11262LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011264/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266/* Override any GCC internal prototype to avoid an error.
11267 Use char because int might match the return type of a GCC
11268 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011269#ifdef __cplusplus
11270extern "C"
11271#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011272char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011273int
11274main ()
11275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011277 ;
11278 return 0;
11279}
11280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011281if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011282 ac_cv_lib_c_inet_aton=yes
11283else
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011286rm -f core conftest.err conftest.$ac_objext \
11287 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011288LIBS=$ac_check_lib_save_LIBS
11289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11291$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011292if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011293 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011294else
Matthias Kloseb9621712010-04-24 17:59:49 +000011295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11296$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011297if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011299else
11300 ac_check_lib_save_LIBS=$LIBS
11301LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305/* Override any GCC internal prototype to avoid an error.
11306 Use char because int might match the return type of a GCC
11307 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011308#ifdef __cplusplus
11309extern "C"
11310#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011311char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011312int
11313main ()
11314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011315return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011316 ;
11317 return 0;
11318}
11319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011320if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011321 ac_cv_lib_resolv_inet_aton=yes
11322else
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011325rm -f core conftest.err conftest.$ac_objext \
11326 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011327LIBS=$ac_check_lib_save_LIBS
11328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11330$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011331if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011332 cat >>confdefs.h <<_ACEOF
11333#define HAVE_LIBRESOLV 1
11334_ACEOF
11335
11336 LIBS="-lresolv $LIBS"
11337
11338fi
11339
11340
11341fi
11342
11343
Christian Heimesd0764e22007-12-04 15:00:33 +000011344# On Tru64, chflags seems to be present, but calling it will
11345# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11347$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011348if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011350else
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011352 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011353else
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011355/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011356
Christian Heimesd0764e22007-12-04 15:00:33 +000011357#include <sys/stat.h>
11358#include <unistd.h>
11359int main(int argc, char*argv[])
11360{
11361 if(chflags(argv[0], 0) != 0)
11362 return 1;
11363 return 0;
11364}
Ned Deily3eb67d52011-06-28 00:00:28 -070011365
Christian Heimesd0764e22007-12-04 15:00:33 +000011366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011367if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011368 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11373 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011374fi
11375
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011376
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11379$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011380if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011382if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011383 ac_cv_have_chflags="yes"
11384else
11385 ac_cv_have_chflags="no"
11386fi
11387
11388fi
11389if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011392
11393fi
11394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11396$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011397if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011398 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011399else
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011401 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011402else
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011404/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011405
Christian Heimesd0764e22007-12-04 15:00:33 +000011406#include <sys/stat.h>
11407#include <unistd.h>
11408int main(int argc, char*argv[])
11409{
11410 if(lchflags(argv[0], 0) != 0)
11411 return 1;
11412 return 0;
11413}
Ned Deily3eb67d52011-06-28 00:00:28 -070011414
Christian Heimesd0764e22007-12-04 15:00:33 +000011415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011416if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011417 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011418else
Matthias Kloseb9621712010-04-24 17:59:49 +000011419 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11422 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011423fi
11424
11425
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11428$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011429if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011431if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011432 ac_cv_have_lchflags="yes"
11433else
11434 ac_cv_have_lchflags="no"
11435fi
11436
11437fi
11438if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011441
11442fi
11443
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011444case $ac_sys_system/$ac_sys_release in
11445Darwin/*)
11446 _CUR_CFLAGS="${CFLAGS}"
11447 _CUR_LDFLAGS="${LDFLAGS}"
11448 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11449 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11450 ;;
11451esac
11452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11454$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011455if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011457else
11458 ac_check_lib_save_LIBS=$LIBS
11459LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011461/* end confdefs.h. */
11462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463/* Override any GCC internal prototype to avoid an error.
11464 Use char because int might match the return type of a GCC
11465 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011466#ifdef __cplusplus
11467extern "C"
11468#endif
11469char inflateCopy ();
11470int
11471main ()
11472{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011474 ;
11475 return 0;
11476}
11477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011479 ac_cv_lib_z_inflateCopy=yes
11480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011483rm -f core conftest.err conftest.$ac_objext \
11484 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011485LIBS=$ac_check_lib_save_LIBS
11486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11488$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011489if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011490
Matthias Kloseb9621712010-04-24 17:59:49 +000011491$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011492
11493fi
11494
11495
11496case $ac_sys_system/$ac_sys_release in
11497Darwin/*)
11498 CFLAGS="${_CUR_CFLAGS}"
11499 LDFLAGS="${_CUR_LDFLAGS}"
11500 ;;
11501esac
11502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11504$as_echo_n "checking for hstrerror... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011507
Martin v. Löwise9416172003-05-03 10:12:45 +000011508#include <netdb.h>
11509
Martin v. Löwise9416172003-05-03 10:12:45 +000011510int
11511main ()
11512{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011513void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011521
Matthias Kloseb159a552010-04-25 21:00:44 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011527
11528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011529rm -f core conftest.err conftest.$ac_objext \
11530 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11533$as_echo_n "checking for inet_aton... " >&6; }
11534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011535/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011536
Martin v. Löwis86d66262006-02-17 08:40:11 +000011537#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011538#include <sys/socket.h>
11539#include <netinet/in.h>
11540#include <arpa/inet.h>
11541
Martin v. Löwise9416172003-05-03 10:12:45 +000011542int
11543main ()
11544{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011545void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +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öwise9416172003-05-03 10:12:45 +000011551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011553
Matthias Kloseb159a552010-04-25 21:00:44 +000011554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011555$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011556else
Matthias Kloseb9621712010-04-24 17:59:49 +000011557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11558$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011559
11560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011561rm -f core conftest.err conftest.$ac_objext \
11562 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11565$as_echo_n "checking for inet_pton... " >&6; }
11566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011567/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011568
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011569#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011570#include <sys/socket.h>
11571#include <netinet/in.h>
11572#include <arpa/inet.h>
11573
Martin v. Löwise9416172003-05-03 10:12:45 +000011574int
11575main ()
11576{
11577void* p = inet_pton
11578 ;
11579 return 0;
11580}
11581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011583
Matthias Kloseb9621712010-04-24 17:59:49 +000011584$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011585
Matthias Kloseb159a552010-04-25 21:00:44 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011587$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011588else
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11590$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011591
11592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011594
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011595# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11597$as_echo_n "checking for setgroups... " >&6; }
11598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011599/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011600
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011601#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011602#ifdef HAVE_GRP_H
11603#include <grp.h>
11604#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011605
Martin v. Löwisd5843682002-11-21 20:41:28 +000011606int
11607main ()
11608{
11609void* p = setgroups
11610 ;
11611 return 0;
11612}
11613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011617
Matthias Kloseb159a552010-04-25 21:00:44 +000011618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011620else
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011623
11624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011627# check for openpty and forkpty
11628
11629for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011630do :
11631 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011632if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011635_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011636
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11639$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011640if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011642else
Martin v. Löwis11437992002-04-12 09:54:03 +000011643 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011644LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648/* Override any GCC internal prototype to avoid an error.
11649 Use char because int might match the return type of a GCC
11650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011651#ifdef __cplusplus
11652extern "C"
11653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011654char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011655int
11656main ()
11657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011658return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 ;
11660 return 0;
11661}
11662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011668rm -f core conftest.err conftest.$ac_objext \
11669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011670LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11673$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011674if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011676 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11679$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011680if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011682else
11683 ac_check_lib_save_LIBS=$LIBS
11684LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011686/* end confdefs.h. */
11687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688/* Override any GCC internal prototype to avoid an error.
11689 Use char because int might match the return type of a GCC
11690 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011691#ifdef __cplusplus
11692extern "C"
11693#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011694char openpty ();
11695int
11696main ()
11697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011698return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011699 ;
11700 return 0;
11701}
11702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011703if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011704 ac_cv_lib_bsd_openpty=yes
11705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011708rm -f core conftest.err conftest.$ac_objext \
11709 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011710LIBS=$ac_check_lib_save_LIBS
11711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11713$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011714if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011716 LIBS="$LIBS -lbsd"
11717fi
11718
11719
11720fi
11721
Fred Drake8cef4cf2000-06-28 16:40:38 +000011722
11723fi
11724done
11725
11726for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011727do :
11728 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011729if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011730 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011732_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011733
Fred Drake8cef4cf2000-06-28 16:40:38 +000011734else
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11736$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011737if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011739else
Martin v. Löwis11437992002-04-12 09:54:03 +000011740 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011741LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745/* Override any GCC internal prototype to avoid an error.
11746 Use char because int might match the return type of a GCC
11747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011748#ifdef __cplusplus
11749extern "C"
11750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011751char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011752int
11753main ()
11754{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011755return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 ;
11757 return 0;
11758}
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011761 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011765rm -f core conftest.err conftest.$ac_objext \
11766 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011767LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11770$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011771if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011773 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011774else
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11776$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011777if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011779else
11780 ac_check_lib_save_LIBS=$LIBS
11781LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011783/* end confdefs.h. */
11784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011785/* Override any GCC internal prototype to avoid an error.
11786 Use char because int might match the return type of a GCC
11787 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011788#ifdef __cplusplus
11789extern "C"
11790#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011791char forkpty ();
11792int
11793main ()
11794{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011795return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011796 ;
11797 return 0;
11798}
11799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011801 ac_cv_lib_bsd_forkpty=yes
11802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011805rm -f core conftest.err conftest.$ac_objext \
11806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011807LIBS=$ac_check_lib_save_LIBS
11808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11810$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011811if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011813 LIBS="$LIBS -lbsd"
11814fi
11815
11816
11817fi
11818
Fred Drake8cef4cf2000-06-28 16:40:38 +000011819
11820fi
11821done
11822
Jack Jansendd19cf82001-12-06 22:36:17 +000011823
Christian Heimesb186d002008-03-18 15:15:01 +000011824# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011825for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011826do :
11827 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011828if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011829 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011830#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011831_ACEOF
11832
11833fi
11834done
11835
11836
Michael W. Hudson54241132001-12-07 15:38:26 +000011837# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011838for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011839do :
11840 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11841ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011842if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011844#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011845_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011846
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011847fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011848done
11849
Michael W. Hudson54241132001-12-07 15:38:26 +000011850
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011851ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011853 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011854
Martin v. Löwis1142de32002-03-29 16:28:31 +000011855else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011856 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011857 *" dup2.$ac_objext "* ) ;;
11858 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011859 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011860esac
11861
Martin v. Löwis1142de32002-03-29 16:28:31 +000011862fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011863
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011864ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011865if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011866 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11867
11868else
11869 case " $LIBOBJS " in
11870 *" strdup.$ac_objext "* ) ;;
11871 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11872 ;;
11873esac
11874
11875fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011876
11877
11878for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011879do :
11880 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011881if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011882 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011883#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011886/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011887#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011888int
11889main ()
11890{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011891getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011892 ;
11893 return 0;
11894}
11895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011897
Matthias Kloseb9621712010-04-24 17:59:49 +000011898$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011899
Guido van Rossum627b2d71993-12-24 10:39:16 +000011900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011902
Guido van Rossum627b2d71993-12-24 10:39:16 +000011903fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011904done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011905
Jack Jansen150753c2003-03-29 22:07:47 +000011906for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011907do :
11908 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011909if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011910 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011911#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011914/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011915#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011916int
11917main ()
11918{
11919setpgrp(0,0);
11920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011927
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011930
11931fi
11932done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011933
Thomas Wouters3a584202000-08-05 23:28:51 +000011934for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011935do :
11936 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011937if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011939#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011942/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011943#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011944int
11945main ()
11946{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011947gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 ;
11949 return 0;
11950}
11951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011952if ac_fn_c_try_compile "$LINENO"; then :
11953
Guido van Rossum627b2d71993-12-24 10:39:16 +000011954else
Skip Montanaro6dead952003-09-25 14:50:04 +000011955
Matthias Kloseb9621712010-04-24 17:59:49 +000011956$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011957
Martin v. Löwis11437992002-04-12 09:54:03 +000011958
Guido van Rossum627b2d71993-12-24 10:39:16 +000011959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011961
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011963done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011964
Michael W. Hudson54241132001-12-07 15:38:26 +000011965
Victor Stinnere0be4232011-10-25 13:06:09 +020011966for ac_func in clock_gettime
11967do :
11968 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11969if test "x$ac_cv_func_clock_gettime" = xyes; then :
11970 cat >>confdefs.h <<_ACEOF
11971#define HAVE_CLOCK_GETTIME 1
11972_ACEOF
11973
11974else
11975
11976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11977$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11978if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11979 $as_echo_n "(cached) " >&6
11980else
11981 ac_check_lib_save_LIBS=$LIBS
11982LIBS="-lrt $LIBS"
11983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11984/* end confdefs.h. */
11985
11986/* Override any GCC internal prototype to avoid an error.
11987 Use char because int might match the return type of a GCC
11988 builtin and then its argument prototype would still apply. */
11989#ifdef __cplusplus
11990extern "C"
11991#endif
11992char clock_gettime ();
11993int
11994main ()
11995{
11996return clock_gettime ();
11997 ;
11998 return 0;
11999}
12000_ACEOF
12001if ac_fn_c_try_link "$LINENO"; then :
12002 ac_cv_lib_rt_clock_gettime=yes
12003else
12004 ac_cv_lib_rt_clock_gettime=no
12005fi
12006rm -f core conftest.err conftest.$ac_objext \
12007 conftest$ac_exeext conftest.$ac_ext
12008LIBS=$ac_check_lib_save_LIBS
12009fi
12010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12011$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12012if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12013
Victor Stinner7efb8332014-08-29 15:41:08 +020012014 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012015 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12016
12017
12018$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12019
12020
12021fi
12022
12023
12024fi
12025done
12026
12027
12028for ac_func in clock_getres
12029do :
12030 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12031if test "x$ac_cv_func_clock_getres" = xyes; then :
12032 cat >>confdefs.h <<_ACEOF
12033#define HAVE_CLOCK_GETRES 1
12034_ACEOF
12035
12036else
12037
12038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12039$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12040if ${ac_cv_lib_rt_clock_getres+:} false; then :
12041 $as_echo_n "(cached) " >&6
12042else
12043 ac_check_lib_save_LIBS=$LIBS
12044LIBS="-lrt $LIBS"
12045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046/* end confdefs.h. */
12047
12048/* Override any GCC internal prototype to avoid an error.
12049 Use char because int might match the return type of a GCC
12050 builtin and then its argument prototype would still apply. */
12051#ifdef __cplusplus
12052extern "C"
12053#endif
12054char clock_getres ();
12055int
12056main ()
12057{
12058return clock_getres ();
12059 ;
12060 return 0;
12061}
12062_ACEOF
12063if ac_fn_c_try_link "$LINENO"; then :
12064 ac_cv_lib_rt_clock_getres=yes
12065else
12066 ac_cv_lib_rt_clock_getres=no
12067fi
12068rm -f core conftest.err conftest.$ac_objext \
12069 conftest$ac_exeext conftest.$ac_ext
12070LIBS=$ac_check_lib_save_LIBS
12071fi
12072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12073$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12074if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12075
12076 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12077
12078
12079fi
12080
12081
12082fi
12083done
12084
12085
Matthias Kloseb9621712010-04-24 17:59:49 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12087$as_echo_n "checking for major... " >&6; }
12088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012089/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012090
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012091#if defined(MAJOR_IN_MKDEV)
12092#include <sys/mkdev.h>
12093#elif defined(MAJOR_IN_SYSMACROS)
12094#include <sys/sysmacros.h>
12095#else
12096#include <sys/types.h>
12097#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012098
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012099int
12100main ()
12101{
12102
12103 makedev(major(0),minor(0));
12104
12105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012110
12111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012113
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12115$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012116
12117else
Skip Montanaro6dead952003-09-25 14:50:04 +000012118
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12120$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012121
12122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012123rm -f core conftest.err conftest.$ac_objext \
12124 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012125
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012126# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012127# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12129$as_echo_n "checking for getaddrinfo... " >&6; }
12130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012132
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012133#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012134#include <sys/socket.h>
12135#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012136#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012137
Martin v. Löwis11437992002-04-12 09:54:03 +000012138int
12139main ()
12140{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012141getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 ;
12143 return 0;
12144}
12145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012146if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012147 have_getaddrinfo=yes
12148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012151rm -f core conftest.err conftest.$ac_objext \
12152 conftest$ac_exeext conftest.$ac_ext
12153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12154$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012155if test $have_getaddrinfo = yes
12156then
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12158$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012159 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012163
12164if test "${enable_ipv6+set}" = set; then
12165 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12166else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012167 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012168fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012171/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012172
Stefan Krah19c21392012-11-22 23:47:32 +010012173#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012174#include <sys/types.h>
12175#include <netdb.h>
12176#include <string.h>
12177#include <sys/socket.h>
12178#include <netinet/in.h>
12179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012180int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012181{
12182 int passive, gaierr, inet4 = 0, inet6 = 0;
12183 struct addrinfo hints, *ai, *aitop;
12184 char straddr[INET6_ADDRSTRLEN], strport[16];
12185
12186 for (passive = 0; passive <= 1; passive++) {
12187 memset(&hints, 0, sizeof(hints));
12188 hints.ai_family = AF_UNSPEC;
12189 hints.ai_flags = passive ? AI_PASSIVE : 0;
12190 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012191 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012192 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12193 (void)gai_strerror(gaierr);
12194 goto bad;
12195 }
12196 for (ai = aitop; ai; ai = ai->ai_next) {
12197 if (ai->ai_addr == NULL ||
12198 ai->ai_addrlen == 0 ||
12199 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12200 straddr, sizeof(straddr), strport, sizeof(strport),
12201 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12202 goto bad;
12203 }
12204 switch (ai->ai_family) {
12205 case AF_INET:
12206 if (strcmp(strport, "54321") != 0) {
12207 goto bad;
12208 }
12209 if (passive) {
12210 if (strcmp(straddr, "0.0.0.0") != 0) {
12211 goto bad;
12212 }
12213 } else {
12214 if (strcmp(straddr, "127.0.0.1") != 0) {
12215 goto bad;
12216 }
12217 }
12218 inet4++;
12219 break;
12220 case AF_INET6:
12221 if (strcmp(strport, "54321") != 0) {
12222 goto bad;
12223 }
12224 if (passive) {
12225 if (strcmp(straddr, "::") != 0) {
12226 goto bad;
12227 }
12228 } else {
12229 if (strcmp(straddr, "::1") != 0) {
12230 goto bad;
12231 }
12232 }
12233 inet6++;
12234 break;
12235 case AF_UNSPEC:
12236 goto bad;
12237 break;
12238 default:
12239 /* another family support? */
12240 break;
12241 }
12242 }
12243 }
12244
12245 if (!(inet4 == 0 || inet4 == 2))
12246 goto bad;
12247 if (!(inet6 == 0 || inet6 == 2))
12248 goto bad;
12249
12250 if (aitop)
12251 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012252 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012253
12254 bad:
12255 if (aitop)
12256 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012257 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012258}
12259
Martin v. Löwis11437992002-04-12 09:54:03 +000012260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012261if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012262 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12267 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012270fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012271
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12275$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12276
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012277if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012278then
12279 if test $ipv6 = yes
12280 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012281 echo 'Fatal: You must get working getaddrinfo() function.'
12282 echo ' or you can specify "--disable-ipv6"'.
12283 exit 1
12284 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012285else
Martin v. Löwis11437992002-04-12 09:54:03 +000012286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012288
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012289fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012290
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012291for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012292do :
12293 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012294if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012295 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012296#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012297_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012298
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012299fi
12300done
12301
Michael W. Hudson54241132001-12-07 15:38:26 +000012302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012303# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12305$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012306if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012308else
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012310/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012311#include <sys/types.h>
12312#include <sys/time.h>
12313#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012314
Martin v. Löwis11437992002-04-12 09:54:03 +000012315int
12316main ()
12317{
12318if ((struct tm *) 0)
12319return 0;
12320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012325 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012326else
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12332$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012333if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012334
Matthias Kloseb9621712010-04-24 17:59:49 +000012335$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336
12337fi
12338
Matthias Kloseb9621712010-04-24 17:59:49 +000012339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12340$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012341if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012345/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346#include <sys/types.h>
12347#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
Martin v. Löwis11437992002-04-12 09:54:03 +000012349int
12350main ()
12351{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352struct tm tm;
12353 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012354 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012360 ac_cv_struct_tm=time.h
12361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12367$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012368if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371
12372fi
12373
Matthias Kloseb9621712010-04-24 17:59:49 +000012374ac_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 +000012375#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
Matthias Kloseb9621712010-04-24 17:59:49 +000012377"
Victor Stinnere0be4232011-10-25 13:06:09 +020012378if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
12380cat >>confdefs.h <<_ACEOF
12381#define HAVE_STRUCT_TM_TM_ZONE 1
12382_ACEOF
12383
12384
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012386
Martin v. Löwis11437992002-04-12 09:54:03 +000012387if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012390
12391else
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12393"
Victor Stinnere0be4232011-10-25 13:06:09 +020012394if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396else
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012398fi
12399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012401#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402_ACEOF
12403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12405$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012406if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012410/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012411#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412#if !HAVE_DECL_TZNAME
12413extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
Martin v. Löwis11437992002-04-12 09:54:03 +000012416int
12417main ()
12418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 ;
12421 return 0;
12422}
12423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425 ac_cv_var_tzname=yes
12426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012429rm -f core conftest.err conftest.$ac_objext \
12430 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12433$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012434 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438 fi
12439fi
12440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441ac_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 +020012442if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012443
12444cat >>confdefs.h <<_ACEOF
12445#define HAVE_STRUCT_STAT_ST_RDEV 1
12446_ACEOF
12447
12448
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012449fi
12450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451ac_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 +020012452if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012453
Martin v. Löwis11437992002-04-12 09:54:03 +000012454cat >>confdefs.h <<_ACEOF
12455#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12456_ACEOF
12457
12458
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012459fi
12460
Matthias Kloseb9621712010-04-24 17:59:49 +000012461ac_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 +020012462if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012463
12464cat >>confdefs.h <<_ACEOF
12465#define HAVE_STRUCT_STAT_ST_FLAGS 1
12466_ACEOF
12467
12468
12469fi
12470
Matthias Kloseb9621712010-04-24 17:59:49 +000012471ac_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 +020012472if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012473
12474cat >>confdefs.h <<_ACEOF
12475#define HAVE_STRUCT_STAT_ST_GEN 1
12476_ACEOF
12477
12478
12479fi
12480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481ac_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 +020012482if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012483
12484cat >>confdefs.h <<_ACEOF
12485#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12486_ACEOF
12487
12488
12489fi
12490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491ac_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 +020012492if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012493
Martin v. Löwis11437992002-04-12 09:54:03 +000012494cat >>confdefs.h <<_ACEOF
12495#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12496_ACEOF
12497
12498
Matthias Kloseb9621712010-04-24 17:59:49 +000012499$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012500
12501else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012503 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12505 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012506esac
12507
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012508fi
12509
Michael W. Hudson54241132001-12-07 15:38:26 +000012510
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12513$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012514if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012516else
Matthias Kloseb159a552010-04-25 21:00:44 +000012517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012519/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012520#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012521int
12522main ()
12523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012525 ;
12526 return 0;
12527}
12528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012529if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012530 ac_cv_header_time_altzone=yes
12531else
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536fi
12537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12539$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012540if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012543
12544fi
12545
Guido van Rossumda88dad1995-01-26 00:46:29 +000012546was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12548$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012550/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012551
12552#include <sys/types.h>
12553#include <sys/select.h>
12554#include <sys/time.h>
12555
Martin v. Löwis11437992002-04-12 09:54:03 +000012556int
12557main ()
12558{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012559;
Martin v. Löwis11437992002-04-12 09:54:03 +000012560 ;
12561 return 0;
12562}
12563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
12566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012569 was_it_defined=yes
12570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12574$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575
Matthias Kloseb9621712010-04-24 17:59:49 +000012576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12577$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012578if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012580else
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012582/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012583#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012584int
12585main ()
12586{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012587struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ;
12589 return 0;
12590}
12591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012593 ac_cv_struct_addrinfo=yes
12594else
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12598fi
12599
Matthias Kloseb9621712010-04-24 17:59:49 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12601$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012602if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012605
12606fi
12607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12609$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012610if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012612else
Matthias Kloseb9621712010-04-24 17:59:49 +000012613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012614/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012615
12616# include <sys/types.h>
12617# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012618int
12619main ()
12620{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012621struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 ;
12623 return 0;
12624}
12625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012627 ac_cv_struct_sockaddr_storage=yes
12628else
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12632fi
12633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12635$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012636if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012639
12640fi
12641
Guido van Rossum627b2d71993-12-24 10:39:16 +000012642# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12645$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012646if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012648else
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012651$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012652int
12653main ()
12654{
12655static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012656test_array [0] = 0;
12657return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012658
12659 ;
12660 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012661}
Martin v. Löwis11437992002-04-12 09:54:03 +000012662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012663if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012664 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012665else
Matthias Kloseb9621712010-04-24 17:59:49 +000012666 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12671$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012674
12675fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012676
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12678$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012679if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012681else
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684
Martin v. Löwis11437992002-04-12 09:54:03 +000012685int
12686main ()
12687{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012688
Martin v. Löwis11437992002-04-12 09:54:03 +000012689#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012690 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012692 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694 char const *const *pcpcc;
12695 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 /* NEC SVR4.0.2 mips cc rejects this. */
12697 struct point {int x, y;};
12698 static struct point const zero = {0,0};
12699 /* AIX XL C 1.02.0.0 rejects this.
12700 It does not let you subtract one const X* pointer from another in
12701 an arm of an if-expression whose if-part is not a constant
12702 expression */
12703 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012706 ++pcpcc;
12707 ppc = (char**) pcpcc;
12708 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012709 { /* SCO 3.2v4 cc rejects this sort of thing. */
12710 char tx;
12711 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012713
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 }
12717 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12718 int x[] = {25, 17};
12719 const int *foo = &x[0];
12720 ++foo;
12721 }
12722 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12723 typedef const int *iptr;
12724 iptr p = 0;
12725 ++p;
12726 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012727 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012729 struct s { int j; const int *ap[3]; } bx;
12730 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 }
12732 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12733 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012737#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012738
Martin v. Löwis11437992002-04-12 09:54:03 +000012739 ;
12740 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012741}
Martin v. Löwis11437992002-04-12 09:54:03 +000012742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744 ac_cv_c_const=yes
12745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12751$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012752if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755
12756fi
12757
Michael W. Hudson54241132001-12-07 15:38:26 +000012758
Guido van Rossumda88dad1995-01-26 00:46:29 +000012759works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12761$as_echo_n "checking for working volatile... " >&6; }
12762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012764
Martin v. Löwis11437992002-04-12 09:54:03 +000012765int
12766main ()
12767{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012768volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 ;
12770 return 0;
12771}
12772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012773if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012774 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012775else
Skip Montanaro6dead952003-09-25 14:50:04 +000012776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012778
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012779
Guido van Rossum627b2d71993-12-24 10:39:16 +000012780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12783$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012784
Guido van Rossumda88dad1995-01-26 00:46:29 +000012785works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12787$as_echo_n "checking for working signed char... " >&6; }
12788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012789/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012790
Martin v. Löwis11437992002-04-12 09:54:03 +000012791int
12792main ()
12793{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012794signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 ;
12796 return 0;
12797}
12798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012799if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012800 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012801else
Skip Montanaro6dead952003-09-25 14:50:04 +000012802
Matthias Kloseb9621712010-04-24 17:59:49 +000012803$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012804
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012805
Guido van Rossum7f43da71994-08-01 12:15:30 +000012806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12809$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012810
Guido van Rossumda88dad1995-01-26 00:46:29 +000012811have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12813$as_echo_n "checking for prototypes... " >&6; }
12814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012815/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012816int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012817int
12818main ()
12819{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012820return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012821 ;
12822 return 0;
12823}
12824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012825if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012828
Matthias Kloseb159a552010-04-25 21:00:44 +000012829 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12833$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012834
Guido van Rossumda88dad1995-01-26 00:46:29 +000012835works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12837$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012839/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012840
12841#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012842int foo(int x, ...) {
12843 va_list va;
12844 va_start(va, x);
12845 va_arg(va, int);
12846 va_arg(va, char *);
12847 va_arg(va, double);
12848 return 0;
12849}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012850
Martin v. Löwis11437992002-04-12 09:54:03 +000012851int
12852main ()
12853{
Guido van Rossum90eea071996-08-30 20:58:57 +000012854return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012855 ;
12856 return 0;
12857}
12858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012860
12861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012863
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012864 works=yes
12865
Guido van Rossum627b2d71993-12-24 10:39:16 +000012866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12869$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870
Martin v. Löwisd6320502004-08-12 13:45:08 +000012871# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12873$as_echo_n "checking for socketpair... " >&6; }
12874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012875/* end confdefs.h. */
12876
12877#include <sys/types.h>
12878#include <sys/socket.h>
12879
12880int
12881main ()
12882{
12883void *x=socketpair
12884 ;
12885 return 0;
12886}
12887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012891
Matthias Kloseb159a552010-04-25 21:00:44 +000012892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012893$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012894else
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12896$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012897
12898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012900
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012901# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12903$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012905/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012906#include <sys/types.h>
12907#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012908int
12909main ()
12910{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012911struct sockaddr x;
12912x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ;
12914 return 0;
12915}
12916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917if ac_fn_c_try_compile "$LINENO"; then :
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12919$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922
12923else
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12925$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012926
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012929
Guido van Rossumda88dad1995-01-26 00:46:29 +000012930va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12932$as_echo_n "checking whether va_list is an array... " >&6; }
12933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012934/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012935
12936#ifdef HAVE_STDARG_PROTOTYPES
12937#include <stdarg.h>
12938#else
12939#include <varargs.h>
12940#endif
12941
Martin v. Löwis11437992002-04-12 09:54:03 +000012942int
12943main ()
12944{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 ;
12947 return 0;
12948}
12949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012950if ac_fn_c_try_compile "$LINENO"; then :
12951
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012952else
Skip Montanaro6dead952003-09-25 14:50:04 +000012953
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012956
Guido van Rossumda88dad1995-01-26 00:46:29 +000012957 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012958
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12962$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012964# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
12966
Matthias Kloseb9621712010-04-24 17:59:49 +000012967ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012968if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012969
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12973$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012974 OLD_CFLAGS=$CFLAGS
12975 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012978
12979# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012980
Martin v. Löwis11437992002-04-12 09:54:03 +000012981int
12982main ()
12983{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012984
12985 char *name;
12986 struct hostent *he, *res;
12987 char buffer[2048];
12988 int buflen = 2048;
12989 int h_errnop;
12990
12991 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012992
12993 ;
12994 return 0;
12995}
12996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012997if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013000
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13005$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013006
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013007else
Skip Montanaro6dead952003-09-25 14:50:04 +000013008
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010$as_echo "no" >&6; }
13011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13012$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013014/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013015
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013016# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
Martin v. Löwis11437992002-04-12 09:54:03 +000013018int
13019main ()
13020{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013021
13022 char *name;
13023 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013024 char buffer[2048];
13025 int buflen = 2048;
13026 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013027
Matthias Kloseb159a552010-04-25 21:00:44 +000013028 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013029
13030 ;
13031 return 0;
13032}
13033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013037
Martin v. Löwis11437992002-04-12 09:54:03 +000013038
Matthias Kloseb159a552010-04-25 21:00:44 +000013039$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13042$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013044else
Skip Montanaro6dead952003-09-25 14:50:04 +000013045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13047$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13049$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051/* end confdefs.h. */
13052
13053# include <netdb.h>
13054
13055int
13056main ()
13057{
13058
13059 char *name;
13060 struct hostent *he;
13061 struct hostent_data data;
13062
13063 (void) gethostbyname_r(name, he, &data);
13064
13065 ;
13066 return 0;
13067}
13068_ACEOF
13069if ac_fn_c_try_compile "$LINENO"; then :
13070
13071 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13072
13073
13074$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13075
13076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13077$as_echo "yes" >&6; }
13078
13079else
13080
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13082$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013083
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013092 CFLAGS=$OLD_CFLAGS
13093
13094else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 for ac_func in gethostbyname
13097do :
13098 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013099if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013101#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013102_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013103
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013104fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013105done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013106
Michael W. Hudson54241132001-12-07 15:38:26 +000013107
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013108fi
13109
Michael W. Hudson54241132001-12-07 15:38:26 +000013110
13111
13112
13113
13114
13115
Guido van Rossum627b2d71993-12-24 10:39:16 +000013116# checks for system services
13117# (none yet)
13118
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013120ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013121if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013122
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013123else
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13125$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013126if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013128else
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013130LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134/* Override any GCC internal prototype to avoid an error.
13135 Use char because int might match the return type of a GCC
13136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013137#ifdef __cplusplus
13138extern "C"
13139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013140char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013141int
13142main ()
13143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013144return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013145 ;
13146 return 0;
13147}
13148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013149if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013151else
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013154rm -f core conftest.err conftest.$ac_objext \
13155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013156LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13159$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013160if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 cat >>confdefs.h <<_ACEOF
13162#define HAVE_LIBIEEE 1
13163_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013164
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013165 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013166
Guido van Rossum627b2d71993-12-24 10:39:16 +000013167fi
13168
Michael W. Hudson54241132001-12-07 15:38:26 +000013169
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013170fi
13171
Michael W. Hudson54241132001-12-07 15:38:26 +000013172
Guido van Rossum7f253911997-05-09 02:42:48 +000013173# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13175$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013178if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013179 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013180if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013181then
13182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13186$as_echo "yes" >&6; }
13187else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13188$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013189fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013190else
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13192$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193fi
13194
Guido van Rossum7f253911997-05-09 02:42:48 +000013195
Guido van Rossum7f43da71994-08-01 12:15:30 +000013196# check for --with-libm=...
13197
Guido van Rossum563e7081996-09-10 18:20:48 +000013198case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013199Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013200*) LIBM=-lm
13201esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13203$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013205# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013208if test "$withval" = no
13209then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13211$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013212elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013213then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13215$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013216else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013217fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013218else
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13220$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221fi
13222
Guido van Rossum7f43da71994-08-01 12:15:30 +000013223
13224# check for --with-libc=...
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13227$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013229# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013230if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013232if test "$withval" = no
13233then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13235$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013236elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013237then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13239$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013240else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013241fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013242else
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13244$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245fi
13246
Guido van Rossum7f43da71994-08-01 12:15:30 +000013247
Stefan Krah1919b7e2012-03-21 18:25:23 +010013248# **************************************
13249# * Check for gcc x64 inline assembler *
13250# **************************************
13251
13252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13253$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13255/* end confdefs.h. */
13256
13257int
13258main ()
13259{
13260
13261 __asm__ __volatile__ ("movq %rcx, %rax");
13262
13263 ;
13264 return 0;
13265}
13266_ACEOF
13267if ac_fn_c_try_compile "$LINENO"; then :
13268 have_gcc_asm_for_x64=yes
13269else
13270 have_gcc_asm_for_x64=no
13271fi
13272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13274$as_echo "$have_gcc_asm_for_x64" >&6; }
13275if test "$have_gcc_asm_for_x64" = yes
13276then
13277
13278$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13279
13280fi
13281
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013282# **************************************************
13283# * Check for various properties of floating point *
13284# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13287$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013288if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013290else
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013293 ac_cv_little_endian_double=no
13294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013296/* end confdefs.h. */
13297
13298#include <string.h>
13299int main() {
13300 double x = 9006104071832581.0;
13301 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13302 return 0;
13303 else
13304 return 1;
13305}
13306
13307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013308if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013309 ac_cv_little_endian_double=yes
13310else
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13314 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013315fi
13316
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013317fi
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13320$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013321if test "$ac_cv_little_endian_double" = yes
13322then
13323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013325
13326fi
13327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13329$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013330if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013332else
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013335 ac_cv_big_endian_double=no
13336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013338/* end confdefs.h. */
13339
13340#include <string.h>
13341int main() {
13342 double x = 9006104071832581.0;
13343 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13344 return 0;
13345 else
13346 return 1;
13347}
13348
13349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013351 ac_cv_big_endian_double=yes
13352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13356 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013357fi
13358
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013359fi
13360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13362$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013363if test "$ac_cv_big_endian_double" = yes
13364then
13365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013367
13368fi
13369
13370# Some ARM platforms use a mixed-endian representation for doubles.
13371# While Python doesn't currently have full support for these platforms
13372# (see e.g., issue 1762561), we can at least make sure that float <-> string
13373# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13375$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013376if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013378else
13379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013381 ac_cv_mixed_endian_double=no
13382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013384/* end confdefs.h. */
13385
13386#include <string.h>
13387int main() {
13388 double x = 9006104071832581.0;
13389 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13390 return 0;
13391 else
13392 return 1;
13393}
13394
13395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013396if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013397 ac_cv_mixed_endian_double=yes
13398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13402 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013403fi
13404
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013405fi
13406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13408$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013409if test "$ac_cv_mixed_endian_double" = yes
13410then
13411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013413
13414fi
13415
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013416# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013417# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013418# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013419# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013420# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013421# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013422
13423# This inline assembler syntax may also work for suncc and icc,
13424# so we try it on all platforms.
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13427$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013429/* end confdefs.h. */
13430
13431int
13432main ()
13433{
13434
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013435 unsigned short cw;
13436 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13437 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013438
13439 ;
13440 return 0;
13441}
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013444 have_gcc_asm_for_x87=yes
13445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013447fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13450$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013451if test "$have_gcc_asm_for_x87" = yes
13452then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013455
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013456fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013457
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13459$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13461/* end confdefs.h. */
13462
13463int
13464main ()
13465{
13466
13467 unsigned int fpcr;
13468 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13469 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13470
13471 ;
13472 return 0;
13473}
13474_ACEOF
13475if ac_fn_c_try_compile "$LINENO"; then :
13476 have_gcc_asm_for_mc68881=yes
13477else
13478 have_gcc_asm_for_mc68881=no
13479fi
13480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13482$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13483if test "$have_gcc_asm_for_mc68881" = yes
13484then
13485
13486$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13487
13488fi
13489
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013490# Detect whether system arithmetic is subject to x87-style double
13491# rounding issues. The result of this test has little meaning on non
13492# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13493# mode is round-to-nearest and double rounding issues are present, and
13494# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13496$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013497# $BASECFLAGS may affect the result
13498ac_save_cc="$CC"
13499CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013500if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013501 ac_cv_x87_double_rounding=no
13502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013504/* end confdefs.h. */
13505
13506#include <stdlib.h>
13507#include <math.h>
13508int main() {
13509 volatile double x, y, z;
13510 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13511 x = 0.99999999999999989; /* 1-2**-53 */
13512 y = 1./x;
13513 if (y != 1.)
13514 exit(0);
13515 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13516 x = 1e16;
13517 y = 2.99999;
13518 z = x + y;
13519 if (z != 1e16+4.)
13520 exit(0);
13521 /* both tests show evidence of double rounding */
13522 exit(1);
13523}
13524
13525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013526if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013527 ac_cv_x87_double_rounding=no
13528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13532 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013533fi
13534
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013535CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13537$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013538if test "$ac_cv_x87_double_rounding" = yes
13539then
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013542
13543fi
13544
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013545# ************************************
13546# * Check for mathematical functions *
13547# ************************************
13548
13549LIBS_SAVE=$LIBS
13550LIBS="$LIBS $LIBM"
13551
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013552for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13553do :
13554 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13555ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013556if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013557 cat >>confdefs.h <<_ACEOF
13558#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13559_ACEOF
13560
13561fi
13562done
13563
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013564for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013565do :
13566 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13567ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013568if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013569 cat >>confdefs.h <<_ACEOF
13570#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13571_ACEOF
13572
13573fi
13574done
13575
13576ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13577"
Victor Stinnere0be4232011-10-25 13:06:09 +020013578if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013579 ac_have_decl=1
13580else
13581 ac_have_decl=0
13582fi
13583
13584cat >>confdefs.h <<_ACEOF
13585#define HAVE_DECL_ISINF $ac_have_decl
13586_ACEOF
13587ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13588"
Victor Stinnere0be4232011-10-25 13:06:09 +020013589if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013590 ac_have_decl=1
13591else
13592 ac_have_decl=0
13593fi
13594
13595cat >>confdefs.h <<_ACEOF
13596#define HAVE_DECL_ISNAN $ac_have_decl
13597_ACEOF
13598ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13599"
Victor Stinnere0be4232011-10-25 13:06:09 +020013600if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013601 ac_have_decl=1
13602else
13603 ac_have_decl=0
13604fi
13605
13606cat >>confdefs.h <<_ACEOF
13607#define HAVE_DECL_ISFINITE $ac_have_decl
13608_ACEOF
13609
13610
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013611# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13612# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13614$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013615if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013617else
13618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013620 ac_cv_tanh_preserves_zero_sign=no
13621else
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013623/* end confdefs.h. */
13624
13625#include <math.h>
13626#include <stdlib.h>
13627int main() {
13628 /* return 0 if either negative zeros don't exist
13629 on this platform or if negative zeros exist
13630 and tanh(-0.) == -0. */
13631 if (atan2(0., -1.) == atan2(-0., -1.) ||
13632 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13633 else exit(1);
13634}
13635
13636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013637if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013638 ac_cv_tanh_preserves_zero_sign=yes
13639else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013644fi
13645
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013646fi
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13649$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013650if test "$ac_cv_tanh_preserves_zero_sign" = yes
13651then
13652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013654
13655fi
13656
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013657if test "$ac_cv_func_log1p" = yes
13658then
13659 # On some versions of AIX, log1p(-0.) returns 0. instead of
13660 # -0. See issue #9920.
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13662$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013663 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013664 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013665else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013666
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013667 if test "$cross_compiling" = yes; then :
13668 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013669else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13671/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013672
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013673 #include <math.h>
13674 #include <stdlib.h>
13675 int main() {
13676 /* Fail if the signs of log1p(-0.) and -0. can be
13677 distinguished. */
13678 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13679 return 0;
13680 else
13681 return 1;
13682 }
13683
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013684_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013685if ac_fn_c_try_run "$LINENO"; then :
13686 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013687else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013688 ac_cv_log1p_drops_zero_sign=yes
13689fi
13690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13691 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013692fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013693
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013694fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013695
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13697$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13698fi
13699if test "$ac_cv_log1p_drops_zero_sign" = yes
13700then
13701
13702$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13703
13704fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013705
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013706LIBS=$LIBS_SAVE
13707
Mark Dickinsona614f042009-11-28 12:48:43 +000013708# For multiprocessing module, check that sem_open
13709# actually works. For FreeBSD versions <= 7.2,
13710# the kernel module that provides POSIX semaphores
13711# isn't loaded by default, so an attempt to call
13712# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13714$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013715if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013717else
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013719 ac_cv_posix_semaphores_enabled=yes
13720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013722/* end confdefs.h. */
13723
13724#include <unistd.h>
13725#include <fcntl.h>
13726#include <stdio.h>
13727#include <semaphore.h>
13728#include <sys/stat.h>
13729
13730int main(void) {
13731 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13732 if (a == SEM_FAILED) {
13733 perror("sem_open");
13734 return 1;
13735 }
13736 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013737 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013738 return 0;
13739}
13740
13741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013742if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013743 ac_cv_posix_semaphores_enabled=yes
13744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013749fi
13750
13751
Mark Dickinsona614f042009-11-28 12:48:43 +000013752fi
13753
Matthias Kloseb9621712010-04-24 17:59:49 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13755$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013756if test $ac_cv_posix_semaphores_enabled = no
13757then
13758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013760
13761fi
13762
Mark Dickinson10683072009-04-18 21:18:19 +000013763# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13765$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013766if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013768else
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013771else
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013773/* end confdefs.h. */
13774
13775#include <unistd.h>
13776#include <fcntl.h>
13777#include <stdio.h>
13778#include <semaphore.h>
13779#include <sys/stat.h>
13780
13781int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013782 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013783 int count;
13784 int res;
13785 if(a==SEM_FAILED){
13786 perror("sem_open");
13787 return 1;
13788
13789 }
13790 res = sem_getvalue(a, &count);
13791 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013792 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013793 return res==-1 ? 1 : 0;
13794}
13795
Mark Dickinson10683072009-04-18 21:18:19 +000013796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013797if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013798 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013799else
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013804fi
13805
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013806
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013807fi
13808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13810$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013811if test $ac_cv_broken_sem_getvalue = yes
13812then
13813
Matthias Kloseb9621712010-04-24 17:59:49 +000013814$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013815
13816fi
13817
Mark Dickinsonbd792642009-03-18 20:06:12 +000013818# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13820$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013821# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013823 enableval=$enable_big_digits; case $enable_big_digits in
13824yes)
13825 enable_big_digits=30 ;;
13826no)
13827 enable_big_digits=15 ;;
1382815|30)
13829 ;;
13830*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013831 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 +000013832esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13834$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013835
13836cat >>confdefs.h <<_ACEOF
13837#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13838_ACEOF
13839
13840
13841else
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13843$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013844fi
13845
13846
Guido van Rossumef2255b2000-03-10 22:30:29 +000013847# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013848ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013849if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013850
13851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013853
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013854 wchar_h="yes"
13855
Guido van Rossumef2255b2000-03-10 22:30:29 +000013856else
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013858
13859fi
13860
Michael W. Hudson54241132001-12-07 15:38:26 +000013861
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013863# determine wchar_t size
13864if test "$wchar_h" = yes
13865then
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13868# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13869# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13871$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013872if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013873 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013874else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13876"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013877
Martin v. Löwis11437992002-04-12 09:54:03 +000013878else
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 if test "$ac_cv_type_wchar_t" = yes; then
13880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013882as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013883See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884 else
13885 ac_cv_sizeof_wchar_t=0
13886 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13891$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892
13893
13894
Martin v. Löwis11437992002-04-12 09:54:03 +000013895cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013896#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013897_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013898
Michael W. Hudson54241132001-12-07 15:38:26 +000013899
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013900fi
13901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13903$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013904have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013906/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013907
13908#include <tcl.h>
13909#if TCL_UTF_MAX != 6
13910# error "NOT UCS4_TCL"
13911#endif
13912int
13913main ()
13914{
13915
13916 ;
13917 return 0;
13918}
13919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013921
13922
Matthias Kloseb9621712010-04-24 17:59:49 +000013923$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013924
13925 have_ucs4_tcl=yes
13926
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13930$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013931
Skip Montanaro6dead952003-09-25 14:50:04 +000013932# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013933if test "$wchar_h" = yes
13934then
13935 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13937$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013938 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013940else
13941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013943 ac_cv_wchar_t_signed=yes
13944else
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013946/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013947
13948 #include <wchar.h>
13949 int main()
13950 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013951 /* Success: exit code 0 */
13952 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013953 }
13954
13955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013956if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013957 ac_cv_wchar_t_signed=yes
13958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013963fi
13964
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013965fi
13966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13968$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013969fi
13970
Georg Brandl52d168a2008-01-07 18:10:24 +000013971# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013972if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013973 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013974then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013975 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013978
Georg Brandl52d168a2008-01-07 18:10:24 +000013979else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013980 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013981fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13983$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013984
13985# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13987$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013988if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013990else
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 ac_cv_c_bigendian=unknown
13992 # See if we're dealing with a universal compiler.
13993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994/* end confdefs.h. */
13995#ifndef __APPLE_CC__
13996 not a universal capable compiler
13997 #endif
13998 typedef int dummy;
13999
Skip Montanaro6dead952003-09-25 14:50:04 +000014000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014001if ac_fn_c_try_compile "$LINENO"; then :
14002
14003 # Check for potential -arch flags. It is not universal unless
14004 # there are at least two -arch flags with different values.
14005 ac_arch=
14006 ac_prev=
14007 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14008 if test -n "$ac_prev"; then
14009 case $ac_word in
14010 i?86 | x86_64 | ppc | ppc64)
14011 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14012 ac_arch=$ac_word
14013 else
14014 ac_cv_c_bigendian=universal
14015 break
14016 fi
14017 ;;
14018 esac
14019 ac_prev=
14020 elif test "x$ac_word" = "x-arch"; then
14021 ac_prev=arch
14022 fi
14023 done
14024fi
14025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14026 if test $ac_cv_c_bigendian = unknown; then
14027 # See if sys/param.h defines the BYTE_ORDER macro.
14028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014029/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014030#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014032
Martin v. Löwis11437992002-04-12 09:54:03 +000014033int
14034main ()
14035{
Matthias Kloseb9621712010-04-24 17:59:49 +000014036#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14037 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14038 && LITTLE_ENDIAN)
14039 bogus endian macros
14040 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
14042 ;
14043 return 0;
14044}
14045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014046if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014047 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014049/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014050#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014052
Martin v. Löwis11437992002-04-12 09:54:03 +000014053int
14054main ()
14055{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014056#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014057 not big endian
14058 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
14060 ;
14061 return 0;
14062}
14063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014064if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014065 ac_cv_c_bigendian=yes
14066else
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014070fi
14071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14072 fi
14073 if test $ac_cv_c_bigendian = unknown; then
14074 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014076/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014077#include <limits.h>
14078
Martin v. Löwis11437992002-04-12 09:54:03 +000014079int
14080main ()
14081{
Matthias Kloseb9621712010-04-24 17:59:49 +000014082#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14083 bogus endian macros
14084 #endif
14085
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 ;
14087 return 0;
14088}
14089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014090if ac_fn_c_try_compile "$LINENO"; then :
14091 # It does; now see whether it defined to _BIG_ENDIAN or not.
14092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14093/* end confdefs.h. */
14094#include <limits.h>
14095
14096int
14097main ()
14098{
14099#ifndef _BIG_ENDIAN
14100 not big endian
14101 #endif
14102
14103 ;
14104 return 0;
14105}
14106_ACEOF
14107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014109else
Matthias Kloseb9621712010-04-24 17:59:49 +000014110 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14113fi
14114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14115 fi
14116 if test $ac_cv_c_bigendian = unknown; then
14117 # Compile a test program.
14118 if test "$cross_compiling" = yes; then :
14119 # Try to guess by grepping values from an object file.
14120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121/* end confdefs.h. */
14122short int ascii_mm[] =
14123 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14124 short int ascii_ii[] =
14125 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14126 int use_ascii (int i) {
14127 return ascii_mm[i] + ascii_ii[i];
14128 }
14129 short int ebcdic_ii[] =
14130 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14131 short int ebcdic_mm[] =
14132 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14133 int use_ebcdic (int i) {
14134 return ebcdic_mm[i] + ebcdic_ii[i];
14135 }
14136 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137
Matthias Kloseb9621712010-04-24 17:59:49 +000014138int
14139main ()
14140{
14141return use_ascii (foo) == use_ebcdic (foo);
14142 ;
14143 return 0;
14144}
14145_ACEOF
14146if ac_fn_c_try_compile "$LINENO"; then :
14147 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14148 ac_cv_c_bigendian=yes
14149 fi
14150 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14151 if test "$ac_cv_c_bigendian" = unknown; then
14152 ac_cv_c_bigendian=no
14153 else
14154 # finding both strings is unlikely to happen, but who knows?
14155 ac_cv_c_bigendian=unknown
14156 fi
14157 fi
14158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014162/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014164int
14165main ()
14166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 /* Are we little or big endian? From Harbison&Steele. */
14169 union
14170 {
14171 long int l;
14172 char c[sizeof (long int)];
14173 } u;
14174 u.l = 1;
14175 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176
14177 ;
14178 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014179}
Martin v. Löwis11437992002-04-12 09:54:03 +000014180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014181if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014182 ac_cv_c_bigendian=no
14183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14193$as_echo "$ac_cv_c_bigendian" >&6; }
14194 case $ac_cv_c_bigendian in #(
14195 yes)
14196 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14197;; #(
14198 no)
14199 ;; #(
14200 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014201
Matthias Kloseb9621712010-04-24 17:59:49 +000014202$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014203
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 ;; #(
14205 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014206 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014207 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014209
Michael W. Hudson54241132001-12-07 15:38:26 +000014210
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014211# ABI version string for Python extension modules. This appears between the
14212# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14213# from the following attributes which affect the ABI of this Python build (in
14214# this order):
14215#
14216# * The Python implementation (always 'cpython-' for us)
14217# * The major and minor version numbers
14218# * --with-pydebug (adds a 'd')
14219# * --with-pymalloc (adds a 'm')
14220# * --with-wide-unicode (adds a 'u')
14221#
14222# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014223# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14224# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014225
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14227$as_echo_n "checking ABIFLAGS... " >&6; }
14228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14229$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14231$as_echo_n "checking SOABI... " >&6; }
Antoine Pitrou5bd7bf52015-03-08 20:43:10 +010014232
14233case $ac_sys_system in
14234 Linux*|GNU*)
14235 BITNESS_SUFFIX=-$(($ac_cv_sizeof_void_p * 8))b;;
14236 *)
14237 BITNESS_SUFFIX=;;
14238esac
14239SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${BITNESS_SUFFIX}
14240
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14242$as_echo "$SOABI" >&6; }
14243
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014244
14245case $ac_sys_system in
14246 Linux*|GNU*)
14247 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14248 *)
14249 EXT_SUFFIX=${SHLIB_SUFFIX};;
14250esac
14251
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14253$as_echo_n "checking LDVERSION... " >&6; }
14254LDVERSION='$(VERSION)$(ABIFLAGS)'
14255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14256$as_echo "$LDVERSION" >&6; }
14257
doko@python.org87421192013-01-26 11:39:31 +010014258
14259LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14260
14261
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014262# Check whether right shifting a negative integer extends the sign bit
14263# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14265$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014266if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014268else
Martin v. Löwis11437992002-04-12 09:54:03 +000014269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014271 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014272else
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014274/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014275
14276int main()
14277{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014278 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014279}
14280
Martin v. Löwis11437992002-04-12 09:54:03 +000014281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014282if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014283 ac_cv_rshift_extends_sign=yes
14284else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014289fi
14290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291fi
14292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14294$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014295if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014296then
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
Matthias Kloseb9621712010-04-24 17:59:49 +000014298$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014299
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014300fi
14301
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014302# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14304$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014305if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014307else
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014310/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014311#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014312int
14313main ()
14314{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014315
14316 FILE *f = fopen("/dev/null", "r");
14317 flockfile(f);
14318 getc_unlocked(f);
14319 funlockfile(f);
14320
Martin v. Löwis11437992002-04-12 09:54:03 +000014321 ;
14322 return 0;
14323}
14324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014325if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014326 ac_cv_have_getc_unlocked=yes
14327else
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 ac_cv_have_getc_unlocked=no
14329fi
14330rm -f core conftest.err conftest.$ac_objext \
14331 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333
Matthias Kloseb9621712010-04-24 17:59:49 +000014334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14335$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014336if test "$ac_cv_have_getc_unlocked" = yes
14337then
Martin v. Löwis11437992002-04-12 09:54:03 +000014338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014340
14341fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014342
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014343# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014344# save the value of LIBS so we don't actually link Python with readline
14345LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014346
Gregory P. Smith18820942008-09-07 06:24:49 +000014347# On some systems we need to link readline to a termcap compatible
14348# library. NOTE: Keep the precedence of listed libraries synchronised
14349# with setup.py.
14350py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14352$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014353for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014354 if test -z "$py_libtermcap"; then
14355 READLINE_LIBS="-lreadline"
14356 else
14357 READLINE_LIBS="-lreadline -l$py_libtermcap"
14358 fi
14359 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014361/* end confdefs.h. */
14362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363/* Override any GCC internal prototype to avoid an error.
14364 Use char because int might match the return type of a GCC
14365 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014366#ifdef __cplusplus
14367extern "C"
14368#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014369char readline ();
14370int
14371main ()
14372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014374 ;
14375 return 0;
14376}
14377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014378if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014379 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014381rm -f core conftest.err conftest.$ac_objext \
14382 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014383 if test $py_cv_lib_readline = yes; then
14384 break
14385 fi
14386done
14387# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14388#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014389if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14391$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014392else
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14394$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014397
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014398fi
14399
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014400# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14402$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014403if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014405else
14406 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014407LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014409/* end confdefs.h. */
14410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014411/* Override any GCC internal prototype to avoid an error.
14412 Use char because int might match the return type of a GCC
14413 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014414#ifdef __cplusplus
14415extern "C"
14416#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014417char rl_callback_handler_install ();
14418int
14419main ()
14420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014422 ;
14423 return 0;
14424}
14425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014426if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014427 ac_cv_lib_readline_rl_callback_handler_install=yes
14428else
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014431rm -f core conftest.err conftest.$ac_objext \
14432 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014433LIBS=$ac_check_lib_save_LIBS
14434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14436$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014437if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014440
14441fi
14442
14443
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014444# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014446/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014447#include <readline/readline.h>
14448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014449if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014450 have_readline=yes
14451else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014452 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014453
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014454fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014455rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014456if test $have_readline = yes
14457then
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014460#include <readline/readline.h>
14461
14462_ACEOF
14463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014467
14468fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014469rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014470
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014472/* end confdefs.h. */
14473#include <readline/readline.h>
14474
14475_ACEOF
14476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014478
Matthias Kloseb9621712010-04-24 17:59:49 +000014479$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014480
14481fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014482rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014483
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014484fi
14485
Martin v. Löwis0daad592001-09-30 21:09:59 +000014486# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14488$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014489if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014491else
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014493LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497/* Override any GCC internal prototype to avoid an error.
14498 Use char because int might match the return type of a GCC
14499 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014500#ifdef __cplusplus
14501extern "C"
14502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014503char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014504int
14505main ()
14506{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 ;
14509 return 0;
14510}
14511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014512if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014514else
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014517rm -f core conftest.err conftest.$ac_objext \
14518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014519LIBS=$ac_check_lib_save_LIBS
14520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14522$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014523if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014524
Matthias Kloseb9621712010-04-24 17:59:49 +000014525$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014526
Martin v. Löwis0daad592001-09-30 21:09:59 +000014527fi
14528
Michael W. Hudson54241132001-12-07 15:38:26 +000014529
Thomas Wouters89d996e2007-09-08 17:39:28 +000014530# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14532$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014533if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014535else
14536 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014537LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014539/* end confdefs.h. */
14540
14541/* Override any GCC internal prototype to avoid an error.
14542 Use char because int might match the return type of a GCC
14543 builtin and then its argument prototype would still apply. */
14544#ifdef __cplusplus
14545extern "C"
14546#endif
14547char rl_completion_display_matches_hook ();
14548int
14549main ()
14550{
14551return rl_completion_display_matches_hook ();
14552 ;
14553 return 0;
14554}
14555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014556if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014557 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14558else
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014561rm -f core conftest.err conftest.$ac_objext \
14562 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014563LIBS=$ac_check_lib_save_LIBS
14564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14566$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014567if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014570
14571fi
14572
14573
Martin v. Löwis0daad592001-09-30 21:09:59 +000014574# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14576$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014577if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014579else
Martin v. Löwis11437992002-04-12 09:54:03 +000014580 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014581LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585/* Override any GCC internal prototype to avoid an error.
14586 Use char because int might match the return type of a GCC
14587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014588#ifdef __cplusplus
14589extern "C"
14590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014591char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014592int
14593main ()
14594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 ;
14597 return 0;
14598}
14599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014600if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014601 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014602else
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014605rm -f core conftest.err conftest.$ac_objext \
14606 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014607LIBS=$ac_check_lib_save_LIBS
14608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14610$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014611if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014614
Guido van Rossum353ae582001-07-10 16:45:32 +000014615fi
14616
Jack Jansendd19cf82001-12-06 22:36:17 +000014617
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014618# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014620/* end confdefs.h. */
14621#include <readline/readline.h>
14622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014623if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014624 have_readline=yes
14625else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014626 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014627
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014628fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014629rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014630if test $have_readline = yes
14631then
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014633/* end confdefs.h. */
14634#include <readline/readline.h>
14635
14636_ACEOF
14637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014641
14642fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014643rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014644
14645fi
14646
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14648$as_echo_n "checking for append_history in -lreadline... " >&6; }
14649if ${ac_cv_lib_readline_append_history+:} false; then :
14650 $as_echo_n "(cached) " >&6
14651else
14652 ac_check_lib_save_LIBS=$LIBS
14653LIBS="-lreadline $READLINE_LIBS $LIBS"
14654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14655/* end confdefs.h. */
14656
14657/* Override any GCC internal prototype to avoid an error.
14658 Use char because int might match the return type of a GCC
14659 builtin and then its argument prototype would still apply. */
14660#ifdef __cplusplus
14661extern "C"
14662#endif
14663char append_history ();
14664int
14665main ()
14666{
14667return append_history ();
14668 ;
14669 return 0;
14670}
14671_ACEOF
14672if ac_fn_c_try_link "$LINENO"; then :
14673 ac_cv_lib_readline_append_history=yes
14674else
14675 ac_cv_lib_readline_append_history=no
14676fi
14677rm -f core conftest.err conftest.$ac_objext \
14678 conftest$ac_exeext conftest.$ac_ext
14679LIBS=$ac_check_lib_save_LIBS
14680fi
14681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14682$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14683if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14684
14685$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14686
14687fi
14688
14689
Martin v. Löwis82bca632006-02-10 20:49:30 +000014690# End of readline checks: restore LIBS
14691LIBS=$LIBS_no_readline
14692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14694$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014695if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014697else
Martin v. Löwis11437992002-04-12 09:54:03 +000014698
Matthias Kloseb9621712010-04-24 17:59:49 +000014699if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014700 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014701else
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014703/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014704
14705int main()
14706{
14707 int val1 = nice(1);
14708 if (val1 != -1 && val1 == nice(2))
14709 exit(0);
14710 exit(1);
14711}
14712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014714if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014715 ac_cv_broken_nice=yes
14716else
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014721fi
14722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723fi
14724
Matthias Kloseb9621712010-04-24 17:59:49 +000014725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14726$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014727if test "$ac_cv_broken_nice" = yes
14728then
Martin v. Löwis11437992002-04-12 09:54:03 +000014729
Matthias Kloseb9621712010-04-24 17:59:49 +000014730$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014731
14732fi
14733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14735$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014736if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014738else
Matthias Kloseb9621712010-04-24 17:59:49 +000014739 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014740 ac_cv_broken_poll=no
14741else
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014743/* end confdefs.h. */
14744
14745#include <poll.h>
14746
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014747int main()
14748{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014749 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014750 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014751
14752 close (42);
14753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014754 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014755 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014756 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014757 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014758 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014759 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014760 return 1;
14761}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014762
14763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014765 ac_cv_broken_poll=yes
14766else
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014773fi
14774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14776$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014777if test "$ac_cv_broken_poll" = yes
14778then
14779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014781
14782fi
14783
Brett Cannon43802422005-02-10 20:48:03 +000014784# 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 +000014785# (which is not required by ISO C or UNIX spec) and/or if we support
14786# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014787ac_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 +000014788#include <$ac_cv_struct_tm>
14789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790"
Victor Stinnere0be4232011-10-25 13:06:09 +020014791if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014792
14793cat >>confdefs.h <<_ACEOF
14794#define HAVE_STRUCT_TM_TM_ZONE 1
14795_ACEOF
14796
14797
14798fi
14799
14800if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14801
Matthias Kloseb9621712010-04-24 17:59:49 +000014802$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014803
14804else
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14806"
Victor Stinnere0be4232011-10-25 13:06:09 +020014807if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809else
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811fi
14812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014814#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815_ACEOF
14816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14818$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014819if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821else
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014823/* end confdefs.h. */
14824#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825#if !HAVE_DECL_TZNAME
14826extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014827#endif
14828
14829int
14830main ()
14831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014833 ;
14834 return 0;
14835}
14836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014837if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014838 ac_cv_var_tzname=yes
14839else
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014842rm -f core conftest.err conftest.$ac_objext \
14843 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14846$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014847 if test $ac_cv_var_tzname = yes; then
14848
Matthias Kloseb9621712010-04-24 17:59:49 +000014849$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014850
14851 fi
14852fi
14853
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014854
Martin v. Löwis1d459062005-03-14 21:23:33 +000014855# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14857$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014858if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014860else
14861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014863 ac_cv_working_tzset=no
14864else
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014866/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014867
14868#include <stdlib.h>
14869#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014870#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014871
14872#if HAVE_TZNAME
14873extern char *tzname[];
14874#endif
14875
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014876int main()
14877{
Brett Cannon18367812003-09-19 00:59:16 +000014878 /* Note that we need to ensure that not only does tzset(3)
14879 do 'something' with localtime, but it works as documented
14880 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014881 This includes making sure that tzname is set properly if
14882 tm->tm_zone does not exist since it is the alternative way
14883 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014884
14885 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014886 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014887 */
14888
Martin v. Löwis1d459062005-03-14 21:23:33 +000014889 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014890 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14891
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014892 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014893 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014894 if (localtime(&groundhogday)->tm_hour != 0)
14895 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014896#if HAVE_TZNAME
14897 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14898 if (strcmp(tzname[0], "UTC") ||
14899 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14900 exit(1);
14901#endif
Brett Cannon18367812003-09-19 00:59:16 +000014902
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014903 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014904 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014905 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014906 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014907#if HAVE_TZNAME
14908 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14909 exit(1);
14910#endif
Brett Cannon18367812003-09-19 00:59:16 +000014911
14912 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14913 tzset();
14914 if (localtime(&groundhogday)->tm_hour != 11)
14915 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014916#if HAVE_TZNAME
14917 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14918 exit(1);
14919#endif
14920
14921#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014922 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14923 exit(1);
14924 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14925 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014926#endif
Brett Cannon18367812003-09-19 00:59:16 +000014927
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014928 exit(0);
14929}
14930
14931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014932if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014933 ac_cv_working_tzset=yes
14934else
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014939fi
14940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941fi
14942
Matthias Kloseb9621712010-04-24 17:59:49 +000014943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14944$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014945if test "$ac_cv_working_tzset" = yes
14946then
14947
Matthias Kloseb9621712010-04-24 17:59:49 +000014948$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014949
14950fi
14951
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014952# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14954$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014955if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014957else
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014959/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014960#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014961int
14962main ()
14963{
14964
14965struct stat st;
14966st.st_mtim.tv_nsec = 1;
14967
14968 ;
14969 return 0;
14970}
14971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014972if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014973 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014974else
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14978fi
14979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14981$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014982if test "$ac_cv_stat_tv_nsec" = yes
14983then
14984
Matthias Kloseb9621712010-04-24 17:59:49 +000014985$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014986
14987fi
14988
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014989# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14991$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014992if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014994else
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014996/* end confdefs.h. */
14997#include <sys/stat.h>
14998int
14999main ()
15000{
15001
15002struct stat st;
15003st.st_mtimespec.tv_nsec = 1;
15004
15005 ;
15006 return 0;
15007}
15008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015009if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015010 ac_cv_stat_tv_nsec2=yes
15011else
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15015fi
15016
Matthias Kloseb9621712010-04-24 17:59:49 +000015017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15018$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015019if test "$ac_cv_stat_tv_nsec2" = yes
15020then
15021
Matthias Kloseb9621712010-04-24 17:59:49 +000015022$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015023
15024fi
15025
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015026# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015027ac_save_cppflags="$CPPFLAGS"
15028CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015029
15030for ac_header in curses.h ncurses.h
15031do :
15032 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15033ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15034if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15035 cat >>confdefs.h <<_ACEOF
15036#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15037_ACEOF
15038
15039fi
15040
15041done
15042
15043
15044# On Solaris, term.h requires curses.h
15045for ac_header in term.h
15046do :
15047 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15048#ifdef HAVE_CURSES_H
15049#include <curses.h>
15050#endif
15051
15052"
15053if test "x$ac_cv_header_term_h" = xyes; then :
15054 cat >>confdefs.h <<_ACEOF
15055#define HAVE_TERM_H 1
15056_ACEOF
15057
15058fi
15059
15060done
15061
15062
Jack Jansen666b1e72001-10-31 12:11:48 +000015063# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15065$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015066if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015068else
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015070/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015071#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015072int
15073main ()
15074{
Jack Jansen666b1e72001-10-31 12:11:48 +000015075
15076 int rtn;
15077 rtn = mvwdelch(0,0,0);
15078
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 ;
15080 return 0;
15081}
15082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015083if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015084 ac_cv_mvwdelch_is_expression=yes
15085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15089fi
15090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15092$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015093
15094if test "$ac_cv_mvwdelch_is_expression" = yes
15095then
Martin v. Löwis11437992002-04-12 09:54:03 +000015096
Matthias Kloseb9621712010-04-24 17:59:49 +000015097$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015098
15099fi
15100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15102$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015103if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015105else
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015107/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015108#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015109int
15110main ()
15111{
Jack Jansen666b1e72001-10-31 12:11:48 +000015112
15113 WINDOW *w;
15114 w->_flags = 0;
15115
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ;
15117 return 0;
15118}
15119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015120if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015121 ac_cv_window_has_flags=yes
15122else
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15126fi
15127
Matthias Kloseb9621712010-04-24 17:59:49 +000015128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15129$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015130
Jack Jansen666b1e72001-10-31 12:11:48 +000015131
15132if test "$ac_cv_window_has_flags" = yes
15133then
Martin v. Löwis11437992002-04-12 09:54:03 +000015134
Matthias Kloseb9621712010-04-24 17:59:49 +000015135$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015136
15137fi
15138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15140$as_echo_n "checking for is_term_resized... " >&6; }
15141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015142/* end confdefs.h. */
15143#include <curses.h>
15144int
15145main ()
15146{
15147void *x=is_term_resized
15148 ;
15149 return 0;
15150}
15151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015155
Matthias Kloseb159a552010-04-25 21:00:44 +000015156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015157$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15160$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015161
15162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15166$as_echo_n "checking for resize_term... " >&6; }
15167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015168/* end confdefs.h. */
15169#include <curses.h>
15170int
15171main ()
15172{
15173void *x=resize_term
15174 ;
15175 return 0;
15176}
15177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015178if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015179
Matthias Kloseb9621712010-04-24 17:59:49 +000015180$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015181
Matthias Kloseb159a552010-04-25 21:00:44 +000015182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015183$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015184else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15186$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015187
15188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15190
Matthias Kloseb9621712010-04-24 17:59:49 +000015191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15192$as_echo_n "checking for resizeterm... " >&6; }
15193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015194/* end confdefs.h. */
15195#include <curses.h>
15196int
15197main ()
15198{
15199void *x=resizeterm
15200 ;
15201 return 0;
15202}
15203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015204if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015205
Matthias Kloseb9621712010-04-24 17:59:49 +000015206$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015207
Matthias Kloseb159a552010-04-25 21:00:44 +000015208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015209$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015210else
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15212$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015213
15214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015216# last curses configure check
15217CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15220$as_echo "$as_me: checking for device files" >&6;}
15221
15222if test "x$cross_compiling" = xyes; then
15223 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15225$as_echo_n "checking for /dev/ptmx... " >&6; }
15226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15227$as_echo "not set" >&6; }
15228 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15229 fi
15230 if test "${ac_cv_file__dev_ptc+set}" != set; then
15231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15232$as_echo_n "checking for /dev/ptc... " >&6; }
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15234$as_echo "not set" >&6; }
15235 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15236 fi
15237fi
15238
Matthias Kloseb9621712010-04-24 17:59:49 +000015239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15240$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015241if ${ac_cv_file__dev_ptmx+:} false; then :
15242 $as_echo_n "(cached) " >&6
15243else
15244 test "$cross_compiling" = yes &&
15245 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15246if test -r "/dev/ptmx"; then
15247 ac_cv_file__dev_ptmx=yes
15248else
15249 ac_cv_file__dev_ptmx=no
15250fi
15251fi
15252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15253$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15254if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015255
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015256fi
15257
15258if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015259
Matthias Kloseb9621712010-04-24 17:59:49 +000015260$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015261
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15264$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015265if ${ac_cv_file__dev_ptc+:} false; then :
15266 $as_echo_n "(cached) " >&6
15267else
15268 test "$cross_compiling" = yes &&
15269 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15270if test -r "/dev/ptc"; then
15271 ac_cv_file__dev_ptc=yes
15272else
15273 ac_cv_file__dev_ptc=no
15274fi
15275fi
15276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15277$as_echo "$ac_cv_file__dev_ptc" >&6; }
15278if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015279
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015280fi
15281
15282if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015283
Matthias Kloseb9621712010-04-24 17:59:49 +000015284$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015285
Neal Norwitz865400f2003-03-21 01:42:58 +000015286fi
15287
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015288if test "$have_long_long" = yes
15289then
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15291$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015292 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015294else
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015296 ac_cv_have_long_long_format="cross -- assuming no"
15297 if test x$GCC = xyes; then
15298 save_CFLAGS=$CFLAGS
15299 CFLAGS="$CFLAGS -Werror -Wformat"
15300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15301/* end confdefs.h. */
15302
15303 #include <stdio.h>
15304 #include <stddef.h>
15305
15306int
15307main ()
15308{
15309
15310 char *buffer;
15311 sprintf(buffer, "%lld", (long long)123);
15312 sprintf(buffer, "%lld", (long long)-123);
15313 sprintf(buffer, "%llu", (unsigned long long)123);
15314
15315 ;
15316 return 0;
15317}
15318_ACEOF
15319if ac_fn_c_try_compile "$LINENO"; then :
15320 ac_cv_have_long_long_format=yes
15321
15322fi
15323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15324 CFLAGS=$save_CFLAGS
15325 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015326else
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015328/* end confdefs.h. */
15329
15330 #include <stdio.h>
15331 #include <stddef.h>
15332 #include <string.h>
15333
15334 #ifdef HAVE_SYS_TYPES_H
15335 #include <sys/types.h>
15336 #endif
15337
15338 int main()
15339 {
15340 char buffer[256];
15341
15342 if (sprintf(buffer, "%lld", (long long)123) < 0)
15343 return 1;
15344 if (strcmp(buffer, "123"))
15345 return 1;
15346
15347 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15348 return 1;
15349 if (strcmp(buffer, "-123"))
15350 return 1;
15351
15352 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15353 return 1;
15354 if (strcmp(buffer, "123"))
15355 return 1;
15356
15357 return 0;
15358 }
15359
15360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015361if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015362 ac_cv_have_long_long_format=yes
15363else
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15367 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015368fi
15369
15370
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015371fi
15372
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15374$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015375fi
15376
Mark Dickinson89d7d412009-12-31 20:50:59 +000015377if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015378then
15379
Matthias Kloseb9621712010-04-24 17:59:49 +000015380$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015381
15382fi
15383
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015384if test $ac_sys_system = Darwin
15385then
15386 LIBS="$LIBS -framework CoreFoundation"
15387fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15390$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015391if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015393else
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015395 ac_cv_have_size_t_format="cross -- assuming yes"
15396
Thomas Wouters477c8d52006-05-27 19:21:47 +000015397else
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015399/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015400
Thomas Wouters477c8d52006-05-27 19:21:47 +000015401#include <stdio.h>
15402#include <stddef.h>
15403#include <string.h>
15404
Christian Heimes2c181612007-12-17 20:04:13 +000015405#ifdef HAVE_SYS_TYPES_H
15406#include <sys/types.h>
15407#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015408
15409#ifdef HAVE_SSIZE_T
15410typedef ssize_t Py_ssize_t;
15411#elif SIZEOF_VOID_P == SIZEOF_LONG
15412typedef long Py_ssize_t;
15413#else
15414typedef int Py_ssize_t;
15415#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015416
Christian Heimes2c181612007-12-17 20:04:13 +000015417int main()
15418{
15419 char buffer[256];
15420
Thomas Wouters477c8d52006-05-27 19:21:47 +000015421 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15422 return 1;
15423
Thomas Wouters89f507f2006-12-13 04:49:30 +000015424 if (strcmp(buffer, "123"))
15425 return 1;
15426
15427 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15428 return 1;
15429
15430 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015431 return 1;
15432
15433 return 0;
15434}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015435
Thomas Wouters477c8d52006-05-27 19:21:47 +000015436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015437if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015438 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015439else
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15443 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015444fi
15445
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15448$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015449if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015450
Matthias Kloseb9621712010-04-24 17:59:49 +000015451$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015452
15453fi
15454
Matthias Kloseb9621712010-04-24 17:59:49 +000015455ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015456#ifdef HAVE_SYS_TYPES_H
15457#include <sys/types.h>
15458#endif
15459#ifdef HAVE_SYS_SOCKET_H
15460#include <sys/socket.h>
15461#endif
15462
Matthias Kloseb9621712010-04-24 17:59:49 +000015463"
Victor Stinnere0be4232011-10-25 13:06:09 +020015464if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015465
Martin v. Löwis11437992002-04-12 09:54:03 +000015466else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015469
15470fi
15471
Michael W. Hudson54241132001-12-07 15:38:26 +000015472
Matthias Kloseb9621712010-04-24 17:59:49 +000015473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15474$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015475if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015476 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015477else
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015479 ac_cv_broken_mbstowcs=no
15480else
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015482/* end confdefs.h. */
15483
Stefan Krah19c21392012-11-22 23:47:32 +010015484#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015485#include<stdlib.h>
15486int main() {
15487 size_t len = -1;
15488 const char *str = "text";
15489 len = mbstowcs(NULL, str, 0);
15490 return (len != 4);
15491}
15492
15493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015494if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015495 ac_cv_broken_mbstowcs=no
15496else
Matthias Kloseb9621712010-04-24 17:59:49 +000015497 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015501fi
15502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015503fi
15504
Matthias Kloseb9621712010-04-24 17:59:49 +000015505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15506$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015507if test "$ac_cv_broken_mbstowcs" = yes
15508then
15509
Matthias Kloseb9621712010-04-24 17:59:49 +000015510$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015511
15512fi
15513
Antoine Pitroub52ec782009-01-25 16:34:23 +000015514# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15516$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015517
15518# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015519if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015520 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015521if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015522then
15523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15527$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015528fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015529if test "$withval" = no
15530then
15531
15532$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15533
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15535$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015536fi
15537
Antoine Pitrou042b1282010-08-13 21:15:58 +000015538else
15539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15540$as_echo "no value specified" >&6; }
15541fi
15542
Antoine Pitroub52ec782009-01-25 16:34:23 +000015543
Matthias Kloseb17289e2012-03-15 19:51:34 +010015544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15545$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15546if ${ac_cv_computed_gotos+:} false; then :
15547 $as_echo_n "(cached) " >&6
15548else
15549 if test "$cross_compiling" = yes; then :
15550 if test "${with_computed_gotos+set}" = set; then
15551 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15552 else
15553 ac_cv_computed_gotos=no
15554 fi
15555else
15556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15557/* end confdefs.h. */
15558
15559int main(int argc, char **argv)
15560{
15561 static void *targets[1] = { &&LABEL1 };
15562 goto LABEL2;
15563LABEL1:
15564 return 0;
15565LABEL2:
15566 goto *targets[0];
15567 return 1;
15568}
15569
15570_ACEOF
15571if ac_fn_c_try_run "$LINENO"; then :
15572 ac_cv_computed_gotos=yes
15573else
15574 ac_cv_computed_gotos=no
15575fi
15576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15577 conftest.$ac_objext conftest.beam conftest.$ac_ext
15578fi
15579
15580fi
15581
15582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15583$as_echo "$ac_cv_computed_gotos" >&6; }
15584case "$ac_cv_computed_gotos" in yes*)
15585
15586$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15587
15588esac
15589
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015590case $ac_sys_system in
15591AIX*)
15592
15593$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15594 ;;
15595esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015596
Michael W. Hudson54241132001-12-07 15:38:26 +000015597
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015598
15599
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015600for h in `(cd $srcdir;echo Python/thread_*.h)`
15601do
15602 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15603done
15604
Michael W. Hudson54241132001-12-07 15:38:26 +000015605
Ned Deily0db50cf2014-07-25 12:41:31 -070015606SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15608$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015609for dir in $SRCDIRS; do
15610 if test ! -d $dir; then
15611 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015612 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015613done
Matthias Kloseb9621712010-04-24 17:59:49 +000015614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15615$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015616
Stefan Krah1919b7e2012-03-21 18:25:23 +010015617# Availability of -O2:
15618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15619$as_echo_n "checking for -O2... " >&6; }
15620saved_cflags="$CFLAGS"
15621CFLAGS="-O2"
15622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15623/* end confdefs.h. */
15624
15625int
15626main ()
15627{
15628
15629
15630 ;
15631 return 0;
15632}
15633_ACEOF
15634if ac_fn_c_try_compile "$LINENO"; then :
15635 have_O2=yes
15636else
15637 have_O2=no
15638fi
15639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15641$as_echo "$have_O2" >&6; }
15642CFLAGS="$saved_cflags"
15643
15644# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15645# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15647$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15648saved_cflags="$CFLAGS"
15649CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15650if test "$have_O2" = no; then
15651 CFLAGS=""
15652fi
15653if test "$cross_compiling" = yes; then :
15654 have_glibc_memmove_bug=undefined
15655else
15656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15657/* end confdefs.h. */
15658
15659#include <stdio.h>
15660#include <stdlib.h>
15661#include <string.h>
15662void foo(void *p, void *q) { memmove(p, q, 19); }
15663int main() {
15664 char a[32] = "123456789000000000";
15665 foo(&a[9], a);
15666 if (strcmp(a, "123456789123456789000000000") != 0)
15667 return 1;
15668 foo(a, &a[9]);
15669 if (strcmp(a, "123456789000000000") != 0)
15670 return 1;
15671 return 0;
15672}
15673
15674_ACEOF
15675if ac_fn_c_try_run "$LINENO"; then :
15676 have_glibc_memmove_bug=no
15677else
15678 have_glibc_memmove_bug=yes
15679fi
15680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15681 conftest.$ac_objext conftest.beam conftest.$ac_ext
15682fi
15683
15684CFLAGS="$saved_cflags"
15685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15686$as_echo "$have_glibc_memmove_bug" >&6; }
15687if test "$have_glibc_memmove_bug" = yes; then
15688
15689$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15690
15691fi
15692
15693if test "$have_gcc_asm_for_x87" = yes; then
15694 # Some versions of gcc miscompile inline asm:
15695 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15696 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15697 case $CC in
15698 *gcc*)
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15700$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15701 saved_cflags="$CFLAGS"
15702 CFLAGS="-O2"
15703 if test "$cross_compiling" = yes; then :
15704 have_ipa_pure_const_bug=undefined
15705else
15706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15707/* end confdefs.h. */
15708
15709 __attribute__((noinline)) int
15710 foo(int *p) {
15711 int r;
15712 asm ( "movl \$6, (%1)\n\t"
15713 "xorl %0, %0\n\t"
15714 : "=r" (r) : "r" (p) : "memory"
15715 );
15716 return r;
15717 }
15718 int main() {
15719 int p = 8;
15720 if ((foo(&p) ? : p) != 6)
15721 return 1;
15722 return 0;
15723 }
15724
15725_ACEOF
15726if ac_fn_c_try_run "$LINENO"; then :
15727 have_ipa_pure_const_bug=no
15728else
15729 have_ipa_pure_const_bug=yes
15730fi
15731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15732 conftest.$ac_objext conftest.beam conftest.$ac_ext
15733fi
15734
15735 CFLAGS="$saved_cflags"
15736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15737$as_echo "$have_ipa_pure_const_bug" >&6; }
15738 if test "$have_ipa_pure_const_bug" = yes; then
15739
15740$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15741
15742 fi
15743 ;;
15744 esac
15745fi
15746
Victor Stinner4f5366e2015-01-09 02:13:19 +010015747# Check for stdatomic.h
15748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15749$as_echo_n "checking for stdatomic.h... " >&6; }
15750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15751/* end confdefs.h. */
15752
15753
15754 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015755 atomic_int value = ATOMIC_VAR_INIT(1);
15756 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015757 int main() {
15758 int loaded_value = atomic_load(&value);
15759 return 0;
15760 }
15761
15762
15763_ACEOF
15764if ac_fn_c_try_link "$LINENO"; then :
15765 have_stdatomic_h=yes
15766else
15767 have_stdatomic_h=no
15768fi
15769rm -f core conftest.err conftest.$ac_objext \
15770 conftest$ac_exeext conftest.$ac_ext
15771
15772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15773$as_echo "$have_stdatomic_h" >&6; }
15774
15775if test "$have_stdatomic_h" = yes; then
15776
15777$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15778
15779fi
15780
15781# Check for GCC >= 4.7 __atomic builtins
15782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15783$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15785/* end confdefs.h. */
15786
15787
15788 volatile int val = 1;
15789 int main() {
15790 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15791 return 0;
15792 }
15793
15794
15795_ACEOF
15796if ac_fn_c_try_link "$LINENO"; then :
15797 have_builtin_atomic=yes
15798else
15799 have_builtin_atomic=no
15800fi
15801rm -f core conftest.err conftest.$ac_objext \
15802 conftest$ac_exeext conftest.$ac_ext
15803
15804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15805$as_echo "$have_builtin_atomic" >&6; }
15806
15807if test "$have_builtin_atomic" = yes; then
15808
15809$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15810
15811fi
15812
Ned Deily322f5ba2013-11-21 23:01:59 -080015813# ensurepip option
15814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15815$as_echo_n "checking for ensurepip... " >&6; }
15816
15817# Check whether --with-ensurepip was given.
15818if test "${with_ensurepip+set}" = set; then :
15819 withval=$with_ensurepip;
15820else
15821 with_ensurepip=upgrade
15822fi
15823
15824case $with_ensurepip in #(
15825 yes|upgrade) :
15826 ENSUREPIP=upgrade ;; #(
15827 install) :
15828 ENSUREPIP=install ;; #(
15829 no) :
15830 ENSUREPIP=no ;; #(
15831 *) :
15832 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15833esac
15834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15835$as_echo "$ENSUREPIP" >&6; }
15836
15837
Victor Stinner35a97c02015-03-08 02:59:09 +010015838# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
15839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
15840$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
15841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15842/* end confdefs.h. */
15843
15844
15845 #include <dirent.h>
15846
15847 int main() {
15848 struct dirent entry;
15849 return entry.d_type == DT_UNKNOWN;
15850 }
15851
15852
15853_ACEOF
15854if ac_fn_c_try_link "$LINENO"; then :
15855 have_dirent_d_type=yes
15856else
15857 have_dirent_d_type=no
15858fi
15859rm -f core conftest.err conftest.$ac_objext \
15860 conftest$ac_exeext conftest.$ac_ext
15861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
15862$as_echo "$have_dirent_d_type" >&6; }
15863
15864if test "$have_dirent_d_type" = yes; then
15865
15866$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
15867
15868fi
15869
Victor Stinner9eb57c52015-03-19 22:21:49 +010015870# check if the Linux getrandom() syscall is available
15871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
15872$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
15873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15874/* end confdefs.h. */
15875
15876
15877 #include <sys/syscall.h>
15878
15879 int main() {
15880 const int flags = 0;
15881 char buffer[1];
15882 int n;
15883 /* ignore the result, Python checks for ENOSYS at runtime */
15884 (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
15885 return 0;
15886 }
15887
15888
15889_ACEOF
15890if ac_fn_c_try_link "$LINENO"; then :
15891 have_getrandom_syscall=yes
15892else
15893 have_getrandom_syscall=no
15894fi
15895rm -f core conftest.err conftest.$ac_objext \
15896 conftest$ac_exeext conftest.$ac_ext
15897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
15898$as_echo "$have_getrandom_syscall" >&6; }
15899
15900if test "$have_getrandom_syscall" = yes; then
15901
15902$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
15903
15904fi
15905
Guido van Rossum627b2d71993-12-24 10:39:16 +000015906# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015907ac_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 +000015908
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015909ac_config_files="$ac_config_files Modules/ld_so_aix"
15910
Martin v. Löwis11437992002-04-12 09:54:03 +000015911cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015912# This file is a shell script that caches the results of configure
15913# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015914# scripts and configure runs, see configure's option --config-cache.
15915# It is not useful on other systems. If it contains results you don't
15916# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015917#
Martin v. Löwis11437992002-04-12 09:54:03 +000015918# config.status only pays attention to the cache file if you give it
15919# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015920#
Skip Montanaro6dead952003-09-25 14:50:04 +000015921# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015922# loading this file, other *unset* `ac_cv_foo' will be assigned the
15923# following values.
15924
15925_ACEOF
15926
Guido van Rossumf78abae1997-01-21 22:02:36 +000015927# The following way of writing the cache mishandles newlines in values,
15928# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015930# Ultrix sh set writes to stderr and can't be redirected directly,
15931# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932(
15933 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15934 eval ac_val=\$$ac_var
15935 case $ac_val in #(
15936 *${as_nl}*)
15937 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015938 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15939$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015940 esac
15941 case $ac_var in #(
15942 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015943 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15944 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945 esac ;;
15946 esac
15947 done
15948
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015950 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15951 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015952 # `set' does not quote correctly, so add quotes: double-quote
15953 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015954 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015955 "s/'/'\\\\''/g;
15956 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015958 *)
15959 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015962 esac |
15963 sort
15964) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15970 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15972 :end' >>confcache
15973if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15974 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015975 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015976 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15977$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015978 if test ! -f "$cache_file" || test -h "$cache_file"; then
15979 cat confcache >"$cache_file"
15980 else
15981 case $cache_file in #(
15982 */* | ?:*)
15983 mv -f confcache "$cache_file"$$ &&
15984 mv -f "$cache_file"$$ "$cache_file" ;; #(
15985 *)
15986 mv -f confcache "$cache_file" ;;
15987 esac
15988 fi
15989 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015990 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015991 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15992$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015993 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015994fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015995rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015996
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015997test "x$prefix" = xNONE && prefix=$ac_default_prefix
15998# Let make expand exec_prefix.
15999test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016000
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016001DEFS=-DHAVE_CONFIG_H
16002
Skip Montanaro6dead952003-09-25 14:50:04 +000016003ac_libobjs=
16004ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016005U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016006for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16007 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016009 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16011 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016012 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16013 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016014done
16015LIBOBJS=$ac_libobjs
16016
16017LTLIBOBJS=$ac_ltlibobjs
16018
16019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020
Matthias Kloseb9621712010-04-24 17:59:49 +000016021
Victor Stinnere0be4232011-10-25 13:06:09 +020016022: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016023ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016024ac_clean_files_save=$ac_clean_files
16025ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016026{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16027$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16028as_write_fail=0
16029cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016030#! $SHELL
16031# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016032# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016033# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016034# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016035
Martin v. Löwis11437992002-04-12 09:54:03 +000016036debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016037ac_cs_recheck=false
16038ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016039
Matthias Kloseb9621712010-04-24 17:59:49 +000016040SHELL=\${CONFIG_SHELL-$SHELL}
16041export SHELL
16042_ASEOF
16043cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16044## -------------------- ##
16045## M4sh Initialization. ##
16046## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048# Be more Bourne compatible
16049DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016050if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 emulate sh
16052 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016054 # is contrary to our usage. Disable this feature.
16055 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016056 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016057else
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 case `(set -o) 2>/dev/null` in #(
16059 *posix*) :
16060 set -o posix ;; #(
16061 *) :
16062 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016063esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016064fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016065
16066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067as_nl='
16068'
16069export as_nl
16070# Printing a long string crashes Solaris 7 /usr/bin/printf.
16071as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16072as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16073as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16074# Prefer a ksh shell builtin over an external printf program on Solaris,
16075# but without wasting forks for bash or zsh.
16076if test -z "$BASH_VERSION$ZSH_VERSION" \
16077 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16078 as_echo='print -r --'
16079 as_echo_n='print -rn --'
16080elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16081 as_echo='printf %s\n'
16082 as_echo_n='printf %s'
16083else
16084 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16085 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16086 as_echo_n='/usr/ucb/echo -n'
16087 else
16088 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16089 as_echo_n_body='eval
16090 arg=$1;
16091 case $arg in #(
16092 *"$as_nl"*)
16093 expr "X$arg" : "X\\(.*\\)$as_nl";
16094 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16095 esac;
16096 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16097 '
16098 export as_echo_n_body
16099 as_echo_n='sh -c $as_echo_n_body as_echo'
16100 fi
16101 export as_echo_body
16102 as_echo='sh -c $as_echo_body as_echo'
16103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016104
16105# The user is always right.
16106if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 PATH_SEPARATOR=:
16108 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16109 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16110 PATH_SEPARATOR=';'
16111 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016112fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114
16115# IFS
16116# We need space, tab and new line, in precisely that order. Quoting is
16117# there to prevent editors from complaining about space-tab.
16118# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16119# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016120IFS=" "" $as_nl"
16121
16122# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016123as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016124case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125 *[\\/]* ) as_myself=$0 ;;
16126 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016127for as_dir in $PATH
16128do
16129 IFS=$as_save_IFS
16130 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016131 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016133IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016135 ;;
16136esac
16137# We did not find ourselves, most probably we were run as `sh COMMAND'
16138# in which case we are not to be found in the path.
16139if test "x$as_myself" = x; then
16140 as_myself=$0
16141fi
16142if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016143 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16144 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145fi
16146
Matthias Kloseb9621712010-04-24 17:59:49 +000016147# Unset variables that we do not need and which cause bugs (e.g. in
16148# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16149# suppresses any "Segmentation fault" message there. '((' could
16150# trigger a bug in pdksh 5.2.14.
16151for as_var in BASH_ENV ENV MAIL MAILPATH
16152do eval test x\${$as_var+set} = xset \
16153 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154done
16155PS1='$ '
16156PS2='> '
16157PS4='+ '
16158
16159# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016160LC_ALL=C
16161export LC_ALL
16162LANGUAGE=C
16163export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164
Matthias Kloseb9621712010-04-24 17:59:49 +000016165# CDPATH.
16166(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16167
16168
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016169# as_fn_error STATUS ERROR [LINENO LOG_FD]
16170# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016171# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16172# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016173# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016174as_fn_error ()
16175{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016176 as_status=$1; test $as_status -eq 0 && as_status=1
16177 if test "$4"; then
16178 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16179 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016180 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016181 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016182 as_fn_exit $as_status
16183} # as_fn_error
16184
16185
16186# as_fn_set_status STATUS
16187# -----------------------
16188# Set $? to STATUS, without forking.
16189as_fn_set_status ()
16190{
16191 return $1
16192} # as_fn_set_status
16193
16194# as_fn_exit STATUS
16195# -----------------
16196# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16197as_fn_exit ()
16198{
16199 set +e
16200 as_fn_set_status $1
16201 exit $1
16202} # as_fn_exit
16203
16204# as_fn_unset VAR
16205# ---------------
16206# Portably unset VAR.
16207as_fn_unset ()
16208{
16209 { eval $1=; unset $1;}
16210}
16211as_unset=as_fn_unset
16212# as_fn_append VAR VALUE
16213# ----------------------
16214# Append the text in VALUE to the end of the definition contained in VAR. Take
16215# advantage of any shell optimizations that allow amortized linear growth over
16216# repeated appends, instead of the typical quadratic growth present in naive
16217# implementations.
16218if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16219 eval 'as_fn_append ()
16220 {
16221 eval $1+=\$2
16222 }'
16223else
16224 as_fn_append ()
16225 {
16226 eval $1=\$$1\$2
16227 }
16228fi # as_fn_append
16229
16230# as_fn_arith ARG...
16231# ------------------
16232# Perform arithmetic evaluation on the ARGs, and store the result in the
16233# global $as_val. Take advantage of shells that can avoid forks. The arguments
16234# must be portable across $(()) and expr.
16235if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16236 eval 'as_fn_arith ()
16237 {
16238 as_val=$(( $* ))
16239 }'
16240else
16241 as_fn_arith ()
16242 {
16243 as_val=`expr "$@" || test $? -eq 1`
16244 }
16245fi # as_fn_arith
16246
16247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248if expr a : '\(a\)' >/dev/null 2>&1 &&
16249 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16250 as_expr=expr
16251else
16252 as_expr=false
16253fi
16254
16255if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16256 as_basename=basename
16257else
16258 as_basename=false
16259fi
16260
Matthias Kloseb9621712010-04-24 17:59:49 +000016261if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16262 as_dirname=dirname
16263else
16264 as_dirname=false
16265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267as_me=`$as_basename -- "$0" ||
16268$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16269 X"$0" : 'X\(//\)$' \| \
16270 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016271$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272 sed '/^.*\/\([^/][^/]*\)\/*$/{
16273 s//\1/
16274 q
16275 }
16276 /^X\/\(\/\/\)$/{
16277 s//\1/
16278 q
16279 }
16280 /^X\/\(\/\).*/{
16281 s//\1/
16282 q
16283 }
16284 s/.*/./; q'`
16285
Matthias Kloseb9621712010-04-24 17:59:49 +000016286# Avoid depending upon Character Ranges.
16287as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16288as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16289as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16290as_cr_digits='0123456789'
16291as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292
16293ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016294case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016295-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016296 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016298 xy) ECHO_C='\c';;
16299 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16300 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301 esac;;
16302*)
16303 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016304esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016305
Martin v. Löwis11437992002-04-12 09:54:03 +000016306rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016307if test -d conf$$.dir; then
16308 rm -f conf$$.dir/conf$$.file
16309else
16310 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016311 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016313if (echo >conf$$.file) 2>/dev/null; then
16314 if ln -s conf$$.file conf$$ 2>/dev/null; then
16315 as_ln_s='ln -s'
16316 # ... but there are two gotchas:
16317 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16318 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016319 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016320 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016321 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016322 elif ln conf$$.file conf$$ 2>/dev/null; then
16323 as_ln_s=ln
16324 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016325 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016327else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016328 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16331rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016332
Matthias Kloseb9621712010-04-24 17:59:49 +000016333
16334# as_fn_mkdir_p
16335# -------------
16336# Create "$as_dir" as a directory, including parents if necessary.
16337as_fn_mkdir_p ()
16338{
16339
16340 case $as_dir in #(
16341 -*) as_dir=./$as_dir;;
16342 esac
16343 test -d "$as_dir" || eval $as_mkdir_p || {
16344 as_dirs=
16345 while :; do
16346 case $as_dir in #(
16347 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16348 *) as_qdir=$as_dir;;
16349 esac
16350 as_dirs="'$as_qdir' $as_dirs"
16351 as_dir=`$as_dirname -- "$as_dir" ||
16352$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16353 X"$as_dir" : 'X\(//\)[^/]' \| \
16354 X"$as_dir" : 'X\(//\)$' \| \
16355 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16356$as_echo X"$as_dir" |
16357 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16358 s//\1/
16359 q
16360 }
16361 /^X\(\/\/\)[^/].*/{
16362 s//\1/
16363 q
16364 }
16365 /^X\(\/\/\)$/{
16366 s//\1/
16367 q
16368 }
16369 /^X\(\/\).*/{
16370 s//\1/
16371 q
16372 }
16373 s/.*/./; q'`
16374 test -d "$as_dir" && break
16375 done
16376 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016377 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016378
16379
16380} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016381if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016382 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016383else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016384 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016385 as_mkdir_p=false
16386fi
16387
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016388
16389# as_fn_executable_p FILE
16390# -----------------------
16391# Test if FILE is an executable regular file.
16392as_fn_executable_p ()
16393{
16394 test -f "$1" && test -x "$1"
16395} # as_fn_executable_p
16396as_test_x='test -x'
16397as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016398
16399# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016400as_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 +000016401
16402# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016403as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016404
16405
Martin v. Löwis11437992002-04-12 09:54:03 +000016406exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016407## ----------------------------------- ##
16408## Main body of $CONFIG_STATUS script. ##
16409## ----------------------------------- ##
16410_ASEOF
16411test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016412
Matthias Kloseb9621712010-04-24 17:59:49 +000016413cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16414# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016415# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416# values after options handling.
16417ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016418This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016419generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016420
16421 CONFIG_FILES = $CONFIG_FILES
16422 CONFIG_HEADERS = $CONFIG_HEADERS
16423 CONFIG_LINKS = $CONFIG_LINKS
16424 CONFIG_COMMANDS = $CONFIG_COMMANDS
16425 $ $0 $@
16426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427on `(hostname || uname -n) 2>/dev/null | sed 1q`
16428"
16429
Martin v. Löwis11437992002-04-12 09:54:03 +000016430_ACEOF
16431
Matthias Kloseb9621712010-04-24 17:59:49 +000016432case $ac_config_files in *"
16433"*) set x $ac_config_files; shift; ac_config_files=$*;;
16434esac
16435
16436case $ac_config_headers in *"
16437"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16438esac
16439
16440
16441cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016442# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016443config_files="$ac_config_files"
16444config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016447
Matthias Kloseb9621712010-04-24 17:59:49 +000016448cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016449ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016450\`$as_me' instantiates files and other configuration actions
16451from templates according to the current configuration. Unless the files
16452and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016453
Matthias Kloseb9621712010-04-24 17:59:49 +000016454Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016455
16456 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016458 --config print configuration, then exit
16459 -q, --quiet, --silent
16460 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016461 -d, --debug don't remove temporary files
16462 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016463 --file=FILE[:TEMPLATE]
16464 instantiate the configuration file FILE
16465 --header=FILE[:TEMPLATE]
16466 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016467
16468Configuration files:
16469$config_files
16470
16471Configuration headers:
16472$config_headers
16473
Matthias Kloseb9621712010-04-24 17:59:49 +000016474Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016477cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16478ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016479ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016480python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016481configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016482 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016483
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016484Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016485This config.status script is free software; the Free Software Foundation
16486gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487
16488ac_pwd='$ac_pwd'
16489srcdir='$srcdir'
16490INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016491MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016492test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016493_ACEOF
16494
Matthias Kloseb9621712010-04-24 17:59:49 +000016495cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16496# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016497ac_need_defaults=:
16498while test $# != 0
16499do
16500 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016501 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016502 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16503 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016504 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016506 --*=)
16507 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16508 ac_optarg=
16509 ac_shift=:
16510 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016512 ac_option=$1
16513 ac_optarg=$2
16514 ac_shift=shift
16515 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 esac
16517
Skip Montanaro6dead952003-09-25 14:50:04 +000016518 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016520 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16521 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016523 $as_echo "$ac_cs_version"; exit ;;
16524 --config | --confi | --conf | --con | --co | --c )
16525 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 debug=: ;;
16528 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016529 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016530 case $ac_optarg in
16531 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016532 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016533 esac
16534 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 ac_need_defaults=false;;
16536 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016537 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016538 case $ac_optarg in
16539 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16540 esac
16541 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543 --he | --h)
16544 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016545 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016546Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016547 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016548 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016549 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16550 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16551 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016552
16553 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016554 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016555Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016556
Matthias Kloseb9621712010-04-24 17:59:49 +000016557 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016559
16560 esac
16561 shift
16562done
16563
Skip Montanaro6dead952003-09-25 14:50:04 +000016564ac_configure_extra_args=
16565
16566if $ac_cs_silent; then
16567 exec 6>/dev/null
16568 ac_configure_extra_args="$ac_configure_extra_args --silent"
16569fi
16570
16571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016573if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016574 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016575 shift
16576 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16577 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016579 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016580fi
16581
Martin v. Löwis11437992002-04-12 09:54:03 +000016582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016583cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584exec 5>>config.log
16585{
16586 echo
16587 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16588## Running $as_me. ##
16589_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016590 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016594cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016596
Matthias Kloseb9621712010-04-24 17:59:49 +000016597cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598
16599# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016600for ac_config_target in $ac_config_targets
16601do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602 case $ac_config_target in
16603 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16604 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16605 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016606 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16607 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16609 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016610 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016611 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016612 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613
Victor Stinnere0be4232011-10-25 13:06:09 +020016614 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016615 esac
16616done
16617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618
Martin v. Löwis11437992002-04-12 09:54:03 +000016619# If the user did not use the arguments to specify the items to instantiate,
16620# then the envvar interface is used. Set only those that are not.
16621# We use the long form for the default assignment because of an extremely
16622# bizarre bug on SunOS 4.1.3.
16623if $ac_need_defaults; then
16624 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16625 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16626fi
16627
Skip Montanaro6dead952003-09-25 14:50:04 +000016628# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016630# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631# Hook for its removal unless debugging.
16632# Note that there is a small window in which the directory will not be cleaned:
16633# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016634$debug ||
16635{
Victor Stinnere0be4232011-10-25 13:06:09 +020016636 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016638 : "${ac_tmp:=$tmp}"
16639 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016641 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016642}
Martin v. Löwis11437992002-04-12 09:54:03 +000016643# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016644
Martin v. Löwis11437992002-04-12 09:54:03 +000016645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016646 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016647 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016648} ||
16649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016650 tmp=./conf$$-$RANDOM
16651 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016652} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016653ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016654
Matthias Kloseb9621712010-04-24 17:59:49 +000016655# Set up the scripts for CONFIG_FILES section.
16656# No need to generate them if there are no CONFIG_FILES.
16657# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016658if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016659
Matthias Kloseb9621712010-04-24 17:59:49 +000016660
16661ac_cr=`echo X | tr X '\015'`
16662# On cygwin, bash can eat \r inside `` if the user requested igncr.
16663# But we know of no other shell where ac_cr would be empty at this
16664# point, so we can use a bashism as a fallback.
16665if test "x$ac_cr" = x; then
16666 eval ac_cr=\$\'\\r\'
16667fi
16668ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16669if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016670 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016671else
16672 ac_cs_awk_cr=$ac_cr
16673fi
16674
Victor Stinnere0be4232011-10-25 13:06:09 +020016675echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016676_ACEOF
16677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016678
Matthias Kloseb9621712010-04-24 17:59:49 +000016679{
16680 echo "cat >conf$$subs.awk <<_ACEOF" &&
16681 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16682 echo "_ACEOF"
16683} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016684 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16685ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686ac_delim='%!_!# '
16687for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016688 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016689 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690
Matthias Kloseb9621712010-04-24 17:59:49 +000016691 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16692 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 break
16694 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016695 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696 else
16697 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699done
Matthias Kloseb9621712010-04-24 17:59:49 +000016700rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701
Matthias Kloseb9621712010-04-24 17:59:49 +000016702cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016703cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016705sed -n '
16706h
16707s/^/S["/; s/!.*/"]=/
16708p
16709g
16710s/^[^!]*!//
16711:repl
16712t repl
16713s/'"$ac_delim"'$//
16714t delim
16715:nl
16716h
16717s/\(.\{148\}\)..*/\1/
16718t more1
16719s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16720p
16721n
16722b repl
16723:more1
16724s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16725p
16726g
16727s/.\{148\}//
16728t nl
16729:delim
16730h
16731s/\(.\{148\}\)..*/\1/
16732t more2
16733s/["\\]/\\&/g; s/^/"/; s/$/"/
16734p
16735b
16736:more2
16737s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16738p
16739g
16740s/.\{148\}//
16741t delim
16742' <conf$$subs.awk | sed '
16743/^[^""]/{
16744 N
16745 s/\n//
16746}
16747' >>$CONFIG_STATUS || ac_write_fail=1
16748rm -f conf$$subs.awk
16749cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16750_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016751cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016752 for (key in S) S_is_set[key] = 1
16753 FS = ""
16754
16755}
16756{
16757 line = $ 0
16758 nfields = split(line, field, "@")
16759 substed = 0
16760 len = length(field[1])
16761 for (i = 2; i < nfields; i++) {
16762 key = field[i]
16763 keylen = length(key)
16764 if (S_is_set[key]) {
16765 value = S[key]
16766 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16767 len += length(value) + length(field[++i])
16768 substed = 1
16769 } else
16770 len += 1 + keylen
16771 }
16772
16773 print line
16774}
16775
16776_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016778cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16779if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16780 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16781else
16782 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016783fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016784 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016785_ACEOF
16786
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016787# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16788# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789# trailing colons and then remove the whole line if VPATH becomes empty
16790# (actually we leave an empty line to preserve line numbers).
16791if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016792 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16793h
16794s///
16795s/^/:/
16796s/[ ]*$/:/
16797s/:\$(srcdir):/:/g
16798s/:\${srcdir}:/:/g
16799s/:@srcdir@:/:/g
16800s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016802x
16803s/\(=[ ]*\).*/\1/
16804G
16805s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806s/^[^=]*=[ ]*$//
16807}'
16808fi
16809
Matthias Kloseb9621712010-04-24 17:59:49 +000016810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016811fi # test -n "$CONFIG_FILES"
16812
Matthias Kloseb9621712010-04-24 17:59:49 +000016813# Set up the scripts for CONFIG_HEADERS section.
16814# No need to generate them if there are no CONFIG_HEADERS.
16815# This happens for instance with `./config.status Makefile'.
16816if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016817cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016818BEGIN {
16819_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016820
Matthias Kloseb9621712010-04-24 17:59:49 +000016821# Transform confdefs.h into an awk script `defines.awk', embedded as
16822# here-document in config.status, that substitutes the proper values into
16823# config.h.in to produce config.h.
16824
16825# Create a delimiter string that does not exist in confdefs.h, to ease
16826# handling of long lines.
16827ac_delim='%!_!# '
16828for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016829 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16830 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016831 break
16832 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016833 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016834 else
16835 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16836 fi
16837done
16838
16839# For the awk script, D is an array of macro values keyed by name,
16840# likewise P contains macro parameters if any. Preserve backslash
16841# newline sequences.
16842
16843ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16844sed -n '
16845s/.\{148\}/&'"$ac_delim"'/g
16846t rset
16847:rset
16848s/^[ ]*#[ ]*define[ ][ ]*/ /
16849t def
16850d
16851:def
16852s/\\$//
16853t bsnl
16854s/["\\]/\\&/g
16855s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16856D["\1"]=" \3"/p
16857s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16858d
16859:bsnl
16860s/["\\]/\\&/g
16861s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16862D["\1"]=" \3\\\\\\n"\\/p
16863t cont
16864s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16865t cont
16866d
16867:cont
16868n
16869s/.\{148\}/&'"$ac_delim"'/g
16870t clear
16871:clear
16872s/\\$//
16873t bsnlc
16874s/["\\]/\\&/g; s/^/"/; s/$/"/p
16875d
16876:bsnlc
16877s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16878b cont
16879' <confdefs.h | sed '
16880s/'"$ac_delim"'/"\\\
16881"/g' >>$CONFIG_STATUS || ac_write_fail=1
16882
16883cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16884 for (key in D) D_is_set[key] = 1
16885 FS = ""
16886}
16887/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16888 line = \$ 0
16889 split(line, arg, " ")
16890 if (arg[1] == "#") {
16891 defundef = arg[2]
16892 mac1 = arg[3]
16893 } else {
16894 defundef = substr(arg[1], 2)
16895 mac1 = arg[2]
16896 }
16897 split(mac1, mac2, "(") #)
16898 macro = mac2[1]
16899 prefix = substr(line, 1, index(line, defundef) - 1)
16900 if (D_is_set[macro]) {
16901 # Preserve the white space surrounding the "#".
16902 print prefix "define", macro P[macro] D[macro]
16903 next
16904 } else {
16905 # Replace #undef with comments. This is necessary, for example,
16906 # in the case of _POSIX_SOURCE, which is predefined and required
16907 # on some systems where configure will not decide to define it.
16908 if (defundef == "undef") {
16909 print "/*", prefix defundef, macro, "*/"
16910 next
16911 }
16912 }
16913}
16914{ print }
16915_ACAWK
16916_ACEOF
16917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016918 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016919fi # test -n "$CONFIG_HEADERS"
16920
16921
16922eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16923shift
16924for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925do
16926 case $ac_tag in
16927 :[FHLC]) ac_mode=$ac_tag; continue;;
16928 esac
16929 case $ac_mode$ac_tag in
16930 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016931 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932 :[FH]-) ac_tag=-:-;;
16933 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16934 esac
16935 ac_save_IFS=$IFS
16936 IFS=:
16937 set x $ac_tag
16938 IFS=$ac_save_IFS
16939 shift
16940 ac_file=$1
16941 shift
16942
16943 case $ac_mode in
16944 :L) ac_source=$1;;
16945 :[FH])
16946 ac_file_inputs=
16947 for ac_f
16948 do
16949 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016950 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951 *) # Look for the file first in the build tree, then in the source tree
16952 # (if the path is not absolute). The absolute path cannot be DOS-style,
16953 # because $ac_f cannot contain `:'.
16954 test -f "$ac_f" ||
16955 case $ac_f in
16956 [\\/$]*) false;;
16957 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16958 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016959 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016961 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16962 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016963 done
16964
16965 # Let's still pretend it is `configure' which instantiates (i.e., don't
16966 # use $as_me), people would be surprised to read:
16967 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016968 configure_input='Generated from '`
16969 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16970 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016971 if test x"$ac_file" != x-; then
16972 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016973 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16974$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016975 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016976 # Neutralize special characters interpreted by sed in replacement strings.
16977 case $configure_input in #(
16978 *\&* | *\|* | *\\* )
16979 ac_sed_conf_input=`$as_echo "$configure_input" |
16980 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16981 *) ac_sed_conf_input=$configure_input;;
16982 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016983
16984 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016985 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16986 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987 esac
16988 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016989 esac
16990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016992$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016993 X"$ac_file" : 'X\(//\)[^/]' \| \
16994 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016995 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016996$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16998 s//\1/
16999 q
17000 }
17001 /^X\(\/\/\)[^/].*/{
17002 s//\1/
17003 q
17004 }
17005 /^X\(\/\/\)$/{
17006 s//\1/
17007 q
17008 }
17009 /^X\(\/\).*/{
17010 s//\1/
17011 q
17012 }
17013 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017014 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017015 ac_builddir=.
17016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017case "$ac_dir" in
17018.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17019*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017020 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017021 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017022 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023 case $ac_top_builddir_sub in
17024 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17025 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17026 esac ;;
17027esac
17028ac_abs_top_builddir=$ac_pwd
17029ac_abs_builddir=$ac_pwd$ac_dir_suffix
17030# for backward compatibility:
17031ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017032
17033case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017035 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036 ac_top_srcdir=$ac_top_builddir_sub
17037 ac_abs_top_srcdir=$ac_pwd ;;
17038 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017039 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040 ac_top_srcdir=$srcdir
17041 ac_abs_top_srcdir=$srcdir ;;
17042 *) # Relative name.
17043 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17044 ac_top_srcdir=$ac_top_build_prefix$srcdir
17045 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017046esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017048
Martin v. Löwis11437992002-04-12 09:54:03 +000017049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050 case $ac_mode in
17051 :F)
17052 #
17053 # CONFIG_FILE
17054 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017055
17056 case $INSTALL in
17057 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017060 ac_MKDIR_P=$MKDIR_P
17061 case $MKDIR_P in
17062 [\\/$]* | ?:[\\/]* ) ;;
17063 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17064 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017065_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066
Matthias Kloseb9621712010-04-24 17:59:49 +000017067cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068# If the template does not know about datarootdir, expand it.
17069# FIXME: This hack should be removed a few years after 2.60.
17070ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017071ac_sed_dataroot='
17072/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073 p
17074 q
17075}
17076/@datadir@/p
17077/@docdir@/p
17078/@infodir@/p
17079/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017080/@mandir@/p'
17081case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082*datarootdir*) ac_datarootdir_seen=yes;;
17083*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17085$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017087cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088 ac_datarootdir_hack='
17089 s&@datadir@&$datadir&g
17090 s&@docdir@&$docdir&g
17091 s&@infodir@&$infodir&g
17092 s&@localedir@&$localedir&g
17093 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017094 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095esac
17096_ACEOF
17097
17098# Neutralize VPATH when `$srcdir' = `.'.
17099# Shell code in configure.ac might set extrasub.
17100# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17102ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017103$extrasub
17104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017106:t
17107/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017108s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017110s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017111s&@srcdir@&$ac_srcdir&;t t
17112s&@abs_srcdir@&$ac_abs_srcdir&;t t
17113s&@top_srcdir@&$ac_top_srcdir&;t t
17114s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17115s&@builddir@&$ac_builddir&;t t
17116s&@abs_builddir@&$ac_abs_builddir&;t t
17117s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17118s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017119s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017121"
Victor Stinnere0be4232011-10-25 13:06:09 +020017122eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17123 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017125test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017126 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17127 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17128 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017129 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017130which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017131$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017132which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017133
Victor Stinnere0be4232011-10-25 13:06:09 +020017134 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017135 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017136 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17137 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017138 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017139 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 ;;
17141 :H)
17142 #
17143 # CONFIG_HEADER
17144 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017145 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017146 {
17147 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017148 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17149 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017150 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017151 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017152 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17153$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017154 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017155 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017156 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017157 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 fi
17159 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017160 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017161 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017162 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017163 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017164 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166
17167 esac
17168
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017169
17170 case $ac_file$ac_mode in
17171 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17172
17173 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174done # for ac_tag
17175
Guido van Rossum627b2d71993-12-24 10:39:16 +000017176
Matthias Kloseb9621712010-04-24 17:59:49 +000017177as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017178_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017179ac_clean_files=$ac_clean_files_save
17180
Matthias Kloseb9621712010-04-24 17:59:49 +000017181test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017182 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017183
Martin v. Löwis11437992002-04-12 09:54:03 +000017184
17185# configure is writing to config.log, and then calls config.status.
17186# config.status does its own redirection, appending to config.log.
17187# Unfortunately, on DOS this fails, as config.log is still kept open
17188# by configure, so config.status won't be able to write to it; its
17189# output is simply discarded. So we exec the FD to /dev/null,
17190# effectively closing config.log, so it can be properly (re)opened and
17191# appended to by config.status. When coming back to configure, we
17192# need to make the FD available again.
17193if test "$no_create" != yes; then
17194 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017195 ac_config_status_args=
17196 test "$silent" = yes &&
17197 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017198 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017199 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017200 exec 5>>config.log
17201 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17202 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017203 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017204fi
17205if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17206 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17207$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017208fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017209
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017210
Christian Heimes75ed8902013-11-20 01:11:18 +010017211echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017212if test ! -f Modules/Setup
17213then
17214 cp $srcdir/Modules/Setup.dist Modules/Setup
17215fi
17216
Christian Heimes75ed8902013-11-20 01:11:18 +010017217echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017218if test ! -f Modules/Setup.local
17219then
17220 echo "# Edit this file for local setup changes" >Modules/Setup.local
17221fi
17222
Christian Heimes75ed8902013-11-20 01:11:18 +010017223echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017224$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17225 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017226 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017227mv config.c Modules