blob: 2e59ac8da57d417196b67d90db1abca2437992a2 [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
697BUILDEXEEXT
698EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200700PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200701PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200702MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000704MAINCC
705CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200706GREP
707CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000708OBJEXT
709EXEEXT
710ac_ct_CC
711CPPFLAGS
712LDFLAGS
713CFLAGS
714CC
715EXPORT_MACOSX_DEPLOYMENT_TARGET
716CONFIGURE_MACOSX_DEPLOYMENT_TARGET
717SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200718_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000719MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000720FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000721FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800722FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000723FRAMEWORKALTINSTALLLAST
724FRAMEWORKALTINSTALLFIRST
725FRAMEWORKINSTALLLAST
726FRAMEWORKINSTALLFIRST
727PYTHONFRAMEWORKINSTALLDIR
728PYTHONFRAMEWORKPREFIX
729PYTHONFRAMEWORKDIR
730PYTHONFRAMEWORKIDENTIFIER
731PYTHONFRAMEWORK
732LIPO_32BIT_FLAGS
733ARCH_RUN_32BIT
734UNIVERSALSDK
735CONFIG_ARGS
736SOVERSION
737VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200738PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100739host_os
740host_vendor
741host_cpu
742host
743build_os
744build_vendor
745build_cpu
746build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500747HAS_HG
748HGBRANCH
749HGTAG
750HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400751BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000752target_alias
753host_alias
754build_alias
755LIBS
756ECHO_T
757ECHO_N
758ECHO_C
759DEFS
760mandir
761localedir
762libdir
763psdir
764pdfdir
765dvidir
766htmldir
767infodir
768docdir
769oldincludedir
770includedir
771localstatedir
772sharedstatedir
773sysconfdir
774datadir
775datarootdir
776libexecdir
777sbindir
778bindir
779program_transform_name
780prefix
781exec_prefix
782PACKAGE_URL
783PACKAGE_BUGREPORT
784PACKAGE_STRING
785PACKAGE_VERSION
786PACKAGE_TARNAME
787PACKAGE_NAME
788PATH_SEPARATOR
789SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000790ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000791ac_user_opts='
792enable_option_checking
793enable_universalsdk
794with_universal_archs
795with_framework_name
796enable_framework
797with_gcc
798with_cxx_main
799with_suffix
800enable_shared
801enable_profiling
802with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100803with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100804with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_libs
806with_system_expat
807with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100808with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000809enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700810with_tcltk_includes
811with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_dbmliborder
813with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_threads
815with_thread
816enable_ipv6
817with_doc_strings
818with_tsc
819with_pymalloc
820with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_fpectl
822with_libm
823with_libc
824enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800826with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000827'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828 ac_precious_vars='build_alias
829host_alias
830target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100831MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832CC
833CFLAGS
834LDFLAGS
835LIBS
836CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100837CPP
838PKG_CONFIG
839PKG_CONFIG_PATH
840PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841
Guido van Rossum627b2d71993-12-24 10:39:16 +0000842
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000844ac_init_help=
845ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000846ac_unrecognized_opts=
847ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848# The variables have the same names as the options, with
849# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853no_recursion=
854prefix=NONE
855program_prefix=NONE
856program_suffix=NONE
857program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862x_includes=NONE
863x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000864
865# Installation directory options.
866# These are left unexpanded so users can "make install exec_prefix=/foo"
867# and all the variables that are supposed to be based on exec_prefix
868# by default will actually change.
869# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871bindir='${exec_prefix}/bin'
872sbindir='${exec_prefix}/sbin'
873libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874datarootdir='${prefix}/share'
875datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876sysconfdir='${prefix}/etc'
877sharedstatedir='${prefix}/com'
878localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879includedir='${prefix}/include'
880oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
882infodir='${datarootdir}/info'
883htmldir='${docdir}'
884dvidir='${docdir}'
885pdfdir='${docdir}'
886psdir='${docdir}'
887libdir='${exec_prefix}/lib'
888localedir='${datarootdir}/locale'
889mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895 # If the previous option needs an argument, assign it.
896 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 ac_prev=
899 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200903 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
904 *=) ac_optarg= ;;
905 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908 # Accept the important Cygnus configure options, so we can diagnose typos.
909
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 case $ac_dashdash$ac_option in
911 --)
912 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -bindir | --bindir | --bindi | --bind | --bin | --bi)
915 ac_prev=bindir ;;
916 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 -cache-file | --cache-file | --cache-fil | --cache-fi \
925 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
926 ac_prev=cache_file ;;
927 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
928 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 cache_file=$ac_optarg ;;
930
931 --config-cache | -C)
932 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
940 | --dataroo | --dataro | --datar)
941 ac_prev=datarootdir ;;
942 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
943 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
944 datarootdir=$ac_optarg ;;
945
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000949 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200950 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000951 ac_useropt_orig=$ac_useropt
952 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
953 case $ac_user_opts in
954 *"
955"enable_$ac_useropt"
956"*) ;;
957 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
958 ac_unrecognized_sep=', ';;
959 esac
960 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961
962 -docdir | --docdir | --docdi | --doc | --do)
963 ac_prev=docdir ;;
964 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
965 docdir=$ac_optarg ;;
966
967 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
968 ac_prev=dvidir ;;
969 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
970 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
972 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000974 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200976 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000977 ac_useropt_orig=$ac_useropt
978 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
979 case $ac_user_opts in
980 *"
981"enable_$ac_useropt"
982"*) ;;
983 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
984 ac_unrecognized_sep=', ';;
985 esac
986 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
989 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
990 | --exec | --exe | --ex)
991 ac_prev=exec_prefix ;;
992 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
993 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
994 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 # Obsolete; use --with-gas.
999 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 -help | --help | --hel | --he | -h)
1002 ac_init_help=long ;;
1003 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1004 ac_init_help=recursive ;;
1005 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1006 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1014 ac_prev=htmldir ;;
1015 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1016 | --ht=*)
1017 htmldir=$ac_optarg ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -includedir | --includedir | --includedi | --included | --include \
1020 | --includ | --inclu | --incl | --inc)
1021 ac_prev=includedir ;;
1022 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1023 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -infodir | --infodir | --infodi | --infod | --info | --inf)
1027 ac_prev=infodir ;;
1028 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
1031 -libdir | --libdir | --libdi | --libd)
1032 ac_prev=libdir ;;
1033 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1037 | --libexe | --libex | --libe)
1038 ac_prev=libexecdir ;;
1039 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1040 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 -localedir | --localedir | --localedi | --localed | --locale)
1044 ac_prev=localedir ;;
1045 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1046 localedir=$ac_optarg ;;
1047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 ac_prev=localstatedir ;;
1051 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1056 ac_prev=mandir ;;
1057 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061 # Obsolete; use --without-fp.
1062 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066 no_create=yes ;;
1067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1069 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1070 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1073 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1074 | --oldin | --oldi | --old | --ol | --o)
1075 ac_prev=oldincludedir ;;
1076 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1077 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1078 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1082 ac_prev=prefix ;;
1083 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1087 | --program-pre | --program-pr | --program-p)
1088 ac_prev=program_prefix ;;
1089 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1090 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1094 | --program-suf | --program-su | --program-s)
1095 ac_prev=program_suffix ;;
1096 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1097 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-transform-name | --program-transform-name \
1101 | --program-transform-nam | --program-transform-na \
1102 | --program-transform-n | --program-transform- \
1103 | --program-transform | --program-transfor \
1104 | --program-transfo | --program-transf \
1105 | --program-trans | --program-tran \
1106 | --progr-tra | --program-tr | --program-t)
1107 ac_prev=program_transform_name ;;
1108 -program-transform-name=* | --program-transform-name=* \
1109 | --program-transform-nam=* | --program-transform-na=* \
1110 | --program-transform-n=* | --program-transform-=* \
1111 | --program-transform=* | --program-transfor=* \
1112 | --program-transfo=* | --program-transf=* \
1113 | --program-trans=* | --program-tran=* \
1114 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001117 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1118 ac_prev=pdfdir ;;
1119 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1120 pdfdir=$ac_optarg ;;
1121
1122 -psdir | --psdir | --psdi | --psd | --ps)
1123 ac_prev=psdir ;;
1124 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1125 psdir=$ac_optarg ;;
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1128 | -silent | --silent | --silen | --sile | --sil)
1129 silent=yes ;;
1130
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001131 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1132 ac_prev=sbindir ;;
1133 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1134 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001136
1137 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1138 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1139 | --sharedst | --shareds | --shared | --share | --shar \
1140 | --sha | --sh)
1141 ac_prev=sharedstatedir ;;
1142 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1143 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1144 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1145 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 -site | --site | --sit)
1149 ac_prev=site ;;
1150 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1154 ac_prev=srcdir ;;
1155 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1159 | --syscon | --sysco | --sysc | --sys | --sy)
1160 ac_prev=sysconfdir ;;
1161 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1162 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
1170 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1171 verbose=yes ;;
1172
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 -version | --version | --versio | --versi | --vers | -V)
1174 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001180 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 ac_useropt_orig=$ac_useropt
1182 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1183 case $ac_user_opts in
1184 *"
1185"with_$ac_useropt"
1186"*) ;;
1187 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1188 ac_unrecognized_sep=', ';;
1189 esac
1190 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001196 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
1205 esac
1206 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 --x)
1209 # Obsolete; use --with-x.
1210 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1213 | --x-incl | --x-inc | --x-in | --x-i)
1214 ac_prev=x_includes ;;
1215 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1216 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
1219 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1220 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1221 ac_prev=x_libraries ;;
1222 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1223 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1227Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228 ;;
1229
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 *=*)
1231 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1232 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 case $ac_envvar in #(
1234 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 export $ac_envvar ;;
1239
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001240 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001245 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
1248 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249done
1250
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254fi
1255
Matthias Kloseb9621712010-04-24 17:59:49 +00001256if test -n "$ac_unrecognized_opts"; then
1257 case $enable_option_checking in
1258 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1261 esac
1262fi
1263
1264# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1266 datadir sysconfdir sharedstatedir localstatedir includedir \
1267 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1268 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 # Remove trailing slashes.
1272 case $ac_val in
1273 */ )
1274 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1275 eval $ac_var=\$ac_val;;
1276 esac
1277 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 [\\/$]* | ?:[\\/]* ) continue;;
1280 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001283done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Martin v. Löwis11437992002-04-12 09:54:03 +00001285# There might be people who depend on the old broken behavior: `$host'
1286# used to hold the argument of --host etc.
1287# FIXME: To remove some day.
1288build=$build_alias
1289host=$host_alias
1290target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291
Martin v. Löwis11437992002-04-12 09:54:03 +00001292# FIXME: To remove some day.
1293if test "x$host_alias" != x; then
1294 if test "x$build_alias" = x; then
1295 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 elif test "x$build_alias" != "x$host_alias"; then
1297 cross_compiling=yes
1298 fi
1299fi
1300
1301ac_tool_prefix=
1302test -n "$host_alias" && ac_tool_prefix=$host_alias-
1303
1304test "$silent" = yes && exec 6>/dev/null
1305
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307ac_pwd=`pwd` && test -n "$ac_pwd" &&
1308ac_ls_di=`ls -di .` &&
1309ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315# Find the source files, if location was not specified.
1316if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001317 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001319 ac_confdir=`$as_dirname -- "$as_myself" ||
1320$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1321 X"$as_myself" : 'X\(//\)[^/]' \| \
1322 X"$as_myself" : 'X\(//\)$' \| \
1323 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1324$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\/\)[^/].*/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\).*/{
1338 s//\1/
1339 q
1340 }
1341 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344 srcdir=..
1345 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346else
1347 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349if test ! -r "$srcdir/$ac_unique_file"; then
1350 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1354ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001355 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 pwd)`
1357# When building in place, set srcdir=.
1358if test "$ac_abs_confdir" = "$ac_pwd"; then
1359 srcdir=.
1360fi
1361# Remove unnecessary trailing slashes from srcdir.
1362# Double slashes in file names in object file debugging info
1363# mess up M-x gdb in Emacs.
1364case $srcdir in
1365*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1366esac
1367for ac_var in $ac_precious_vars; do
1368 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_env_${ac_var}_value=\$${ac_var}
1370 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1371 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1372done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373
Martin v. Löwis11437992002-04-12 09:54:03 +00001374#
1375# Report the --help message.
1376#
1377if test "$ac_init_help" = "long"; then
1378 # Omit some internal or obsolete options to make the list less imposing.
1379 # This message is too long to be a string in the A/UX 3.1 sh.
1380 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001381\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382
1383Usage: $0 [OPTION]... [VAR=VALUE]...
1384
1385To assign environment variables (e.g., CC, CFLAGS...), specify them as
1386VAR=VALUE. See below for descriptions of some of the useful variables.
1387
1388Defaults for the options are specified in brackets.
1389
1390Configuration:
1391 -h, --help display this help and exit
1392 --help=short display options specific to this package
1393 --help=recursive display the short help of all the included packages
1394 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001395 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --cache-file=FILE cache test results in FILE [disabled]
1397 -C, --config-cache alias for \`--cache-file=config.cache'
1398 -n, --no-create do not create output files
1399 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1400
Martin v. Löwis11437992002-04-12 09:54:03 +00001401Installation directories:
1402 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407By default, \`make install' will install all the files in
1408\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1409an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1410for instance \`--prefix=\$HOME'.
1411
1412For better control, use the options below.
1413
1414Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 --bindir=DIR user executables [EPREFIX/bin]
1416 --sbindir=DIR system admin executables [EPREFIX/sbin]
1417 --libexecdir=DIR program executables [EPREFIX/libexec]
1418 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1419 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1420 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1421 --libdir=DIR object code libraries [EPREFIX/lib]
1422 --includedir=DIR C header files [PREFIX/include]
1423 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1424 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1425 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1426 --infodir=DIR info documentation [DATAROOTDIR/info]
1427 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1428 --mandir=DIR man documentation [DATAROOTDIR/man]
1429 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1430 --htmldir=DIR html documentation [DOCDIR]
1431 --dvidir=DIR dvi documentation [DOCDIR]
1432 --pdfdir=DIR pdf documentation [DOCDIR]
1433 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434_ACEOF
1435
1436 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001437
1438System types:
1439 --build=BUILD configure for building on BUILD [guessed]
1440 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
1442fi
1443
1444if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001445 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001446 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001447 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 cat <<\_ACEOF
1449
1450Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1453 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001454 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001455 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --enable-framework[=INSTALLDIR]
1457 Build (MacOSX|Darwin) framework
1458 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001459 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001460 --enable-loadable-sqlite-extensions
1461 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --enable-ipv6 Enable ipv6 (with ipv4) support
1463 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001464 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467Optional Packages:
1468 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1469 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001470 --with-universal-archs=ARCH
1471 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001472 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001473 --with-framework-name=FRAMEWORK
1474 specify an alternate name of the framework built
1475 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001477 --with-cxx-main=<compiler>
1478 compile main() and link python executable with C++
1479 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-suffix=.exe set executable suffix
1481 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001482 --with-hash-algorithm=[fnv|siphash24]
1483 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001484 --with-address-sanitizer
1485 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001487 --with-system-expat build pyexpat module using an installed expat
1488 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001489 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001490 --with-system-libmpdec build _decimal module using an installed libmpdec
1491 library
Ned Deilyd819b932013-09-06 01:07:05 -07001492 --with-tcltk-includes='-I...'
1493 override search for Tcl and Tk include files
1494 --with-tcltk-libs='-L...'
1495 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001496 --with-dbmliborder=db1:db2:...
1497 order to check db backends for dbm. Valid value is a
1498 colon separated string with the backend names
1499 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with(out)-threads[=DIRECTORY]
1502 disable/enable thread support
1503 --with(out)-thread[=DIRECTORY]
1504 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001506 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001508 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-fpectl enable SIGFPE catching
1510 --with-libm=STRING math library
1511 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001512 --with(out)-computed-gotos
1513 Use computed gotos in evaluation loop (enabled by
1514 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001515 --with(out)-ensurepip=[=upgrade]
1516 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001517
1518Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001519 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 CC C compiler command
1521 CFLAGS C compiler flags
1522 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1523 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001525 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001528 PKG_CONFIG path to pkg-config utility
1529 PKG_CONFIG_PATH
1530 directories to add to pkg-config's search path
1531 PKG_CONFIG_LIBDIR
1532 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001533
1534Use these variables to override the choices made by `configure' or to help
1535it to find libraries and programs with nonstandard names/locations.
1536
Georg Brandle2e15612009-05-20 18:25:10 +00001537Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001540fi
1541
1542if test "$ac_init_help" = "recursive"; then
1543 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001545 test -d "$ac_dir" ||
1546 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1547 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 ac_builddir=.
1549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550case "$ac_dir" in
1551.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 case $ac_top_builddir_sub in
1557 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1559 esac ;;
1560esac
1561ac_abs_top_builddir=$ac_pwd
1562ac_abs_builddir=$ac_pwd$ac_dir_suffix
1563# for backward compatibility:
1564ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
1566case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 ac_top_srcdir=$ac_top_builddir_sub
1570 ac_abs_top_srcdir=$ac_pwd ;;
1571 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 ac_top_srcdir=$srcdir
1574 ac_abs_top_srcdir=$srcdir ;;
1575 *) # Relative name.
1576 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1577 ac_top_srcdir=$ac_top_build_prefix$srcdir
1578 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001579esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 cd "$ac_dir" || { ac_status=$?; continue; }
1583 # Check for guested configure.
1584 if test -f "$ac_srcdir/configure.gnu"; then
1585 echo &&
1586 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1587 elif test -f "$ac_srcdir/configure"; then
1588 echo &&
1589 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 fi || ac_status=$?
1593 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 done
1595fi
1596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001598if $ac_init_version; then
1599 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001600python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001601generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001602
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001603Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001604This configure script is free software; the Free Software Foundation
1605gives unlimited permission to copy, distribute and modify it.
1606_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001609
1610## ------------------------ ##
1611## Autoconf initialization. ##
1612## ------------------------ ##
1613
1614# ac_fn_c_try_compile LINENO
1615# --------------------------
1616# Try to compile conftest.$ac_ext, and return whether this succeeded.
1617ac_fn_c_try_compile ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620 rm -f conftest.$ac_objext
1621 if { { ac_try="$ac_compile"
1622case "(($ac_try" in
1623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624 *) ac_try_echo=$ac_try;;
1625esac
1626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627$as_echo "$ac_try_echo"; } >&5
1628 (eval "$ac_compile") 2>conftest.err
1629 ac_status=$?
1630 if test -s conftest.err; then
1631 grep -v '^ *+' conftest.err >conftest.er1
1632 cat conftest.er1 >&5
1633 mv -f conftest.er1 conftest.err
1634 fi
1635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636 test $ac_status = 0; } && {
1637 test -z "$ac_c_werror_flag" ||
1638 test ! -s conftest.err
1639 } && test -s conftest.$ac_objext; then :
1640 ac_retval=0
1641else
1642 $as_echo "$as_me: failed program was:" >&5
1643sed 's/^/| /' conftest.$ac_ext >&5
1644
1645 ac_retval=1
1646fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 as_fn_set_status $ac_retval
1649
1650} # ac_fn_c_try_compile
1651
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001652# ac_fn_c_try_cpp LINENO
1653# ----------------------
1654# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_cpp ()
1656{
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 if { { ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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; } > conftest.i && {
1674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1675 test ! -s conftest.err
1676 }; then :
1677 ac_retval=0
1678else
1679 $as_echo "$as_me: failed program was:" >&5
1680sed 's/^/| /' conftest.$ac_ext >&5
1681
1682 ac_retval=1
1683fi
1684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1685 as_fn_set_status $ac_retval
1686
1687} # ac_fn_c_try_cpp
1688
Matthias Kloseb9621712010-04-24 17:59:49 +00001689# ac_fn_c_try_link LINENO
1690# -----------------------
1691# Try to link conftest.$ac_ext, and return whether this succeeded.
1692ac_fn_c_try_link ()
1693{
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 rm -f conftest.$ac_objext conftest$ac_exeext
1696 if { { ac_try="$ac_link"
1697case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_link") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1709 fi
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } && {
1712 test -z "$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 } && test -s conftest$ac_exeext && {
1715 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001716 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001717 }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: failed program was:" >&5
1721sed 's/^/| /' conftest.$ac_ext >&5
1722
1723 ac_retval=1
1724fi
1725 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1726 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1727 # interfere with the next link command; also delete a directory that is
1728 # left behind by Apple's compiler. We do this before executing the actions.
1729 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001730 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 as_fn_set_status $ac_retval
1732
1733} # ac_fn_c_try_link
1734
Matthias Kloseb9621712010-04-24 17:59:49 +00001735# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1736# -------------------------------------------------------
1737# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1738# the include files in INCLUDES and setting the cache variable VAR
1739# accordingly.
1740ac_fn_c_check_header_mongrel ()
1741{
1742 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1745$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001746if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 $as_echo_n "(cached) " >&6
1748fi
1749eval ac_res=\$$3
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1751$as_echo "$ac_res" >&6; }
1752else
1753 # Is the header compilable?
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1755$as_echo_n "checking $2 usability... " >&6; }
1756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757/* end confdefs.h. */
1758$4
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_compile "$LINENO"; then :
1762 ac_header_compiler=yes
1763else
1764 ac_header_compiler=no
1765fi
1766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1768$as_echo "$ac_header_compiler" >&6; }
1769
1770# Is the header present?
1771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1772$as_echo_n "checking $2 presence... " >&6; }
1773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774/* end confdefs.h. */
1775#include <$2>
1776_ACEOF
1777if ac_fn_c_try_cpp "$LINENO"; then :
1778 ac_header_preproc=yes
1779else
1780 ac_header_preproc=no
1781fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001782rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1784$as_echo "$ac_header_preproc" >&6; }
1785
1786# So? What about this header?
1787case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1788 yes:no: )
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1790$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1792$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1793 ;;
1794 no:yes:* )
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1796$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1798$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1800$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1802$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1804$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001806## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001807## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 ) | sed "s/^/$as_me: WARNING: /" >&2
1809 ;;
1810esac
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001813if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=\$ac_header_compiler"
1817fi
1818eval ac_res=\$$3
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1820$as_echo "$ac_res" >&6; }
1821fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001822 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001823
1824} # ac_fn_c_check_header_mongrel
1825
1826# ac_fn_c_try_run LINENO
1827# ----------------------
1828# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1829# that executables *can* be run.
1830ac_fn_c_try_run ()
1831{
1832 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1833 if { { ac_try="$ac_link"
1834case "(($ac_try" in
1835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1836 *) ac_try_echo=$ac_try;;
1837esac
1838eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1839$as_echo "$ac_try_echo"; } >&5
1840 (eval "$ac_link") 2>&5
1841 ac_status=$?
1842 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1843 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1844 { { case "(($ac_try" in
1845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1846 *) ac_try_echo=$ac_try;;
1847esac
1848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1849$as_echo "$ac_try_echo"; } >&5
1850 (eval "$ac_try") 2>&5
1851 ac_status=$?
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; }; }; then :
1854 ac_retval=0
1855else
1856 $as_echo "$as_me: program exited with status $ac_status" >&5
1857 $as_echo "$as_me: failed program was:" >&5
1858sed 's/^/| /' conftest.$ac_ext >&5
1859
1860 ac_retval=$ac_status
1861fi
1862 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001864 as_fn_set_status $ac_retval
1865
1866} # ac_fn_c_try_run
1867
1868# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1869# -------------------------------------------------------
1870# Tests whether HEADER exists and can be compiled using the include files in
1871# INCLUDES, setting the cache variable VAR accordingly.
1872ac_fn_c_check_header_compile ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001877if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001878 $as_echo_n "(cached) " >&6
1879else
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$4
1883#include <$2>
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 eval "$3=yes"
1887else
1888 eval "$3=no"
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891fi
1892eval ac_res=\$$3
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896
1897} # ac_fn_c_check_header_compile
1898
Matthias Kloseb9621712010-04-24 17:59:49 +00001899# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1900# -------------------------------------------
1901# Tests whether TYPE exists after having included INCLUDES, setting cache
1902# variable VAR accordingly.
1903ac_fn_c_check_type ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 eval "$3=no"
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915int
1916main ()
1917{
1918if (sizeof ($2))
1919 return 0;
1920 ;
1921 return 0;
1922}
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928int
1929main ()
1930{
1931if (sizeof (($2)))
1932 return 0;
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938
1939else
1940 eval "$3=yes"
1941fi
1942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1943fi
1944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001950
1951} # ac_fn_c_check_type
1952
1953# ac_fn_c_find_uintX_t LINENO BITS VAR
1954# ------------------------------------
1955# Finds an unsigned integer type with width BITS, setting cache variable VAR
1956# accordingly.
1957ac_fn_c_find_uintX_t ()
1958{
1959 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1961$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001963 $as_echo_n "(cached) " >&6
1964else
1965 eval "$3=no"
1966 # Order is important - never check a type that is potentially smaller
1967 # than half of the expected target width.
1968 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1969 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$ac_includes_default
1973int
1974main ()
1975{
1976static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001977test_array [0] = 0;
1978return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980 ;
1981 return 0;
1982}
1983_ACEOF
1984if ac_fn_c_try_compile "$LINENO"; then :
1985 case $ac_type in #(
1986 uint$2_t) :
1987 eval "$3=yes" ;; #(
1988 *) :
1989 eval "$3=\$ac_type" ;;
1990esac
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001993 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001994
1995else
1996 break
1997fi
1998 done
1999fi
2000eval ac_res=\$$3
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002003 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002004
2005} # ac_fn_c_find_uintX_t
2006
2007# ac_fn_c_find_intX_t LINENO BITS VAR
2008# -----------------------------------
2009# Finds a signed integer type with width BITS, setting cache variable VAR
2010# accordingly.
2011ac_fn_c_find_intX_t ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2015$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002017 $as_echo_n "(cached) " >&6
2018else
2019 eval "$3=no"
2020 # Order is important - never check a type that is potentially smaller
2021 # than half of the expected target width.
2022 for ac_type in int$2_t 'int' 'long int' \
2023 'long long int' 'short int' 'signed char'; do
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002027 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002028int
2029main ()
2030{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002043 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002044int
2045main ()
2046{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002047static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002048 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057
2058else
2059 case $ac_type in #(
2060 int$2_t) :
2061 eval "$3=yes" ;; #(
2062 *) :
2063 eval "$3=\$ac_type" ;;
2064esac
2065fi
2066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2067fi
2068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002069 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002070
2071else
2072 break
2073fi
2074 done
2075fi
2076eval ac_res=\$$3
2077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2078$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002079 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081} # ac_fn_c_find_intX_t
2082
2083# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2084# --------------------------------------------
2085# Tries to find the compile-time value of EXPR in a program that includes
2086# INCLUDES, setting VAR accordingly. Returns whether the value could be
2087# computed
2088ac_fn_c_compute_int ()
2089{
2090 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2091 if test "$cross_compiling" = yes; then
2092 # Depending upon the size, compute the lo and hi bounds.
2093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_lo=0 ac_mid=0
2109 while :; do
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h. */
2112$4
2113int
2114main ()
2115{
2116static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002117test_array [0] = 0;
2118return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002119
2120 ;
2121 return 0;
2122}
2123_ACEOF
2124if ac_fn_c_try_compile "$LINENO"; then :
2125 ac_hi=$ac_mid; break
2126else
2127 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2128 if test $ac_lo -le $ac_mid; then
2129 ac_lo= ac_hi=
2130 break
2131 fi
2132 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 done
2136else
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002144test_array [0] = 0;
2145return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_hi=-1 ac_mid=-1
2153 while :; do
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h. */
2156$4
2157int
2158main ()
2159{
2160static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002161test_array [0] = 0;
2162return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002163
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_compile "$LINENO"; then :
2169 ac_lo=$ac_mid; break
2170else
2171 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2172 if test $ac_mid -le $ac_hi; then
2173 ac_lo= ac_hi=
2174 break
2175 fi
2176 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179 done
2180else
2181 ac_lo= ac_hi=
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184fi
2185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186# Binary search between lo and hi bounds.
2187while test "x$ac_lo" != "x$ac_hi"; do
2188 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191$4
2192int
2193main ()
2194{
2195static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002196test_array [0] = 0;
2197return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002198
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_compile "$LINENO"; then :
2204 ac_hi=$ac_mid
2205else
2206 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209done
2210case $ac_lo in #((
2211?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2212'') ac_retval=1 ;;
2213esac
2214 else
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218static long int longval () { return $2; }
2219static unsigned long int ulongval () { return $2; }
2220#include <stdio.h>
2221#include <stdlib.h>
2222int
2223main ()
2224{
2225
2226 FILE *f = fopen ("conftest.val", "w");
2227 if (! f)
2228 return 1;
2229 if (($2) < 0)
2230 {
2231 long int i = longval ();
2232 if (i != ($2))
2233 return 1;
2234 fprintf (f, "%ld", i);
2235 }
2236 else
2237 {
2238 unsigned long int i = ulongval ();
2239 if (i != ($2))
2240 return 1;
2241 fprintf (f, "%lu", i);
2242 }
2243 /* Do not output a trailing newline, as this causes \r\n confusion
2244 on some platforms. */
2245 return ferror (f) || fclose (f) != 0;
2246
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_run "$LINENO"; then :
2252 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2253else
2254 ac_retval=1
2255fi
2256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2257 conftest.$ac_objext conftest.beam conftest.$ac_ext
2258rm -f conftest.val
2259
2260 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002261 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002262 as_fn_set_status $ac_retval
2263
2264} # ac_fn_c_compute_int
2265
2266# ac_fn_c_check_func LINENO FUNC VAR
2267# ----------------------------------
2268# Tests whether FUNC exists, setting the cache variable VAR accordingly
2269ac_fn_c_check_func ()
2270{
2271 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2273$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002274if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002275 $as_echo_n "(cached) " >&6
2276else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2281#define $2 innocuous_$2
2282
2283/* System header to define __stub macros and hopefully few prototypes,
2284 which can conflict with char $2 (); below.
2285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2286 <limits.h> exists even on freestanding compilers. */
2287
2288#ifdef __STDC__
2289# include <limits.h>
2290#else
2291# include <assert.h>
2292#endif
2293
2294#undef $2
2295
2296/* Override any GCC internal prototype to avoid an error.
2297 Use char because int might match the return type of a GCC
2298 builtin and then its argument prototype would still apply. */
2299#ifdef __cplusplus
2300extern "C"
2301#endif
2302char $2 ();
2303/* The GNU C library defines this for functions which it implements
2304 to always fail with ENOSYS. Some functions are actually named
2305 something starting with __ and the normal name is an alias. */
2306#if defined __stub_$2 || defined __stub___$2
2307choke me
2308#endif
2309
2310int
2311main ()
2312{
2313return $2 ();
2314 ;
2315 return 0;
2316}
2317_ACEOF
2318if ac_fn_c_try_link "$LINENO"; then :
2319 eval "$3=yes"
2320else
2321 eval "$3=no"
2322fi
2323rm -f core conftest.err conftest.$ac_objext \
2324 conftest$ac_exeext conftest.$ac_ext
2325fi
2326eval ac_res=\$$3
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002329 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002330
2331} # ac_fn_c_check_func
2332
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002333# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2334# ---------------------------------------------
2335# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2336# accordingly.
2337ac_fn_c_check_decl ()
2338{
2339 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2340 as_decl_name=`echo $2|sed 's/ *(.*//'`
2341 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2343$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2344if eval \${$3+:} false; then :
2345 $as_echo_n "(cached) " >&6
2346else
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$4
2350int
2351main ()
2352{
2353#ifndef $as_decl_name
2354#ifdef __cplusplus
2355 (void) $as_decl_use;
2356#else
2357 (void) $as_decl_name;
2358#endif
2359#endif
2360
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$3=yes"
2367else
2368 eval "$3=no"
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371fi
2372eval ac_res=\$$3
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2374$as_echo "$ac_res" >&6; }
2375 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2376
2377} # ac_fn_c_check_decl
2378
Matthias Kloseb9621712010-04-24 17:59:49 +00002379# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2380# ----------------------------------------------------
2381# Tries to find if the field MEMBER exists in type AGGR, after including
2382# INCLUDES, setting cache variable VAR accordingly.
2383ac_fn_c_check_member ()
2384{
2385 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2387$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002388if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo_n "(cached) " >&6
2390else
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$5
2394int
2395main ()
2396{
2397static $2 ac_aggr;
2398if (ac_aggr.$3)
2399return 0;
2400 ;
2401 return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"; then :
2405 eval "$4=yes"
2406else
2407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408/* end confdefs.h. */
2409$5
2410int
2411main ()
2412{
2413static $2 ac_aggr;
2414if (sizeof ac_aggr.$3)
2415return 0;
2416 ;
2417 return 0;
2418}
2419_ACEOF
2420if ac_fn_c_try_compile "$LINENO"; then :
2421 eval "$4=yes"
2422else
2423 eval "$4=no"
2424fi
2425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426fi
2427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428fi
2429eval ac_res=\$$4
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002432 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002433
2434} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002436This file contains any messages produced by compilers while
2437running configure, to aid debugging if configure makes a mistake.
2438
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002439It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002440generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442 $ $0 $@
2443
2444_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002446{
2447cat <<_ASUNAME
2448## --------- ##
2449## Platform. ##
2450## --------- ##
2451
2452hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2453uname -m = `(uname -m) 2>/dev/null || echo unknown`
2454uname -r = `(uname -r) 2>/dev/null || echo unknown`
2455uname -s = `(uname -s) 2>/dev/null || echo unknown`
2456uname -v = `(uname -v) 2>/dev/null || echo unknown`
2457
2458/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2459/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2460
2461/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2462/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2463/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002465/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2466/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2467/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2468
2469_ASUNAME
2470
2471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 $as_echo "PATH: $as_dir"
2477 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
2480} >&5
2481
2482cat >&5 <<_ACEOF
2483
2484
2485## ----------- ##
2486## Core tests. ##
2487## ----------- ##
2488
2489_ACEOF
2490
2491
2492# Keep a trace of the command line.
2493# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002495# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002496# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002497ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002498ac_configure_args0=
2499ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002500ac_must_keep_next=false
2501for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002502do
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 for ac_arg
2504 do
2505 case $ac_arg in
2506 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2507 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2508 | -silent | --silent | --silen | --sile | --sil)
2509 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 esac
2513 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002518 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002520 case $ac_arg in
2521 *=* | --config-cache | -C | -disable-* | --disable-* \
2522 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2523 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2524 | -with-* | --with-* | -without-* | --without-* | --x)
2525 case "$ac_configure_args0 " in
2526 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2527 esac
2528 ;;
2529 -* ) ac_must_keep_next=true ;;
2530 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 ;;
2534 esac
2535 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002536done
Matthias Kloseb9621712010-04-24 17:59:49 +00002537{ ac_configure_args0=; unset ac_configure_args0;}
2538{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
2540# When interrupted or exit'd, cleanup temporary files, and complete
2541# config.log. We remove comments because anyway the quotes in there
2542# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543# WARNING: Use '\'' to represent an apostrophe within the trap.
2544# 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 +00002545trap 'exit_status=$?
2546 # Save into config.log some information that might help in debugging.
2547 {
2548 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002549
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002551## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 echo
2554 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555(
2556 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2557 eval ac_val=\$$ac_var
2558 case $ac_val in #(
2559 *${as_nl}*)
2560 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2562$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 esac
2564 case $ac_var in #(
2565 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2567 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac ;;
2569 esac
2570 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2573 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 "s/'\''/'\''\\\\'\'''\''/g;
2576 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2577 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002578 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002580 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 esac |
2582 sort
2583)
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002585
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002587## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002589 echo
2590 for ac_var in $ac_subst_vars
2591 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 eval ac_val=\$$ac_var
2593 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002597 done | sort
2598 echo
2599
2600 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002603## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002604 echo
2605 for ac_var in $ac_subst_files
2606 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 eval ac_val=\$$ac_var
2608 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 done | sort
2613 echo
2614 fi
2615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002617 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002618## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 echo
2623 fi
2624 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 $as_echo "$as_me: caught signal $ac_signal"
2626 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 rm -f core *.core core.conftest.* &&
2629 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002632for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002634done
2635ac_signal=0
2636
2637# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002639
Matthias Kloseb9621712010-04-24 17:59:49 +00002640$as_echo "/* confdefs.h */" > confdefs.h
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642# Predefined preprocessor variables.
2643
2644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_NAME "$PACKAGE_NAME"
2646_ACEOF
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2650_ACEOF
2651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_VERSION "$PACKAGE_VERSION"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_STRING "$PACKAGE_STRING"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2662_ACEOF
2663
Matthias Kloseb9621712010-04-24 17:59:49 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_URL "$PACKAGE_URL"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668
2669# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670# Prefer an explicitly selected file to automatically selected ones.
2671ac_site_file1=NONE
2672ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674 # We do not want a PATH search for config.site.
2675 case $CONFIG_SITE in #((
2676 -*) ac_site_file1=./$CONFIG_SITE;;
2677 */*) ac_site_file1=$CONFIG_SITE;;
2678 *) ac_site_file1=./$CONFIG_SITE;;
2679 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 ac_site_file1=$prefix/share/config.site
2682 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683else
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 ac_site_file1=$ac_default_prefix/share/config.site
2685 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002687for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688do
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 test "x$ac_site_file" = xNONE && continue
2690 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2692$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002694 . "$ac_site_file" \
2695 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2697as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002698See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699 fi
2700done
2701
2702if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 # Some versions of bash will fail to source /dev/null (special files
2704 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2705 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2707$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2710 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 esac
2712 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713else
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2715$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 >$cache_file
2717fi
2718
2719# Check that the precious variables saved in the cache have kept the same
2720# value.
2721ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2724 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2726 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 case $ac_old_set,$ac_new_set in
2728 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2730$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 +00002731 ac_cache_corrupted=: ;;
2732 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2734$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 ac_cache_corrupted=: ;;
2736 ,);;
2737 *)
2738 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002739 # differences in whitespace do not lead to failure.
2740 ac_old_val_w=`echo x $ac_old_val`
2741 ac_new_val_w=`echo x $ac_new_val`
2742 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2744$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2745 ac_cache_corrupted=:
2746 else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2748$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2749 eval $ac_var=\$ac_old_val
2750 fi
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2752$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2754$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 fi;;
2756 esac
2757 # Pass precious variables to config.status.
2758 if test "$ac_new_set" = set; then
2759 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002760 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 *) ac_arg=$ac_var=$ac_new_val ;;
2762 esac
2763 case " $ac_configure_args " in
2764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 esac
2767 fi
2768done
2769if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002770 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2773$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002774 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002776## -------------------- ##
2777## Main body of script. ##
2778## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002779
Guido van Rossum7f43da71994-08-01 12:15:30 +00002780ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002781ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002782ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2783ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2784ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002785
Guido van Rossum627b2d71993-12-24 10:39:16 +00002786
Michael W. Hudson54241132001-12-07 15:38:26 +00002787
Trent Nelson4d4ec652012-10-16 08:51:24 -04002788
Trent Nelson5595ab52012-10-17 04:47:31 -04002789if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002790 # If we're building out-of-tree, we need to make sure the following
2791 # resources get picked up before their $srcdir counterparts.
2792 # Objects/ -> typeslots.inc
2793 # Include/ -> Python-ast.h, graminit.h
2794 # Python/ -> importlib.h
2795 # (A side effect of this is that these resources will automatically be
2796 # regenerated when building out-of-tree, regardless of whether or not
2797 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2798 # off.)
2799 BASECPPFLAGS="-IObjects -IInclude -IPython"
2800else
2801 BASECPPFLAGS=""
2802fi
2803
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804
2805
2806
2807
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002808if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002809then
2810# Extract the first word of "hg", so it can be a program name with args.
2811set dummy hg; ac_word=$2
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2813$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002814if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815 $as_echo_n "(cached) " >&6
2816else
2817 if test -n "$HAS_HG"; then
2818 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2819else
2820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2821for as_dir in $PATH
2822do
2823 IFS=$as_save_IFS
2824 test -z "$as_dir" && as_dir=.
2825 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827 ac_cv_prog_HAS_HG="found"
2828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2829 break 2
2830 fi
2831done
2832 done
2833IFS=$as_save_IFS
2834
2835 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2836fi
2837fi
2838HAS_HG=$ac_cv_prog_HAS_HG
2839if test -n "$HAS_HG"; then
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2841$as_echo "$HAS_HG" >&6; }
2842else
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2844$as_echo "no" >&6; }
2845fi
2846
2847
2848else
2849HAS_HG=no-repository
2850fi
2851if test $HAS_HG = found
2852then
2853 HGVERSION="hg id -i \$(srcdir)"
2854 HGTAG="hg id -t \$(srcdir)"
2855 HGBRANCH="hg id -b \$(srcdir)"
2856else
2857 HGVERSION=""
2858 HGTAG=""
2859 HGBRANCH=""
2860fi
2861
2862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002863ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
2865
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002866ac_aux_dir=
2867for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2868 if test -f "$ac_dir/install-sh"; then
2869 ac_aux_dir=$ac_dir
2870 ac_install_sh="$ac_aux_dir/install-sh -c"
2871 break
2872 elif test -f "$ac_dir/install.sh"; then
2873 ac_aux_dir=$ac_dir
2874 ac_install_sh="$ac_aux_dir/install.sh -c"
2875 break
2876 elif test -f "$ac_dir/shtool"; then
2877 ac_aux_dir=$ac_dir
2878 ac_install_sh="$ac_aux_dir/shtool install -c"
2879 break
2880 fi
2881done
2882if test -z "$ac_aux_dir"; then
2883 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2884fi
2885
2886# These three variables are undocumented and unsupported,
2887# and are intended to be withdrawn in a future Autoconf release.
2888# They can cause serious problems if a builder's source tree is in a directory
2889# whose full name contains unusual characters.
2890ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2891ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2892ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2893
2894
2895# Make sure we can run config.sub.
2896$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2897 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2898
2899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2900$as_echo_n "checking build system type... " >&6; }
2901if ${ac_cv_build+:} false; then :
2902 $as_echo_n "(cached) " >&6
2903else
2904 ac_build_alias=$build_alias
2905test "x$ac_build_alias" = x &&
2906 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2907test "x$ac_build_alias" = x &&
2908 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2909ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2910 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2911
2912fi
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2914$as_echo "$ac_cv_build" >&6; }
2915case $ac_cv_build in
2916*-*-*) ;;
2917*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2918esac
2919build=$ac_cv_build
2920ac_save_IFS=$IFS; IFS='-'
2921set x $ac_cv_build
2922shift
2923build_cpu=$1
2924build_vendor=$2
2925shift; shift
2926# Remember, the first character of IFS is used to create $*,
2927# except with old shells:
2928build_os=$*
2929IFS=$ac_save_IFS
2930case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2931
2932
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2934$as_echo_n "checking host system type... " >&6; }
2935if ${ac_cv_host+:} false; then :
2936 $as_echo_n "(cached) " >&6
2937else
2938 if test "x$host_alias" = x; then
2939 ac_cv_host=$ac_cv_build
2940else
2941 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2942 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2943fi
2944
2945fi
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2947$as_echo "$ac_cv_host" >&6; }
2948case $ac_cv_host in
2949*-*-*) ;;
2950*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2951esac
2952host=$ac_cv_host
2953ac_save_IFS=$IFS; IFS='-'
2954set x $ac_cv_host
2955shift
2956host_cpu=$1
2957host_vendor=$2
2958shift; shift
2959# Remember, the first character of IFS is used to create $*,
2960# except with old shells:
2961host_os=$*
2962IFS=$ac_save_IFS
2963case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2964
2965
2966
doko@python.orga10e4a92013-01-25 18:45:12 +01002967
2968
Ned Deilyfcbc2462014-08-22 13:32:49 -07002969# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2970rm -f pybuilddir.txt
2971
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002972if test "$cross_compiling" = yes; then
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2974$as_echo_n "checking for python interpreter for cross build... " >&6; }
2975 if test -z "$PYTHON_FOR_BUILD"; then
2976 for interp in python$PACKAGE_VERSION python3 python; do
2977 which $interp >/dev/null 2>&1 || continue
2978 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2979 break
2980 fi
2981 interp=
2982 done
2983 if test x$interp = x; then
2984 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2985 fi
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2987$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002988 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 +02002989 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002990elif test "$cross_compiling" = maybe; then
2991 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002992else
2993 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2994fi
2995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
Benjamin Petersond23f8222009-04-05 19:13:16 +00002998if test "$prefix" != "/"; then
2999 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3000fi
3001
3002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003
3004
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003005# We don't use PACKAGE_ variables, and they cause conflicts
3006# with other autoconf-based packages that include Python.h
3007grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3008rm confdefs.h
3009mv confdefs.h.new confdefs.h
3010
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003011
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003012VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003013
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003014# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003015
3016SOVERSION=1.0
3017
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003018# The later defininition of _XOPEN_SOURCE disables certain features
3019# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003022
3023
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003024# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3025# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3026# them.
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003029
3030
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003031# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3032# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3033# them.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003036
3037
Martin v. Löwisd6320502004-08-12 13:45:08 +00003038# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3039# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3040
Matthias Kloseb9621712010-04-24 17:59:49 +00003041$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003042
3043
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3046# them.
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003049
3050
3051
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003052define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003053
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003054# Arguments passed to configure.
3055
3056CONFIG_ARGS="$ac_configure_args"
3057
Matthias Kloseb9621712010-04-24 17:59:49 +00003058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3059$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003061if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063 case $enableval in
3064 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065 # Locate the best usable SDK, see Mac/README.txt for more
3066 # information
3067 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003068 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3071 if test ! -d "${enableval}"
3072 then
3073 enableval=/
3074 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 ;;
3077 esac
3078 case $enableval in
3079 no)
3080 UNIVERSALSDK=
3081 enable_universalsdk=
3082 ;;
3083 *)
3084 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085 if test ! -d "${UNIVERSALSDK}"
3086 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003087 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089 ;;
3090 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003091
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092
Thomas Wouters477c8d52006-05-27 19:21:47 +00003093else
3094
3095 UNIVERSALSDK=
3096 enable_universalsdk=
3097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003098fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003099
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003100if test -n "${UNIVERSALSDK}"
3101then
Matthias Kloseb9621712010-04-24 17:59:49 +00003102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3103$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003104else
Matthias Kloseb9621712010-04-24 17:59:49 +00003105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003107fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003110
Ned Deily87adb6e2013-10-18 21:09:56 -07003111ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003112
Ned Deilycbfb9a52012-06-23 16:02:19 -07003113# For backward compatibility reasons we prefer to select '32-bit' if available,
3114# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003116if test "`uname -s`" = "Darwin"
3117then
3118 if test -n "${UNIVERSALSDK}"
3119 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003120 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003121 then
3122 UNIVERSAL_ARCHS="intel"
3123 fi
3124 fi
3125fi
3126
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003127
Matthias Kloseb9621712010-04-24 17:59:49 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3129$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
3131# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003132if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134 UNIVERSAL_ARCHS="$withval"
3135
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003136fi
3137
Ned Deily87adb6e2013-10-18 21:09:56 -07003138if test -n "${UNIVERSALSDK}"
3139then
3140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3141$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3142else
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3144$as_echo "no" >&6; }
3145fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003147
3148# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003149if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003150 withval=$with_framework_name;
3151 PYTHONFRAMEWORK=${withval}
3152 PYTHONFRAMEWORKDIR=${withval}.framework
3153 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3154
3155else
3156
3157 PYTHONFRAMEWORK=Python
3158 PYTHONFRAMEWORKDIR=Python.framework
3159 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3160
3161fi
3162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003164if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003166 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003167 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003168 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003169 esac
3170 case $enableval in
3171 no)
3172 PYTHONFRAMEWORK=
3173 PYTHONFRAMEWORKDIR=no-framework
3174 PYTHONFRAMEWORKPREFIX=
3175 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003176 FRAMEWORKINSTALLFIRST=
3177 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003178 FRAMEWORKALTINSTALLFIRST=
3179 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003180 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003181 if test "x${prefix}" = "xNONE"; then
3182 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3183 else
3184 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3185 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003187 ;;
3188 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003189 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003190 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003192 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003193 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3194 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003195 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003197
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003198 if test "x${prefix}" = "xNONE" ; then
3199 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003200
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 else
3202 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3203 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003204
3205 case "${enableval}" in
3206 /System*)
3207 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3208 if test "${prefix}" = "NONE" ; then
3209 # See below
3210 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3211 fi
3212 ;;
3213
3214 /Library*)
3215 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3216 ;;
3217
3218 */Library/Frameworks)
3219 MDIR="`dirname "${enableval}"`"
3220 MDIR="`dirname "${MDIR}"`"
3221 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3222
3223 if test "${prefix}" = "NONE"; then
3224 # User hasn't specified the
3225 # --prefix option, but wants to install
3226 # the framework in a non-default location,
3227 # ensure that the compatibility links get
3228 # installed relative to that prefix as well
3229 # instead of in /usr/local.
3230 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3231 fi
3232 ;;
3233
3234 *)
3235 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3236 ;;
3237 esac
3238
Jack Jansen127e56e2001-09-11 14:41:54 +00003239 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003241 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003245 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003247 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3248
3249 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3250
Jack Jansene578a632001-08-15 01:27:14 +00003251 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
Guido van Rossum563e7081996-09-10 18:20:48 +00003253else
Martin v. Löwis11437992002-04-12 09:54:03 +00003254
Jack Jansene578a632001-08-15 01:27:14 +00003255 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003257 PYTHONFRAMEWORKPREFIX=
3258 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003259 FRAMEWORKINSTALLFIRST=
3260 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003261 FRAMEWORKALTINSTALLFIRST=
3262 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003263 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003264 if test "x${prefix}" = "xNONE" ; then
3265 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3266 else
3267 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3268 fi
Jack Jansene578a632001-08-15 01:27:14 +00003269 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272fi
3273
Thomas Wouters477c8d52006-05-27 19:21:47 +00003274
3275
Michael W. Hudson54241132001-12-07 15:38:26 +00003276
3277
3278
3279
Jack Jansene578a632001-08-15 01:27:14 +00003280
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003281
3282
3283
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003284
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003285
Ned Deilyb8f944f2013-11-21 22:42:25 -08003286
Jack Jansene578a632001-08-15 01:27:14 +00003287##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003288## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003289## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291# Set name for machine-dependent library files
3292
Matthias Kloseb9621712010-04-24 17:59:49 +00003293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3294$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295if test -z "$MACHDEP"
3296then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 # avoid using uname for cross builds
3298 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003299 # ac_sys_system and ac_sys_release are used for setting
3300 # a lot of different things including 'define_xopen_source'
3301 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 case "$host" in
3303 *-*-linux*)
3304 ac_sys_system=Linux
3305 ;;
3306 *-*-cygwin*)
3307 ac_sys_system=Cygwin
3308 ;;
3309 *)
3310 # for now, limit cross builds to known configurations
3311 MACHDEP="unknown"
3312 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3313 esac
3314 ac_sys_release=
3315 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003316 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003317 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003318 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003321 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003323 fi
3324 ac_md_system=`echo $ac_sys_system |
3325 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3326 ac_md_release=`echo $ac_sys_release |
3327 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3328 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003329
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003331 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003333 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003334 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003335 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003336 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003337fi
Guido van Rossum91922671997-10-09 20:24:13 +00003338
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003339
3340if test "$cross_compiling" = yes; then
3341 case "$host" in
3342 *-*-linux*)
3343 case "$host_cpu" in
3344 arm*)
3345 _host_cpu=arm
3346 ;;
3347 *)
3348 _host_cpu=$host_cpu
3349 esac
3350 ;;
3351 *-*-cygwin*)
3352 _host_cpu=
3353 ;;
3354 *)
3355 # for now, limit cross builds to known configurations
3356 MACHDEP="unknown"
3357 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3358 esac
3359 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3360fi
3361
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003362# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3363# disable features if it is defined, without any means to access these
3364# features as extensions. For these systems, we skip the definition of
3365# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3366# some feature, make sure there is no alternative way to access this
3367# feature. Also, when using wildcards, make sure you have verified the
3368# need for not defining _XOPEN_SOURCE on all systems matching the
3369# wildcard, and that the wildcard does not include future systems
3370# (which may remove their limitations).
3371case $ac_sys_system/$ac_sys_release in
3372 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3373 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003374 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003375 # In addition, Stefan Krah confirms that issue #1244610 exists through
3376 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003377 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003378 define_xopen_source=no
3379 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3380 # also defined. This can be overridden by defining _BSD_SOURCE
3381 # As this has a different meaning on Linux, only define it on OpenBSD
3382
Matthias Kloseb9621712010-04-24 17:59:49 +00003383$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003384
3385 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003386 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003387 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3388 # also defined. This can be overridden by defining _BSD_SOURCE
3389 # As this has a different meaning on Linux, only define it on OpenBSD
3390
Matthias Kloseb9621712010-04-24 17:59:49 +00003391$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003392
3393 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003394 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3395 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3396 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003397 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 +00003398 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003399 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3400 # request to enable features supported by the standard as a request
3401 # to disable features not supported by the standard. The best way
3402 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3403 # entirely and define __EXTENSIONS__ instead.
3404 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003405 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003406 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3407 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003408 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003409 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003410 define_xopen_source=no;;
3411 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003412 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003413 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003414 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003415 # On FreeBSD 4, the math functions C89 does not cover are never defined
3416 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3417 FreeBSD/4.*)
3418 define_xopen_source=no;;
3419 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3420 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3421 # identifies itself as Darwin/7.*
3422 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3423 # disables platform specific features beyond repair.
3424 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3425 # has no effect, don't bother defining them
3426 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003427 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003428 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003429 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003430 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3431 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3432 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003433 AIX/4)
3434 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003435 AIX/5)
3436 if test `uname -r` -eq 1; then
3437 define_xopen_source=no
3438 fi
3439 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003440 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3441 # defining NI_NUMERICHOST.
3442 QNX/6.3.2)
3443 define_xopen_source=no
3444 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003445
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003446esac
3447
3448if test $define_xopen_source = yes
3449then
Victor Stinner14d098d2011-09-07 22:29:43 +02003450 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003451
Victor Stinner14d098d2011-09-07 22:29:43 +02003452$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003453
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003454
3455 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3456 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3457 # several APIs are not declared. Since this is also needed in some
3458 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
Matthias Kloseb9621712010-04-24 17:59:49 +00003460$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
3462
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003463
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003464$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003466fi
3467
Christian Heimes647cd872013-12-07 23:39:33 +01003468# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3469case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003470 hp*|HP*)
3471 define_stdc_a1=yes;;
3472 *)
3473 define_stdc_a1=no;;
3474esac
3475
3476if test $define_stdc_a1 = yes
3477then
Christian Heimes647cd872013-12-07 23:39:33 +01003478
3479$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3480
Christian Heimesb02bcae2013-12-08 15:21:08 +01003481fi
Christian Heimes647cd872013-12-07 23:39:33 +01003482
Guido van Rossum91922671997-10-09 20:24:13 +00003483#
3484# SGI compilers allow the specification of the both the ABI and the
3485# ISA on the command line. Depending on the values of these switches,
3486# different and often incompatable code will be generated.
3487#
3488# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3489# thus supply support for various ABI/ISA combinations. The MACHDEP
3490# variable is also adjusted.
3491#
3492
3493if test ! -z "$SGI_ABI"
3494then
3495 CC="cc $SGI_ABI"
3496 LDFLAGS="$SGI_ABI $LDFLAGS"
3497 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3500$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003501
Jack Jansen6b08a402004-06-03 12:41:45 +00003502# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3503# it may influence the way we can build extensions, so distutils
3504# needs to check it
3505
Thomas Wouters477c8d52006-05-27 19:21:47 +00003506
Jack Jansen6b08a402004-06-03 12:41:45 +00003507CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003508EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003509
Guido van Rossum627b2d71993-12-24 10:39:16 +00003510# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003511
3512# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3513# for debug/optimization stuff. BASECFLAGS is for flags that are required
3514# just to get things to compile and link. Users are free to override OPT
3515# when running configure or make. The build should not break if they do.
3516# BASECFLAGS should generally not be messed with, however.
3517
3518# XXX shouldn't some/most/all of this code be merged with the stuff later
3519# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3521$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003524if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003526 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003527 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003528 without_gcc=yes;;
3529 yes) CC=gcc
3530 without_gcc=no;;
3531 *) CC=$withval
3532 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003533 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003534else
Martin v. Löwis11437992002-04-12 09:54:03 +00003535
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003536 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003537 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003538 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003539 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003540 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541fi
3542
Matthias Kloseb9621712010-04-24 17:59:49 +00003543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3544$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003545
Guido van Rossum8b131c51995-03-09 14:10:13 +00003546# If the user switches compilers, we can't believe the cache
3547if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3548then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003549 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003550(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003551fi
3552
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003553# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3554# when the compiler supports them, but we don't always want -O2, and
3555# we set -g later.
3556if test -z "$CFLAGS"; then
3557 CFLAGS=
3558fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003559
3560if test "$ac_sys_system" = "Darwin"
3561then
3562 # Compiler selection on MacOSX is more complicated than
3563 # AC_PROG_CC can handle, see Mac/README.txt for more
3564 # information
3565 if test -z "${CC}"
3566 then
3567 found_gcc=
3568 found_clang=
3569 as_save_IFS=$IFS; IFS=:
3570 for as_dir in $PATH
3571 do
3572 IFS=$as_save_IFS
3573 if test -x $as_dir/gcc; then
3574 if test -z "${found_gcc}"; then
3575 found_gcc=$as_dir/gcc
3576 fi
3577 fi
3578 if test -x $as_dir/clang; then
3579 if test -z "${found_clang}"; then
3580 found_clang=$as_dir/clang
3581 fi
3582 fi
3583 done
3584 IFS=$as_save_IFS
3585
3586 if test -n "$found_gcc" -a -n "$found_clang"
3587 then
3588 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3591$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3592 CC="$found_clang"
3593 CXX="$found_clang++"
3594 fi
3595
3596
3597 elif test -z "$found_gcc" -a -n "$found_clang"
3598 then
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3600$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3601 CC="$found_clang"
3602 CXX="$found_clang++"
3603
3604 elif test -z "$found_gcc" -a -z "$found_clang"
3605 then
3606 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3607 if test -n "${found_clang}"
3608 then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3610$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3611 CC="${found_clang}"
3612 CXX="`/usr/bin/xcrun -find clang++`"
3613
3614 # else: use default behaviour
3615 fi
3616 fi
3617 fi
3618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003619ac_ext=c
3620ac_cpp='$CPP $CPPFLAGS'
3621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3623ac_compiler_gnu=$ac_cv_c_compiler_gnu
3624if test -n "$ac_tool_prefix"; then
3625 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3626set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3628$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003629if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003631else
3632 if test -n "$CC"; then
3633 ac_cv_prog_CC="$CC" # Let the user override the test.
3634else
Martin v. Löwis11437992002-04-12 09:54:03 +00003635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $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 +00003644 break 2
3645 fi
3646done
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003649
Jack Jansendd19cf82001-12-06 22:36:17 +00003650fi
3651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003652CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3655$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003656else
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3658$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663if test -z "$ac_cv_prog_CC"; then
3664 ac_ct_CC=$CC
3665 # Extract the first word of "gcc", so it can be a program name with args.
3666set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3668$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003669if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
3672 if test -n "$ac_ct_CC"; then
3673 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3674else
3675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3676for as_dir in $PATH
3677do
3678 IFS=$as_save_IFS
3679 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003681 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $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 +00003684 break 2
3685 fi
3686done
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690fi
3691fi
3692ac_ct_CC=$ac_cv_prog_ac_ct_CC
3693if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3695$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3698$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test "x$ac_ct_CC" = x; then
3702 CC=""
3703 else
3704 case $cross_compiling:$ac_tool_warned in
3705yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003706{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3707$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708ac_tool_warned=yes ;;
3709esac
3710 CC=$ac_ct_CC
3711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
3713 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003714fi
3715
Jack Jansendd19cf82001-12-06 22:36:17 +00003716if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717 if test -n "$ac_tool_prefix"; then
3718 # 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 +00003719set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003722if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003724else
3725 if test -n "$CC"; then
3726 ac_cv_prog_CC="$CC" # Let the user override the test.
3727else
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $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 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
3743fi
3744fi
3745CC=$ac_cv_prog_CC
3746if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756fi
3757if test -z "$CC"; then
3758 # Extract the first word of "cc", so it can be a program name with args.
3759set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3761$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003762if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
3765 if test -n "$CC"; then
3766 ac_cv_prog_CC="$CC" # Let the user override the test.
3767else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3777 ac_prog_rejected=yes
3778 continue
3779 fi
3780 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $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 +00003782 break 2
3783 fi
3784done
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003787
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788if test $ac_prog_rejected = yes; then
3789 # We found a bogon in the path, so make sure we never use it.
3790 set dummy $ac_cv_prog_CC
3791 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793 # We chose a different compiler from the bogus one.
3794 # However, it has the same basename, so the bogon will be chosen
3795 # first if we set CC to just the basename; use the full file name.
3796 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003797 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003798 fi
3799fi
3800fi
3801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003803if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003809fi
3810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812fi
3813if test -z "$CC"; then
3814 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 do
3817 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3818set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003821if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003823else
3824 if test -n "$CC"; then
3825 ac_cv_prog_CC="$CC" # Let the user override the test.
3826else
Martin v. Löwis11437992002-04-12 09:54:03 +00003827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828for as_dir in $PATH
3829do
3830 IFS=$as_save_IFS
3831 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003833 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 $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 +00003836 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838done
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003841
3842fi
3843fi
3844CC=$ac_cv_prog_CC
3845if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3847$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848else
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003851fi
3852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 test -n "$CC" && break
3855 done
3856fi
3857if test -z "$CC"; then
3858 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003860do
3861 # Extract the first word of "$ac_prog", so it can be a program name with args.
3862set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3864$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003865if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003867else
3868 if test -n "$ac_ct_CC"; then
3869 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3870else
3871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872for as_dir in $PATH
3873do
3874 IFS=$as_save_IFS
3875 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 $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 +00003880 break 2
3881 fi
3882done
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
3887fi
3888ac_ct_CC=$ac_cv_prog_ac_ct_CC
3889if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3891$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892else
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003895fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 test -n "$ac_ct_CC" && break
3899done
Michael W. Hudson54241132001-12-07 15:38:26 +00003900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 if test "x$ac_ct_CC" = x; then
3902 CC=""
3903 else
3904 case $cross_compiling:$ac_tool_warned in
3905yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908ac_tool_warned=yes ;;
3909esac
3910 CC=$ac_ct_CC
3911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003912fi
3913
3914fi
3915
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003919as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003920See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003921
3922# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003923$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3924set X $ac_compile
3925ac_compiler=$2
3926for ac_option in --version -v -V -qversion; do
3927 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928case "(($ac_try" in
3929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3930 *) ac_try_echo=$ac_try;;
3931esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3933$as_echo "$ac_try_echo"; } >&5
3934 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 if test -s conftest.err; then
3937 sed '10a\
3938... rest of stderr output deleted ...
3939 10q' conftest.err >conftest.er1
3940 cat conftest.er1 >&5
3941 fi
3942 rm -f conftest.er1 conftest.err
3943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }
3945done
Martin v. Löwis11437992002-04-12 09:54:03 +00003946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003948/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003949
Martin v. Löwis11437992002-04-12 09:54:03 +00003950int
3951main ()
3952{
3953
3954 ;
3955 return 0;
3956}
3957_ACEOF
3958ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003959ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003960# Try to create an executable without -o first, disregard a.out.
3961# It will help us diagnose broken compilers, and finding out an intuition
3962# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3964$as_echo_n "checking whether the C compiler works... " >&6; }
3965ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3966
3967# The possible output files:
3968ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970ac_rmfiles=
3971for ac_file in $ac_files
3972do
3973 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3976 esac
3977done
3978rm -f $ac_rmfiles
3979
Matthias Kloseb9621712010-04-24 17:59:49 +00003980if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981case "(($ac_try" in
3982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3983 *) ac_try_echo=$ac_try;;
3984esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003985eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3986$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003988 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3990 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3992# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3993# in a Makefile. We should not override ac_cv_exeext if it was cached,
3994# so that the user can short-circuit this test for compilers unknown to
3995# Autoconf.
3996for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003997do
3998 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004000 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 ;;
4002 [ab].out )
4003 # We found the default executable, but exeext='' is most
4004 # certainly right.
4005 break;;
4006 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 then :; else
4009 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4010 fi
4011 # We set ac_cv_exeext here because the later test for it is not
4012 # safe: cross compilers may not add the suffix if given an `-o'
4013 # argument, so we may need to know it at that point already.
4014 # Even if this section looks crufty: it has the advantage of
4015 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 break;;
4017 * )
4018 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 esac
4020done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021test "$ac_cv_exeext" = no && ac_cv_exeext=
4022
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004023else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 ac_file=''
4025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004026if test -z "$ac_file"; then :
4027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4028$as_echo "no" >&6; }
4029$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004030sed 's/^/| /' conftest.$ac_ext >&5
4031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004034as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004035See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004036else
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4038$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4041$as_echo_n "checking for C compiler default output file name... " >&6; }
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4043$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045
Matthias Kloseb9621712010-04-24 17:59:49 +00004046rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4049$as_echo_n "checking for suffix of executables... " >&6; }
4050if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004051case "(($ac_try" in
4052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4053 *) ac_try_echo=$ac_try;;
4054esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4056$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4060 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4062# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4063# work properly (i.e., refer to `conftest.exe'), while it won't with
4064# `rm'.
4065for ac_file in conftest.exe conftest conftest.*; do
4066 test -f "$ac_file" || continue
4067 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004069 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4070 break;;
4071 * ) break;;
4072 esac
4073done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004077as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004078See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004080rm -f conftest conftest$ac_cv_exeext
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4082$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083
4084rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004085EXEEXT=$ac_cv_exeext
4086ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4088/* end confdefs.h. */
4089#include <stdio.h>
4090int
4091main ()
4092{
4093FILE *f = fopen ("conftest.out", "w");
4094 return ferror (f) || fclose (f) != 0;
4095
4096 ;
4097 return 0;
4098}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004100ac_clean_files="$ac_clean_files conftest.out"
4101# Check that the compiler produces executables we can run. If not, either
4102# the compiler is broken, or we cross compile.
4103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4104$as_echo_n "checking whether we are cross compiling... " >&6; }
4105if test "$cross_compiling" != yes; then
4106 { { ac_try="$ac_link"
4107case "(($ac_try" in
4108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109 *) ac_try_echo=$ac_try;;
4110esac
4111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4112$as_echo "$ac_try_echo"; } >&5
4113 (eval "$ac_link") 2>&5
4114 ac_status=$?
4115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4116 test $ac_status = 0; }
4117 if { ac_try='./conftest$ac_cv_exeext'
4118 { { case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
4122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123$as_echo "$ac_try_echo"; } >&5
4124 (eval "$ac_try") 2>&5
4125 ac_status=$?
4126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127 test $ac_status = 0; }; }; then
4128 cross_compiling=no
4129 else
4130 if test "$cross_compiling" = maybe; then
4131 cross_compiling=yes
4132 else
4133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004135as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004136If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004137See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 fi
4139 fi
4140fi
4141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4142$as_echo "$cross_compiling" >&6; }
4143
4144rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4145ac_clean_files=$ac_clean_files_save
4146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4147$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004148if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo_n "(cached) " >&6
4150else
4151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004152/* end confdefs.h. */
4153
4154int
4155main ()
4156{
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
4162rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164case "(($ac_try" in
4165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4166 *) ac_try_echo=$ac_try;;
4167esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004168eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4169$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4173 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174 for ac_file in conftest.o conftest.obj conftest.*; do
4175 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4179 break;;
4180 esac
4181done
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004184sed 's/^/| /' conftest.$ac_ext >&5
4185
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004188as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004189See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004191rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4194$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004195OBJEXT=$ac_cv_objext
4196ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4198$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004199if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004201else
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204
Martin v. Löwis11437992002-04-12 09:54:03 +00004205int
4206main ()
4207{
4208#ifndef __GNUC__
4209 choke me
4210#endif
4211
4212 ;
4213 return 0;
4214}
4215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 ac_compiler_gnu=yes
4218else
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004222ac_cv_c_compiler_gnu=$ac_compiler_gnu
4223
4224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4226$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4227if test $ac_compiler_gnu = yes; then
4228 GCC=yes
4229else
4230 GCC=
4231fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004232ac_test_CFLAGS=${CFLAGS+set}
4233ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4235$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004236if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004238else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 ac_save_c_werror_flag=$ac_c_werror_flag
4240 ac_c_werror_flag=yes
4241 ac_cv_prog_cc_g=no
4242 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004245
Martin v. Löwis11437992002-04-12 09:54:03 +00004246int
4247main ()
4248{
4249
4250 ;
4251 return 0;
4252}
4253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256else
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 CFLAGS=""
4258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270
Matthias Kloseb9621712010-04-24 17:59:49 +00004271else
4272 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275/* end confdefs.h. */
4276
4277int
4278main ()
4279{
4280
4281 ;
4282 return 0;
4283}
4284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004285if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293 ac_c_werror_flag=$ac_save_c_werror_flag
4294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4296$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004299elif test $ac_cv_prog_cc_g = yes; then
4300 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004301 CFLAGS="-g -O2"
4302 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004303 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304 fi
4305else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004306 if test "$GCC" = yes; then
4307 CFLAGS="-O2"
4308 else
4309 CFLAGS=
4310 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4313$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004314if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004316else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004318ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004320/* end confdefs.h. */
4321#include <stdarg.h>
4322#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004323struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004324/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4325struct buf { int x; };
4326FILE * (*rcsopen) (struct buf *, struct stat *, int);
4327static char *e (p, i)
4328 char **p;
4329 int i;
4330{
4331 return p[i];
4332}
4333static char *f (char * (*g) (char **, int), char **p, ...)
4334{
4335 char *s;
4336 va_list v;
4337 va_start (v,p);
4338 s = g (p, va_arg (v,int));
4339 va_end (v);
4340 return s;
4341}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004342
4343/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4344 function prototypes and stuff, but not '\xHH' hex character constants.
4345 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004347 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4348 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004350int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4353 inside strings and character constants. */
4354#define FOO(x) 'x'
4355int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4356
Skip Montanaro6dead952003-09-25 14:50:04 +00004357int test (int i, double x);
4358struct s1 {int (*f) (int a);};
4359struct s2 {int (*f) (double a);};
4360int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4361int argc;
4362char **argv;
4363int
4364main ()
4365{
4366return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4367 ;
4368 return 0;
4369}
4370_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4372 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004373do
4374 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378rm -f core conftest.err conftest.$ac_objext
4379 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004380done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004382CC=$ac_save_CC
4383
4384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385# AC_CACHE_VAL
4386case "x$ac_cv_prog_cc_c89" in
4387 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4389$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4392$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004393 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4396$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004397esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004398if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004401
Martin v. Löwis11437992002-04-12 09:54:03 +00004402ac_ext=c
4403ac_cpp='$CPP $CPPFLAGS'
4404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4406ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004408ac_ext=c
4409ac_cpp='$CPP $CPPFLAGS'
4410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4412ac_compiler_gnu=$ac_cv_c_compiler_gnu
4413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4414$as_echo_n "checking how to run the C preprocessor... " >&6; }
4415# On Suns, sometimes $CPP names a directory.
4416if test -n "$CPP" && test -d "$CPP"; then
4417 CPP=
4418fi
4419if test -z "$CPP"; then
4420 if ${ac_cv_prog_CPP+:} false; then :
4421 $as_echo_n "(cached) " >&6
4422else
4423 # Double quotes because CPP needs to be expanded
4424 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4425 do
4426 ac_preproc_ok=false
4427for ac_c_preproc_warn_flag in '' yes
4428do
4429 # Use a header file that comes with gcc, so configuring glibc
4430 # with a fresh cross-compiler works.
4431 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4432 # <limits.h> exists even on freestanding compilers.
4433 # On the NeXT, cc -E runs the code through the compiler's parser,
4434 # not just through cpp. "Syntax error" is here to catch this case.
4435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436/* end confdefs.h. */
4437#ifdef __STDC__
4438# include <limits.h>
4439#else
4440# include <assert.h>
4441#endif
4442 Syntax error
4443_ACEOF
4444if ac_fn_c_try_cpp "$LINENO"; then :
4445
4446else
4447 # Broken: fails on valid input.
4448continue
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452 # OK, works on sane cases. Now check whether nonexistent headers
4453 # can be detected and how.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#include <ac_nonexistent.h>
4457_ACEOF
4458if ac_fn_c_try_cpp "$LINENO"; then :
4459 # Broken: success on invalid input.
4460continue
4461else
4462 # Passes both tests.
4463ac_preproc_ok=:
4464break
4465fi
4466rm -f conftest.err conftest.i conftest.$ac_ext
4467
4468done
4469# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4470rm -f conftest.i conftest.err conftest.$ac_ext
4471if $ac_preproc_ok; then :
4472 break
4473fi
4474
4475 done
4476 ac_cv_prog_CPP=$CPP
4477
4478fi
4479 CPP=$ac_cv_prog_CPP
4480else
4481 ac_cv_prog_CPP=$CPP
4482fi
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4484$as_echo "$CPP" >&6; }
4485ac_preproc_ok=false
4486for ac_c_preproc_warn_flag in '' yes
4487do
4488 # Use a header file that comes with gcc, so configuring glibc
4489 # with a fresh cross-compiler works.
4490 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4491 # <limits.h> exists even on freestanding compilers.
4492 # On the NeXT, cc -E runs the code through the compiler's parser,
4493 # not just through cpp. "Syntax error" is here to catch this case.
4494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495/* end confdefs.h. */
4496#ifdef __STDC__
4497# include <limits.h>
4498#else
4499# include <assert.h>
4500#endif
4501 Syntax error
4502_ACEOF
4503if ac_fn_c_try_cpp "$LINENO"; then :
4504
4505else
4506 # Broken: fails on valid input.
4507continue
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511 # OK, works on sane cases. Now check whether nonexistent headers
4512 # can be detected and how.
4513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4514/* end confdefs.h. */
4515#include <ac_nonexistent.h>
4516_ACEOF
4517if ac_fn_c_try_cpp "$LINENO"; then :
4518 # Broken: success on invalid input.
4519continue
4520else
4521 # Passes both tests.
4522ac_preproc_ok=:
4523break
4524fi
4525rm -f conftest.err conftest.i conftest.$ac_ext
4526
4527done
4528# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4529rm -f conftest.i conftest.err conftest.$ac_ext
4530if $ac_preproc_ok; then :
4531
4532else
4533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4535as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4536See \`config.log' for more details" "$LINENO" 5; }
4537fi
4538
4539ac_ext=c
4540ac_cpp='$CPP $CPPFLAGS'
4541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4543ac_compiler_gnu=$ac_cv_c_compiler_gnu
4544
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4546$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4547if ${ac_cv_path_GREP+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549else
4550 if test -z "$GREP"; then
4551 ac_path_GREP_found=false
4552 # Loop through the user's path and test for each of PROGNAME-LIST
4553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
4558 for ac_prog in grep ggrep; do
4559 for ac_exec_ext in '' $ac_executable_extensions; do
4560 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4561 as_fn_executable_p "$ac_path_GREP" || continue
4562# Check for GNU ac_path_GREP and select it if it is found.
4563 # Check for GNU $ac_path_GREP
4564case `"$ac_path_GREP" --version 2>&1` in
4565*GNU*)
4566 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4567*)
4568 ac_count=0
4569 $as_echo_n 0123456789 >"conftest.in"
4570 while :
4571 do
4572 cat "conftest.in" "conftest.in" >"conftest.tmp"
4573 mv "conftest.tmp" "conftest.in"
4574 cp "conftest.in" "conftest.nl"
4575 $as_echo 'GREP' >> "conftest.nl"
4576 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4577 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4578 as_fn_arith $ac_count + 1 && ac_count=$as_val
4579 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4580 # Best one so far, save it but keep looking for a better one
4581 ac_cv_path_GREP="$ac_path_GREP"
4582 ac_path_GREP_max=$ac_count
4583 fi
4584 # 10*(2^10) chars as input seems more than enough
4585 test $ac_count -gt 10 && break
4586 done
4587 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4588esac
4589
4590 $ac_path_GREP_found && break 3
4591 done
4592 done
4593 done
4594IFS=$as_save_IFS
4595 if test -z "$ac_cv_path_GREP"; then
4596 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4597 fi
4598else
4599 ac_cv_path_GREP=$GREP
4600fi
4601
4602fi
4603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4604$as_echo "$ac_cv_path_GREP" >&6; }
4605 GREP="$ac_cv_path_GREP"
4606
4607
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004608
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609
4610
Matthias Kloseb9621712010-04-24 17:59:49 +00004611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4612$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004614# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004615if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004616 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004617
4618 case $withval in
4619 no) with_cxx_main=no
4620 MAINCC='$(CC)';;
4621 yes) with_cxx_main=yes
4622 MAINCC='$(CXX)';;
4623 *) with_cxx_main=yes
4624 MAINCC=$withval
4625 if test -z "$CXX"
4626 then
4627 CXX=$withval
4628 fi;;
4629 esac
4630else
4631
4632 with_cxx_main=no
4633 MAINCC='$(CC)'
4634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635fi
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4638$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004639
4640preset_cxx="$CXX"
4641if test -z "$CXX"
4642then
4643 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004644 gcc) if test -n "$ac_tool_prefix"; then
4645 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4646set dummy ${ac_tool_prefix}g++; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if ${ac_cv_path_CXX+:} false; then :
4650 $as_echo_n "(cached) " >&6
4651else
4652 case $CXX in
4653 [\\/]* | ?:[\\/]*)
4654 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4655 ;;
4656 *)
4657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in notfound
4659do
4660 IFS=$as_save_IFS
4661 test -z "$as_dir" && as_dir=.
4662 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666 break 2
4667 fi
4668done
4669 done
4670IFS=$as_save_IFS
4671
4672 ;;
4673esac
4674fi
4675CXX=$ac_cv_path_CXX
4676if test -n "$CXX"; then
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4678$as_echo "$CXX" >&6; }
4679else
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685fi
4686if test -z "$ac_cv_path_CXX"; then
4687 ac_pt_CXX=$CXX
4688 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4691$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004692if ${ac_cv_path_ac_pt_CXX+:} false; then :
4693 $as_echo_n "(cached) " >&6
4694else
4695 case $ac_pt_CXX in
4696 [\\/]* | ?:[\\/]*)
4697 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4698 ;;
4699 *)
4700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701for as_dir in notfound
4702do
4703 IFS=$as_save_IFS
4704 test -z "$as_dir" && as_dir=.
4705 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004707 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709 break 2
4710 fi
4711done
4712 done
4713IFS=$as_save_IFS
4714
4715 ;;
4716esac
4717fi
4718ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4719if test -n "$ac_pt_CXX"; then
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4721$as_echo "$ac_pt_CXX" >&6; }
4722else
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
4725fi
4726
4727 if test "x$ac_pt_CXX" = x; then
4728 CXX="g++"
4729 else
4730 case $cross_compiling:$ac_tool_warned in
4731yes:)
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4734ac_tool_warned=yes ;;
4735esac
4736 CXX=$ac_pt_CXX
4737 fi
4738else
4739 CXX="$ac_cv_path_CXX"
4740fi
4741 ;;
4742 cc) if test -n "$ac_tool_prefix"; then
4743 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4744set dummy ${ac_tool_prefix}c++; ac_word=$2
4745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004747if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749else
4750 case $CXX in
4751 [\\/]* | ?:[\\/]*)
4752 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4753 ;;
4754 *)
4755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756for as_dir in notfound
4757do
4758 IFS=$as_save_IFS
4759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004762 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764 break 2
4765 fi
4766done
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004768IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 ;;
4771esac
4772fi
4773CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004774if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4776$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004777else
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004781
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004782
4783fi
4784if test -z "$ac_cv_path_CXX"; then
4785 ac_pt_CXX=$CXX
4786 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004790if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795 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 +00004796 ;;
4797 *)
4798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in notfound
4800do
4801 IFS=$as_save_IFS
4802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807 break 2
4808 fi
4809done
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004811IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 ;;
4814esac
4815fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4817if test -n "$ac_pt_CXX"; then
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4819$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820else
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004824
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 if test "x$ac_pt_CXX" = x; then
4826 CXX="c++"
4827 else
4828 case $cross_compiling:$ac_tool_warned in
4829yes:)
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4832ac_tool_warned=yes ;;
4833esac
4834 CXX=$ac_pt_CXX
4835 fi
4836else
4837 CXX="$ac_cv_path_CXX"
4838fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840 clang|*/clang) if test -n "$ac_tool_prefix"; then
4841 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4842set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4844$as_echo_n "checking for $ac_word... " >&6; }
4845if ${ac_cv_path_CXX+:} false; then :
4846 $as_echo_n "(cached) " >&6
4847else
4848 case $CXX in
4849 [\\/]* | ?:[\\/]*)
4850 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4851 ;;
4852 *)
4853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4854for as_dir in notfound
4855do
4856 IFS=$as_save_IFS
4857 test -z "$as_dir" && as_dir=.
4858 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004860 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4862 break 2
4863 fi
4864done
4865 done
4866IFS=$as_save_IFS
4867
Ned Deilycbfb9a52012-06-23 16:02:19 -07004868 ;;
4869esac
4870fi
4871CXX=$ac_cv_path_CXX
4872if test -n "$CXX"; then
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4874$as_echo "$CXX" >&6; }
4875else
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880
4881fi
4882if test -z "$ac_cv_path_CXX"; then
4883 ac_pt_CXX=$CXX
4884 # Extract the first word of "clang++", so it can be a program name with args.
4885set dummy clang++; ac_word=$2
4886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887$as_echo_n "checking for $ac_word... " >&6; }
4888if ${ac_cv_path_ac_pt_CXX+:} false; then :
4889 $as_echo_n "(cached) " >&6
4890else
4891 case $ac_pt_CXX in
4892 [\\/]* | ?:[\\/]*)
4893 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4894 ;;
4895 *)
4896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in notfound
4898do
4899 IFS=$as_save_IFS
4900 test -z "$as_dir" && as_dir=.
4901 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004903 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905 break 2
4906 fi
4907done
4908 done
4909IFS=$as_save_IFS
4910
4911 ;;
4912esac
4913fi
4914ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4915if test -n "$ac_pt_CXX"; then
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4917$as_echo "$ac_pt_CXX" >&6; }
4918else
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4920$as_echo "no" >&6; }
4921fi
4922
4923 if test "x$ac_pt_CXX" = x; then
4924 CXX="clang++"
4925 else
4926 case $cross_compiling:$ac_tool_warned in
4927yes:)
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4929$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4930ac_tool_warned=yes ;;
4931esac
4932 CXX=$ac_pt_CXX
4933 fi
4934else
4935 CXX="$ac_cv_path_CXX"
4936fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004937 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004938 esac
4939 if test "$CXX" = "notfound"
4940 then
4941 CXX=""
4942 fi
4943fi
4944if test -z "$CXX"
4945then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004946 if test -n "$ac_tool_prefix"; then
4947 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4948 do
4949 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4950set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004953if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004954 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004955else
4956 if test -n "$CXX"; then
4957 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004966 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004968 break 2
4969 fi
4970done
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004972IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004973
4974fi
4975fi
4976CXX=$ac_cv_prog_CXX
4977if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4979$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004983fi
4984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004986 test -n "$CXX" && break
4987 done
4988fi
4989if test -z "$CXX"; then
4990 ac_ct_CXX=$CXX
4991 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4992do
4993 # Extract the first word of "$ac_prog", so it can be a program name with args.
4994set dummy $ac_prog; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 if test -n "$ac_ct_CXX"; then
5001 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5002else
5003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5004for as_dir in $PATH
5005do
5006 IFS=$as_save_IFS
5007 test -z "$as_dir" && as_dir=.
5008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005010 ac_cv_prog_ac_ct_CXX="$ac_prog"
5011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5012 break 2
5013 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005014done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005015 done
5016IFS=$as_save_IFS
5017
5018fi
5019fi
5020ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5021if test -n "$ac_ct_CXX"; then
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5023$as_echo "$ac_ct_CXX" >&6; }
5024else
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026$as_echo "no" >&6; }
5027fi
5028
5029
5030 test -n "$ac_ct_CXX" && break
5031done
5032
5033 if test "x$ac_ct_CXX" = x; then
5034 CXX="notfound"
5035 else
5036 case $cross_compiling:$ac_tool_warned in
5037yes:)
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5040ac_tool_warned=yes ;;
5041esac
5042 CXX=$ac_ct_CXX
5043 fi
5044fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045
5046 if test "$CXX" = "notfound"
5047 then
5048 CXX=""
5049 fi
5050fi
5051if test "$preset_cxx" != "$CXX"
5052then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005053 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054
5055 By default, distutils will build C++ extension modules with \"$CXX\".
5056 If this is not intended, then set CXX on the configure command line.
5057 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005058$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059
5060 By default, distutils will build C++ extension modules with \"$CXX\".
5061 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005062 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063fi
5064
5065
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005066MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5067
5068
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5070$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5071cat >> conftest.c <<EOF
5072#undef linux
5073#undef i386
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005074#undef powerpc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005075#undef unix
5076#if defined(__linux__)
5077# if defined(__x86_64__) && defined(__LP64__)
5078 x86_64-linux-gnu
5079# elif defined(__x86_64__) && defined(__ILP32__)
5080 x86_64-linux-gnux32
5081# elif defined(__i386__)
5082 i386-linux-gnu
5083# elif defined(__aarch64__) && defined(__AARCH64EL__)
5084# if defined(__ILP32__)
5085 aarch64_ilp32-linux-gnu
5086# else
5087 aarch64-linux-gnu
5088# endif
5089# elif defined(__aarch64__) && defined(__AARCH64EB__)
5090# if defined(__ILP32__)
5091 aarch64_be_ilp32-linux-gnu
5092# else
5093 aarch64_be-linux-gnu
5094# endif
5095# elif defined(__alpha__)
5096 alpha-linux-gnu
5097# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5098# if defined(__ARMEL__)
5099 arm-linux-gnueabihf
5100# else
5101 armeb-linux-gnueabihf
5102# endif
5103# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5104# if defined(__ARMEL__)
5105 arm-linux-gnueabi
5106# else
5107 armeb-linux-gnueabi
5108# endif
5109# elif defined(__hppa__)
5110 hppa-linux-gnu
5111# elif defined(__ia64__)
5112 ia64-linux-gnu
5113# elif defined(__m68k__) && !defined(__mcoldfire__)
5114 m68k-linux-gnu
5115# elif defined(__mips_hard_float) && defined(_MIPSEL)
5116# if _MIPS_SIM == _ABIO32
5117 mipsel-linux-gnu
5118# elif _MIPS_SIM == _ABIN32
5119 mips64el-linux-gnuabin32
5120# elif _MIPS_SIM == _ABI64
5121 mips64el-linux-gnuabi64
5122# else
5123# error unknown platform triplet
5124# endif
5125# elif defined(__mips_hard_float)
5126# if _MIPS_SIM == _ABIO32
5127 mips-linux-gnu
5128# elif _MIPS_SIM == _ABIN32
5129 mips64-linux-gnuabin32
5130# elif _MIPS_SIM == _ABI64
5131 mips64-linux-gnuabi64
5132# else
5133# error unknown platform triplet
5134# endif
5135# elif defined(__or1k__)
5136 or1k-linux-gnu
5137# elif defined(__powerpc__) && defined(__SPE__)
5138 powerpc-linux-gnuspe
5139# elif defined(__powerpc64__)
5140# if defined(__LITTLE_ENDIAN__)
5141 powerpc64le-linux-gnu
5142# else
5143 powerpc64-linux-gnu
5144# endif
5145# elif defined(__powerpc__)
5146 powerpc-linux-gnu
5147# elif defined(__s390x__)
5148 s390x-linux-gnu
5149# elif defined(__s390__)
5150 s390-linux-gnu
5151# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5152 sh4-linux-gnu
5153# elif defined(__sparc__) && defined(__arch64__)
5154 sparc64-linux-gnu
5155# elif defined(__sparc__)
5156 sparc-linux-gnu
5157# else
5158# error unknown platform triplet
5159# endif
5160#elif defined(__FreeBSD_kernel__)
5161# if defined(__LP64__)
5162 x86_64-kfreebsd-gnu
5163# elif defined(__i386__)
5164 i386-kfreebsd-gnu
5165# else
5166# error unknown platform triplet
5167# endif
5168#elif defined(__gnu_hurd__)
5169 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005170#elif defined(__APPLE__)
5171 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005172#else
5173# error unknown platform triplet
5174#endif
5175
5176EOF
5177
5178if $CPP conftest.c >conftest.out 2>/dev/null; then
5179 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5181$as_echo "$PLATFORM_TRIPLET" >&6; }
5182else
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5184$as_echo "none" >&6; }
5185fi
5186rm -f conftest.c conftest.out
5187
5188if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5189 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5190 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5191 fi
5192fi
5193PLATDIR=plat-$MACHDEP
5194
5195
5196
5197
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5199$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5200save_LDFLAGS="$LDFLAGS"
5201LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005202
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204/* end confdefs.h. */
5205
5206int
5207main ()
5208{
5209
5210 ;
5211 return 0;
5212}
5213_ACEOF
5214if ac_fn_c_try_link "$LINENO"; then :
5215 NO_AS_NEEDED="-Wl,--no-as-needed"
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5217$as_echo "yes" >&6; }
5218else
5219 NO_AS_NEEDED=""
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221$as_echo "no" >&6; }
5222fi
5223rm -f core conftest.err conftest.$ac_objext \
5224 conftest$ac_exeext conftest.$ac_ext
5225LDFLAGS="$save_LDFLAGS"
5226
5227
5228
5229# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005230
Matthias Kloseb9621712010-04-24 17:59:49 +00005231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5232$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005233if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005234 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005235else
5236 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5237 then ac_cv_path_EGREP="$GREP -E"
5238 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005239 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005240 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005241 # Loop through the user's path and test for each of PROGNAME-LIST
5242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005243for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5244do
5245 IFS=$as_save_IFS
5246 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005247 for ac_prog in egrep; do
5248 for ac_exec_ext in '' $ac_executable_extensions; do
5249 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005250 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005251# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005252 # Check for GNU $ac_path_EGREP
5253case `"$ac_path_EGREP" --version 2>&1` in
5254*GNU*)
5255 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5256*)
5257 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005258 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005259 while :
5260 do
5261 cat "conftest.in" "conftest.in" >"conftest.tmp"
5262 mv "conftest.tmp" "conftest.in"
5263 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005264 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005265 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5266 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005267 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005268 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5269 # Best one so far, save it but keep looking for a better one
5270 ac_cv_path_EGREP="$ac_path_EGREP"
5271 ac_path_EGREP_max=$ac_count
5272 fi
5273 # 10*(2^10) chars as input seems more than enough
5274 test $ac_count -gt 10 && break
5275 done
5276 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5277esac
5278
Matthias Kloseb9621712010-04-24 17:59:49 +00005279 $ac_path_EGREP_found && break 3
5280 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005281 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005282 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005283IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005284 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005285 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 +00005286 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005287else
5288 ac_cv_path_EGREP=$EGREP
5289fi
5290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005291 fi
5292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5294$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005295 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005296
5297
Matthias Kloseb9621712010-04-24 17:59:49 +00005298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5299$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005300if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005301 $as_echo_n "(cached) " >&6
5302else
5303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005304/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005305#include <stdlib.h>
5306#include <stdarg.h>
5307#include <string.h>
5308#include <float.h>
5309
5310int
5311main ()
5312{
5313
5314 ;
5315 return 0;
5316}
5317_ACEOF
5318if ac_fn_c_try_compile "$LINENO"; then :
5319 ac_cv_header_stdc=yes
5320else
5321 ac_cv_header_stdc=no
5322fi
5323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5324
5325if test $ac_cv_header_stdc = yes; then
5326 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5328/* end confdefs.h. */
5329#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005330
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005331_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005333 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005335else
Matthias Kloseb9621712010-04-24 17:59:49 +00005336 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005337fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005338rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339
Matthias Kloseb9621712010-04-24 17:59:49 +00005340fi
5341
5342if test $ac_cv_header_stdc = yes; then
5343 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5345/* end confdefs.h. */
5346#include <stdlib.h>
5347
5348_ACEOF
5349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5350 $EGREP "free" >/dev/null 2>&1; then :
5351
5352else
5353 ac_cv_header_stdc=no
5354fi
5355rm -f conftest*
5356
5357fi
5358
5359if test $ac_cv_header_stdc = yes; then
5360 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5361 if test "$cross_compiling" = yes; then :
5362 :
5363else
5364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5365/* end confdefs.h. */
5366#include <ctype.h>
5367#include <stdlib.h>
5368#if ((' ' & 0x0FF) == 0x020)
5369# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5370# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5371#else
5372# define ISLOWER(c) \
5373 (('a' <= (c) && (c) <= 'i') \
5374 || ('j' <= (c) && (c) <= 'r') \
5375 || ('s' <= (c) && (c) <= 'z'))
5376# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5377#endif
5378
5379#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5380int
5381main ()
5382{
5383 int i;
5384 for (i = 0; i < 256; i++)
5385 if (XOR (islower (i), ISLOWER (i))
5386 || toupper (i) != TOUPPER (i))
5387 return 2;
5388 return 0;
5389}
5390_ACEOF
5391if ac_fn_c_try_run "$LINENO"; then :
5392
5393else
5394 ac_cv_header_stdc=no
5395fi
5396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5397 conftest.$ac_objext conftest.beam conftest.$ac_ext
5398fi
5399
5400fi
5401fi
5402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5403$as_echo "$ac_cv_header_stdc" >&6; }
5404if test $ac_cv_header_stdc = yes; then
5405
5406$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5407
5408fi
5409
5410# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5411for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5412 inttypes.h stdint.h unistd.h
5413do :
5414 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5415ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5416"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005417if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 cat >>confdefs.h <<_ACEOF
5419#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5420_ACEOF
5421
5422fi
5423
5424done
5425
5426
5427
5428 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 +02005429if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 MINIX=yes
5431else
5432 MINIX=
5433fi
5434
5435
5436 if test "$MINIX" = yes; then
5437
5438$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5439
5440
5441$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5442
5443
5444$as_echo "#define _MINIX 1" >>confdefs.h
5445
5446 fi
5447
5448
5449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5450$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005451if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 $as_echo_n "(cached) " >&6
5453else
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5455/* end confdefs.h. */
5456
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005457# define __EXTENSIONS__ 1
5458 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005459int
5460main ()
5461{
5462
5463 ;
5464 return 0;
5465}
5466_ACEOF
5467if ac_fn_c_try_compile "$LINENO"; then :
5468 ac_cv_safe_to_define___extensions__=yes
5469else
5470 ac_cv_safe_to_define___extensions__=no
5471fi
5472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5473fi
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5475$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5476 test $ac_cv_safe_to_define___extensions__ = yes &&
5477 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5478
5479 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5480
5481 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5482
5483 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5484
5485 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5486
5487
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489# Check for unsupported systems
5490case $ac_sys_system/$ac_sys_release in
5491atheos*|Linux*/1*)
5492 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5493 echo See README for details.
5494 exit 1;;
5495esac
5496
5497
Matthias Kloseb9621712010-04-24 17:59:49 +00005498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5499$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
5501# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005502if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503 withval=$with_suffix;
5504 case $withval in
5505 no) EXEEXT=;;
5506 yes) EXEEXT=.exe;;
5507 *) EXEEXT=$withval;;
5508 esac
5509fi
5510
Matthias Kloseb9621712010-04-24 17:59:49 +00005511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5512$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513
5514# Test whether we're running on a non-case-sensitive system, in which
5515# case we give a warning if no ext is given
5516
Matthias Kloseb9621712010-04-24 17:59:49 +00005517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5518$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519if test ! -d CaseSensitiveTestDir; then
5520mkdir CaseSensitiveTestDir
5521fi
5522
5523if test -d casesensitivetestdir
5524then
Matthias Kloseb9621712010-04-24 17:59:49 +00005525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5526$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527 BUILDEXEEXT=.exe
5528else
Matthias Kloseb9621712010-04-24 17:59:49 +00005529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531 BUILDEXEEXT=$EXEEXT
5532fi
5533rmdir CaseSensitiveTestDir
5534
5535case $MACHDEP in
5536bsdos*)
5537 case $CC in
5538 gcc) CC="$CC -D_HAVE_BSDI";;
5539 esac;;
5540esac
5541
5542case $ac_sys_system in
5543hp*|HP*)
5544 case $CC in
5545 cc|*/cc) CC="$CC -Ae";;
5546 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547esac
5548
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549
Matthias Kloseb9621712010-04-24 17:59:49 +00005550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5551$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552if test -z "$LIBRARY"
5553then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005554 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5557$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558
5559# LDLIBRARY is the name of the library to link against (as opposed to the
5560# name of the library into which to insert object files). BLDLIBRARY is also
5561# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5562# is blank as the main program is not linked directly against LDLIBRARY.
5563# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5564# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5565# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5566# DLLLIBRARY is the shared (i.e., DLL) library.
5567#
5568# RUNSHARED is used to run shared python without installed libraries
5569#
5570# INSTSONAME is the name of the shared library that will be use to install
5571# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005572#
5573# LDVERSION is the shared library version number, normally the Python version
5574# with the ABI build flags appended.
5575
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576
5577
5578
5579
5580
5581
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583LDLIBRARY="$LIBRARY"
5584BLDLIBRARY='$(LDLIBRARY)'
5585INSTSONAME='$(LDLIBRARY)'
5586DLLLIBRARY=''
5587LDLIBRARYDIR=''
5588RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005589LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
5591# LINKCC is the command that links the python executable -- default is $(CC).
5592# If CXX is set, and if it is needed to link a main function that was
5593# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5594# python might then depend on the C++ runtime
5595# This is altered for AIX in order to build the export list before
5596# linking.
5597
Matthias Kloseb9621712010-04-24 17:59:49 +00005598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5599$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600if test -z "$LINKCC"
5601then
5602 LINKCC='$(PURIFY) $(MAINCC)'
5603 case $ac_sys_system in
5604 AIX*)
5605 exp_extra="\"\""
5606 if test $ac_sys_release -ge 5 -o \
5607 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5608 exp_extra="."
5609 fi
5610 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 QNX*)
5612 # qcc must be used because the other compilers do not
5613 # support -N.
5614 LINKCC=qcc;;
5615 esac
5616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5618$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619
5620# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5621# make sure we default having it set to "no": this is used by
5622# distutils.unixccompiler to know if it should add --enable-new-dtags
5623# to linker command lines, and failing to detect GNU ld simply results
5624# in the same bahaviour as before.
5625
Matthias Kloseb9621712010-04-24 17:59:49 +00005626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5627$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628ac_prog=ld
5629if test "$GCC" = yes; then
5630 ac_prog=`$CC -print-prog-name=ld`
5631fi
5632case `"$ac_prog" -V 2>&1 < /dev/null` in
5633 *GNU*)
5634 GNULD=yes;;
5635 *)
5636 GNULD=no;;
5637esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5639$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5642$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005643if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005644 $as_echo_n "(cached) " >&6
5645else
5646 ac_cv_c_inline=no
5647for ac_kw in inline __inline__ __inline; do
5648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5649/* end confdefs.h. */
5650#ifndef __cplusplus
5651typedef int foo_t;
5652static $ac_kw foo_t static_foo () {return 0; }
5653$ac_kw foo_t foo () {return 0; }
5654#endif
5655
5656_ACEOF
5657if ac_fn_c_try_compile "$LINENO"; then :
5658 ac_cv_c_inline=$ac_kw
5659fi
5660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5661 test "$ac_cv_c_inline" != no && break
5662done
5663
5664fi
5665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5666$as_echo "$ac_cv_c_inline" >&6; }
5667
5668case $ac_cv_c_inline in
5669 inline | yes) ;;
5670 *)
5671 case $ac_cv_c_inline in
5672 no) ac_val=;;
5673 *) ac_val=$ac_cv_c_inline;;
5674 esac
5675 cat >>confdefs.h <<_ACEOF
5676#ifndef __cplusplus
5677#define inline $ac_val
5678#endif
5679_ACEOF
5680 ;;
5681esac
5682
5683if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005684
5685$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005686
5687
5688fi
5689
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5692$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005694if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695 enableval=$enable_shared;
5696fi
5697
5698
5699if test -z "$enable_shared"
5700then
5701 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005702 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 enable_shared="yes";;
5704 *)
5705 enable_shared="no";;
5706 esac
5707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5709$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5712$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005714if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005715 enableval=$enable_profiling;
5716fi
5717
5718if test "x$enable_profiling" = xyes; then
5719 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005720 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722/* end confdefs.h. */
5723int main() { return 0; }
5724_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005725if ac_fn_c_try_link "$LINENO"; then :
5726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005728 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005730rm -f core conftest.err conftest.$ac_objext \
5731 conftest$ac_exeext conftest.$ac_ext
5732 CC="$ac_save_cc"
5733else
5734 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5737$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
doko@ubuntu.comba015832012-06-30 16:52:05 +02005739if test "x$enable_profiling" = xyes; then
5740 BASECFLAGS="-pg $BASECFLAGS"
5741 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
5743
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5745$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5748# library that we build, but we do not want to link against it (we
5749# will find it with a -framework option). For this reason there is an
5750# extra variable BLDLIBRARY against which Python and the extension
5751# modules are linked, BLDLIBRARY. This is normally the same as
5752# LDLIBRARY, but empty for MacOSX framework builds.
5753if test "$enable_framework"
5754then
5755 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005756 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 BLDLIBRARY=''
5758else
5759 BLDLIBRARY='$(LDLIBRARY)'
5760fi
5761
5762# Other platforms follow
5763if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005764 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767
5768 case $ac_sys_system in
5769 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005770 LDLIBRARY='libpython$(LDVERSION).dll.a'
5771 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772 ;;
5773 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005774 LDLIBRARY='libpython$(LDVERSION).so'
5775 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005776 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005778 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005779 then
5780 PY3LIBRARY=libpython3.so
5781 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005783 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005784 LDLIBRARY='libpython$(LDVERSION).so'
5785 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005786 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005788 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005789 then
5790 PY3LIBRARY=libpython3.so
5791 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 ;;
5793 hp*|HP*)
5794 case `uname -m` in
5795 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005796 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 ;;
5798 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005799 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 ;;
5801 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005802 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005803 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005806 LDLIBRARY='libpython$(LDVERSION).dylib'
5807 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005808 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005810 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005811 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005812 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005813 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814
5815 esac
5816else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005817 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 case $ac_sys_system in
5819 CYGWIN*)
5820 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005821 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 ;;
5823 esac
5824fi
5825
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005826if test "$cross_compiling" = yes; then
5827 RUNSHARED=
5828fi
5829
Matthias Kloseb9621712010-04-24 17:59:49 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5831$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832
5833if test -n "$ac_tool_prefix"; then
5834 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5835set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005838if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840else
5841 if test -n "$RANLIB"; then
5842 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5843else
5844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847 IFS=$as_save_IFS
5848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853 break 2
5854 fi
5855done
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857IFS=$as_save_IFS
5858
5859fi
5860fi
5861RANLIB=$ac_cv_prog_RANLIB
5862if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5864$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865else
Matthias Kloseb9621712010-04-24 17:59:49 +00005866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868fi
5869
5870
5871fi
5872if test -z "$ac_cv_prog_RANLIB"; then
5873 ac_ct_RANLIB=$RANLIB
5874 # Extract the first word of "ranlib", so it can be a program name with args.
5875set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5877$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005878if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005879 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880else
5881 if test -n "$ac_ct_RANLIB"; then
5882 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5883else
5884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5885for as_dir in $PATH
5886do
5887 IFS=$as_save_IFS
5888 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005889 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 break 2
5894 fi
5895done
Matthias Kloseb9621712010-04-24 17:59:49 +00005896 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897IFS=$as_save_IFS
5898
5899fi
5900fi
5901ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5902if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5904$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905else
Matthias Kloseb9621712010-04-24 17:59:49 +00005906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5907$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908fi
5909
5910 if test "x$ac_ct_RANLIB" = x; then
5911 RANLIB=":"
5912 else
5913 case $cross_compiling:$ac_tool_warned in
5914yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005915{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5916$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917ac_tool_warned=yes ;;
5918esac
5919 RANLIB=$ac_ct_RANLIB
5920 fi
5921else
5922 RANLIB="$ac_cv_prog_RANLIB"
5923fi
5924
5925
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005926if test -n "$ac_tool_prefix"; then
5927 for ac_prog in ar aal
5928 do
5929 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5932$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005933if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005934 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935else
5936 if test -n "$AR"; then
5937 ac_cv_prog_AR="$AR" # Let the user override the test.
5938else
5939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5940for as_dir in $PATH
5941do
5942 IFS=$as_save_IFS
5943 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005946 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 break 2
5949 fi
5950done
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952IFS=$as_save_IFS
5953
5954fi
5955fi
5956AR=$ac_cv_prog_AR
5957if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5959$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960else
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963fi
5964
5965
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005966 test -n "$AR" && break
5967 done
5968fi
5969if test -z "$AR"; then
5970 ac_ct_AR=$AR
5971 for ac_prog in ar aal
5972do
5973 # Extract the first word of "$ac_prog", so it can be a program name with args.
5974set dummy $ac_prog; ac_word=$2
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976$as_echo_n "checking for $ac_word... " >&6; }
5977if ${ac_cv_prog_ac_ct_AR+:} false; then :
5978 $as_echo_n "(cached) " >&6
5979else
5980 if test -n "$ac_ct_AR"; then
5981 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5982else
5983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986 IFS=$as_save_IFS
5987 test -z "$as_dir" && as_dir=.
5988 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005990 ac_cv_prog_ac_ct_AR="$ac_prog"
5991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992 break 2
5993 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005995 done
5996IFS=$as_save_IFS
5997
5998fi
5999fi
6000ac_ct_AR=$ac_cv_prog_ac_ct_AR
6001if test -n "$ac_ct_AR"; then
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6003$as_echo "$ac_ct_AR" >&6; }
6004else
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010 test -n "$ac_ct_AR" && break
6011done
6012
6013 if test "x$ac_ct_AR" = x; then
6014 AR="ar"
6015 else
6016 case $cross_compiling:$ac_tool_warned in
6017yes:)
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6020ac_tool_warned=yes ;;
6021esac
6022 AR=$ac_ct_AR
6023 fi
6024fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025
6026
6027# tweak ARFLAGS only if the user didn't set it on the command line
6028
6029if test -z "$ARFLAGS"
6030then
6031 ARFLAGS="rc"
6032fi
6033
doko@ubuntu.com58844492012-06-30 18:25:32 +02006034if test -n "$ac_tool_prefix"; then
6035 for ac_prog in readelf
6036 do
6037 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6038set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6040$as_echo_n "checking for $ac_word... " >&6; }
6041if ${ac_cv_prog_READELF+:} false; then :
6042 $as_echo_n "(cached) " >&6
6043else
6044 if test -n "$READELF"; then
6045 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6046else
6047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050 IFS=$as_save_IFS
6051 test -z "$as_dir" && as_dir=.
6052 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006054 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6056 break 2
6057 fi
6058done
6059 done
6060IFS=$as_save_IFS
6061
6062fi
6063fi
6064READELF=$ac_cv_prog_READELF
6065if test -n "$READELF"; then
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6067$as_echo "$READELF" >&6; }
6068else
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070$as_echo "no" >&6; }
6071fi
6072
6073
6074 test -n "$READELF" && break
6075 done
6076fi
6077if test -z "$READELF"; then
6078 ac_ct_READELF=$READELF
6079 for ac_prog in readelf
6080do
6081 # Extract the first word of "$ac_prog", so it can be a program name with args.
6082set dummy $ac_prog; ac_word=$2
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6084$as_echo_n "checking for $ac_word... " >&6; }
6085if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6086 $as_echo_n "(cached) " >&6
6087else
6088 if test -n "$ac_ct_READELF"; then
6089 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6090else
6091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6092for as_dir in $PATH
6093do
6094 IFS=$as_save_IFS
6095 test -z "$as_dir" && as_dir=.
6096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006098 ac_cv_prog_ac_ct_READELF="$ac_prog"
6099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6100 break 2
6101 fi
6102done
6103 done
6104IFS=$as_save_IFS
6105
6106fi
6107fi
6108ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6109if test -n "$ac_ct_READELF"; then
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6111$as_echo "$ac_ct_READELF" >&6; }
6112else
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6114$as_echo "no" >&6; }
6115fi
6116
6117
6118 test -n "$ac_ct_READELF" && break
6119done
6120
6121 if test "x$ac_ct_READELF" = x; then
6122 READELF=":"
6123 else
6124 case $cross_compiling:$ac_tool_warned in
6125yes:)
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6128ac_tool_warned=yes ;;
6129esac
6130 READELF=$ac_ct_READELF
6131 fi
6132fi
6133
6134if test "$cross_compiling" = yes; then
6135 case "$READELF" in
6136 readelf|:)
6137 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6138 ;;
6139 esac
6140fi
6141
6142
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143
Matthias Klosec4c48422012-10-21 23:05:35 +02006144for ac_prog in python$PACKAGE_VERSION python3 python
6145do
6146 # Extract the first word of "$ac_prog", so it can be a program name with args.
6147set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6149$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006150if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006151 $as_echo_n "(cached) " >&6
6152else
Matthias Klosec4c48422012-10-21 23:05:35 +02006153 if test -n "$PYTHON"; then
6154 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006155else
6156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157for as_dir in $PATH
6158do
6159 IFS=$as_save_IFS
6160 test -z "$as_dir" && as_dir=.
6161 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006162 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006163 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6165 break 2
6166 fi
6167done
6168 done
6169IFS=$as_save_IFS
6170
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006171fi
6172fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006173PYTHON=$ac_cv_prog_PYTHON
6174if test -n "$PYTHON"; then
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6176$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006177else
6178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6179$as_echo "no" >&6; }
6180fi
6181
6182
Matthias Klosec4c48422012-10-21 23:05:35 +02006183 test -n "$PYTHON" && break
6184done
6185test -n "$PYTHON" || PYTHON="not-found"
6186
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006187if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006188 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6189else
6190 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006191fi
6192
6193
Kushal Das02d23a22014-04-15 23:50:06 +05306194for ac_prog in python$PACKAGE_VERSION python3 python
6195do
6196 # Extract the first word of "$ac_prog", so it can be a program name with args.
6197set dummy $ac_prog; ac_word=$2
6198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6199$as_echo_n "checking for $ac_word... " >&6; }
6200if ${ac_cv_prog_PYTHON+:} false; then :
6201 $as_echo_n "(cached) " >&6
6202else
6203 if test -n "$PYTHON"; then
6204 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6205else
6206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6207for as_dir in $PATH
6208do
6209 IFS=$as_save_IFS
6210 test -z "$as_dir" && as_dir=.
6211 for ac_exec_ext in '' $ac_executable_extensions; do
6212 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6213 ac_cv_prog_PYTHON="$ac_prog"
6214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6215 break 2
6216 fi
6217done
6218 done
6219IFS=$as_save_IFS
6220
6221fi
6222fi
6223PYTHON=$ac_cv_prog_PYTHON
6224if test -n "$PYTHON"; then
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6226$as_echo "$PYTHON" >&6; }
6227else
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229$as_echo "no" >&6; }
6230fi
6231
6232
6233 test -n "$PYTHON" && break
6234done
6235test -n "$PYTHON" || PYTHON="not-found"
6236
6237if test "$PYTHON" = not-found; then
6238 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6239else
6240 OPCODEHGEN="$PYTHON"
6241fi
6242
6243
6244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245case $MACHDEP in
6246bsdos*|hp*|HP*)
6247 # install -d does not work on BSDI or HP-UX
6248 if test -z "$INSTALL"
6249 then
6250 INSTALL="${srcdir}/install-sh -c"
6251 fi
6252esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253# Find a good install program. We prefer a C program (faster),
6254# so one script is as good as another. But avoid the broken or
6255# incompatible versions:
6256# SysV /etc/install, /usr/sbin/install
6257# SunOS /usr/etc/install
6258# IRIX /sbin/install
6259# AIX /bin/install
6260# AmigaOS /C/install, which installs bootblocks on floppy discs
6261# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6262# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6263# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6264# OS/2's system install, which has a completely different semantic
6265# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006266# Reject install programs that cannot install multiple files.
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6268$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006270if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006271 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272else
6273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274for as_dir in $PATH
6275do
6276 IFS=$as_save_IFS
6277 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 # Account for people who put trailing slashes in PATH elements.
6279case $as_dir/ in #((
6280 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006282 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283 /usr/ucb/* ) ;;
6284 *)
6285 # OSF1 and SCO ODT 3.0 have their own names for install.
6286 # Don't use installbsd from OSF since it installs stuff as root
6287 # by default.
6288 for ac_prog in ginstall scoinst install; do
6289 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006290 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291 if test $ac_prog = install &&
6292 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6293 # AIX install. It has an incompatible calling convention.
6294 :
6295 elif test $ac_prog = install &&
6296 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6297 # program-specific install script used by HP pwplus--don't use.
6298 :
6299 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006300 rm -rf conftest.one conftest.two conftest.dir
6301 echo one > conftest.one
6302 echo two > conftest.two
6303 mkdir conftest.dir
6304 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6305 test -s conftest.one && test -s conftest.two &&
6306 test -s conftest.dir/conftest.one &&
6307 test -s conftest.dir/conftest.two
6308 then
6309 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6310 break 3
6311 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312 fi
6313 fi
6314 done
6315 done
6316 ;;
6317esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006318
6319 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320IFS=$as_save_IFS
6321
Matthias Kloseb9621712010-04-24 17:59:49 +00006322rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323
6324fi
6325 if test "${ac_cv_path_install+set}" = set; then
6326 INSTALL=$ac_cv_path_install
6327 else
6328 # As a last resort, use the slow shell script. Don't cache a
6329 # value for INSTALL within a source directory, because that will
6330 # break other packages using the cache if that directory is
6331 # removed, or if the value is a relative name.
6332 INSTALL=$ac_install_sh
6333 fi
6334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6336$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337
6338# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6339# It thinks the first close brace ends the variable substitution.
6340test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6341
6342test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6343
6344test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6345
Matthias Klose93a0ef12012-03-15 18:08:34 +01006346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6347$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6348if test -z "$MKDIR_P"; then
6349 if ${ac_cv_path_mkdir+:} false; then :
6350 $as_echo_n "(cached) " >&6
6351else
6352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6353for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6354do
6355 IFS=$as_save_IFS
6356 test -z "$as_dir" && as_dir=.
6357 for ac_prog in mkdir gmkdir; do
6358 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006359 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006360 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6361 'mkdir (GNU coreutils) '* | \
6362 'mkdir (coreutils) '* | \
6363 'mkdir (fileutils) '4.1*)
6364 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6365 break 3;;
6366 esac
6367 done
6368 done
6369 done
6370IFS=$as_save_IFS
6371
6372fi
6373
6374 test -d ./--version && rmdir ./--version
6375 if test "${ac_cv_path_mkdir+set}" = set; then
6376 MKDIR_P="$ac_cv_path_mkdir -p"
6377 else
6378 # As a last resort, use the slow shell script. Don't cache a
6379 # value for MKDIR_P within a source directory, because that will
6380 # break other packages using the cache if that directory is
6381 # removed, or if the value is a relative name.
6382 MKDIR_P="$ac_install_sh -d"
6383 fi
6384fi
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6386$as_echo "$MKDIR_P" >&6; }
6387
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388
6389# Not every filesystem supports hard links
6390
6391if test -z "$LN" ; then
6392 case $ac_sys_system in
6393 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006394 *) LN=ln;;
6395 esac
6396fi
6397
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006398# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006399
6400ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006401
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006402# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6404$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405
6406# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006407if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408 withval=$with_pydebug;
6409if test "$withval" != no
6410then
6411
Matthias Kloseb9621712010-04-24 17:59:49 +00006412$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413
Matthias Kloseb9621712010-04-24 17:59:49 +00006414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006417 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006418else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420fi
6421else
Matthias Kloseb9621712010-04-24 17:59:49 +00006422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424fi
6425
6426
6427# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6428# merged with this chunk of code?
6429
6430# Optimizer/debugger flags
6431# ------------------------
6432# (The following bit of code is complicated enough - please keep things
6433# indented properly. Just pretend you're editing Python code. ;-)
6434
6435# There are two parallel sets of case statements below, one that checks to
6436# see if OPT was set and one that does BASECFLAGS setting based upon
6437# compiler and platform. BASECFLAGS tweaks need to be made even if the
6438# user set OPT.
6439
6440# tweak OPT based on compiler and platform, only if the user didn't set
6441# it on the command line
6442
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006443if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444then
6445 case $GCC in
6446 yes)
6447 if test "$CC" != 'g++' ; then
6448 STRICT_PROTO="-Wstrict-prototypes"
6449 fi
6450 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6451 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6452 WRAP="-fwrapv"
6453 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006454
6455 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006456 case $CC in
6457 *clang*) WRAP="-fwrapv"
6458 ;;
6459 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006460
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006461 case $ac_cv_prog_cc_g in
6462 yes)
6463 if test "$Py_DEBUG" = 'true' ; then
6464 # Optimization messes up debuggers, so turn it off for
6465 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006466 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6467 OPT="-g -Og -Wall $STRICT_PROTO"
6468 else
6469 OPT="-g -O0 -Wall $STRICT_PROTO"
6470 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006471 else
6472 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6473 fi
6474 ;;
6475 *)
6476 OPT="-O3 -Wall $STRICT_PROTO"
6477 ;;
6478 esac
6479 case $ac_sys_system in
6480 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6481 ;;
6482 esac
6483 ;;
6484
6485 *)
6486 OPT="-O"
6487 ;;
6488 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006489fi
6490
6491
6492
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006493
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494# The -arch flags for universal builds on OSX
6495UNIVERSAL_ARCH_FLAGS=
6496
6497
6498# tweak BASECFLAGS based on compiler and platform
6499case $GCC in
6500yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006501 # Python doesn't violate C99 aliasing rules, but older versions of
6502 # GCC produce warnings for legal Python code. Enable
6503 # -fno-strict-aliasing on versions of GCC that support but produce
6504 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6506$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006507 ac_save_cc="$CC"
6508 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006509 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006510 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006511 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006512else
Matthias Kloseb9621712010-04-24 17:59:49 +00006513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006515
Matthias Kloseb159a552010-04-25 21:00:44 +00006516
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006517int
6518main ()
6519{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006520
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006521 ;
6522 return 0;
6523}
Matthias Kloseb159a552010-04-25 21:00:44 +00006524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006526if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006527
6528 CC="$ac_save_cc -fstrict-aliasing"
6529 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006531/* end confdefs.h. */
6532
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006533 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006534int
6535main ()
6536{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006537double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006538 ;
6539 return 0;
6540}
Matthias Kloseb159a552010-04-25 21:00:44 +00006541
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006543if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006544
6545 ac_cv_no_strict_aliasing=no
6546
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547else
Matthias Kloseb159a552010-04-25 21:00:44 +00006548
6549 ac_cv_no_strict_aliasing=yes
6550
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006551fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006553
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006554else
Matthias Kloseb159a552010-04-25 21:00:44 +00006555
6556 ac_cv_no_strict_aliasing=no
6557
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006560fi
6561
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006562 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006563 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6565$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006566 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006567 then
6568 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6569 fi
6570
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6572$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6573 ac_save_cc="$CC"
6574 CC="$CC -Wunused-result -Werror"
6575 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006576 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006577 $as_echo_n "(cached) " >&6
6578else
6579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6580/* end confdefs.h. */
6581
6582
6583int
6584main ()
6585{
6586
6587 ;
6588 return 0;
6589}
6590
6591_ACEOF
6592if ac_fn_c_try_compile "$LINENO"; then :
6593
6594 ac_cv_disable_unused_result_warning=yes
6595
6596else
6597
6598 ac_cv_disable_unused_result_warning=no
6599
6600fi
6601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6602fi
6603
6604 CFLAGS="$save_CFLAGS"
6605 CC="$ac_save_cc"
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6607$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6608
6609 if test $ac_cv_disable_unused_result_warning = yes
6610 then
6611 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6612 fi
6613
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6615$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6616 ac_save_cc="$CC"
6617 CC="$CC -Werror=declaration-after-statement"
6618 save_CFLAGS="$CFLAGS"
6619 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6620 $as_echo_n "(cached) " >&6
6621else
6622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6623/* end confdefs.h. */
6624
6625
6626int
6627main ()
6628{
6629
6630 ;
6631 return 0;
6632}
6633
6634_ACEOF
6635if ac_fn_c_try_compile "$LINENO"; then :
6636
6637 ac_cv_declaration_after_statement_warning=yes
6638
6639else
6640
6641 ac_cv_declaration_after_statement_warning=no
6642
6643fi
6644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6645fi
6646
6647 CFLAGS="$save_CFLAGS"
6648 CC="$ac_save_cc"
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6650$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6651
6652 if test $ac_cv_declaration_after_statement_warning = yes
6653 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006654 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006655 fi
6656
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6658$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6659 ac_save_cc="$CC"
6660 CC="$CC -Wsign-compare"
6661 save_CFLAGS="$CFLAGS"
6662 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6663 $as_echo_n "(cached) " >&6
6664else
6665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6666/* end confdefs.h. */
6667
6668
6669int
6670main ()
6671{
6672
6673 ;
6674 return 0;
6675}
6676
6677_ACEOF
6678if ac_fn_c_try_compile "$LINENO"; then :
6679
6680 ac_cv_enable_sign_compare_warning=yes
6681
6682else
6683
6684 ac_cv_enable_sign_compare_warning=no
6685
6686fi
6687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6688fi
6689
6690 CFLAGS="$save_CFLAGS"
6691 CC="$ac_save_cc"
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6693$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6694
6695 if test $ac_cv_enable_sign_compare_warning = yes
6696 then
6697 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6698 fi
6699
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6701$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6702 ac_save_cc="$CC"
6703 CC="$CC -Wunreachable-code"
6704 save_CFLAGS="$CFLAGS"
6705 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6706 $as_echo_n "(cached) " >&6
6707else
6708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6709/* end confdefs.h. */
6710
6711
6712int
6713main ()
6714{
6715
6716 ;
6717 return 0;
6718}
6719
6720_ACEOF
6721if ac_fn_c_try_compile "$LINENO"; then :
6722
6723 ac_cv_enable_unreachable_code_warning=yes
6724
6725else
6726
6727 ac_cv_enable_unreachable_code_warning=no
6728
6729fi
6730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6731fi
6732
6733 CFLAGS="$save_CFLAGS"
6734 CC="$ac_save_cc"
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6736$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6737
6738 # Don't enable unreachable code warning in debug mode, since it usually
6739 # results in non-standard code paths.
6740 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6741 then
6742 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6743 fi
6744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6746 # support. Without this, treatment of subnormals doesn't follow
6747 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006748 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749 alpha*)
6750 BASECFLAGS="$BASECFLAGS -mieee"
6751 ;;
6752 esac
6753
6754 case $ac_sys_system in
6755 SCO_SV*)
6756 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6757 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006758
6759 # is there any other compiler on Darwin besides gcc?
6760 Darwin*)
6761 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6762 # used to be here, but non-Apple gcc doesn't accept them.
6763 if test "${CC}" = gcc
6764 then
6765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006766$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006767 case "${UNIVERSALSDK}" in
6768 */MacOSX10.4u.sdk)
6769 # Build using 10.4 SDK, force usage of gcc when the
6770 # compiler is gcc, otherwise the user will get very
6771 # confusing error messages when building on OSX 10.6
6772 CC=gcc-4.0
6773 CPP=cpp-4.0
6774 ;;
6775 esac
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006777$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006778 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779
Ned Deily87adb6e2013-10-18 21:09:56 -07006780 if test "${enable_universalsdk}"
6781 then
6782 case "$UNIVERSAL_ARCHS" in
6783 32-bit)
6784 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6785 LIPO_32BIT_FLAGS=""
6786 ARCH_RUN_32BIT=""
6787 ;;
6788 64-bit)
6789 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6790 LIPO_32BIT_FLAGS=""
6791 ARCH_RUN_32BIT="true"
6792 ;;
6793 all)
6794 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6795 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6796 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6797 ;;
6798 intel)
6799 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6800 LIPO_32BIT_FLAGS="-extract i386"
6801 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6802 ;;
6803 intel-32)
6804 UNIVERSAL_ARCH_FLAGS="-arch i386"
6805 LIPO_32BIT_FLAGS=""
6806 ARCH_RUN_32BIT=""
6807 ;;
6808 3-way)
6809 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6810 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6811 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6812 ;;
6813 *)
6814 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6815 ;;
6816 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817
Ned Deily87adb6e2013-10-18 21:09:56 -07006818 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6819 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6820 if test "${UNIVERSALSDK}" != "/"
6821 then
6822 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6823 fi
6824 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006825
Ned Deily87adb6e2013-10-18 21:09:56 -07006826 # Calculate an appropriate deployment target for this build:
6827 # The deployment target value is used explicitly to enable certain
6828 # features are enabled (such as builtin libedit support for readline)
6829 # through the use of Apple's Availabiliy Macros and is used as a
6830 # component of the string returned by distutils.get_platform().
6831 #
6832 # Use the value from:
6833 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6834 # 2. the operating system version of the build machine if >= 10.6
6835 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6836 # below to pick either 10.3, 10.4, or 10.5 as the target.
6837 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838
Ned Deily87adb6e2013-10-18 21:09:56 -07006839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6840$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006841 cur_target_major=`sw_vers -productVersion | \
6842 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6843 cur_target_minor=`sw_vers -productVersion | \
6844 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6845 cur_target="${cur_target_major}.${cur_target_minor}"
6846 if test ${cur_target_major} -eq 10 && \
6847 test ${cur_target_minor} -ge 3 && \
6848 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006849 then
Ned Deily36820b62014-06-25 13:44:22 -07006850 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006851 cur_target=10.3
6852 if test ${enable_universalsdk}
6853 then
6854 case "$UNIVERSAL_ARCHS" in
6855 all|3-way|intel|64-bit)
6856 # These configurations were first supported in 10.5
6857 cur_target='10.5'
6858 ;;
6859 esac
6860 else
6861 if test `/usr/bin/arch` = "i386"
6862 then
6863 # 10.4 was the first release to support Intel archs
6864 cur_target="10.4"
6865 fi
6866 fi
6867 fi
6868 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006869
Ned Deily87adb6e2013-10-18 21:09:56 -07006870 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6871 # environment with a value that is the same as what we'll use
6872 # in the Makefile to ensure that we'll get the same compiler
6873 # environment during configure and build time.
6874 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6875 export MACOSX_DEPLOYMENT_TARGET
6876 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6878$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006879
Ned Deily87adb6e2013-10-18 21:09:56 -07006880 # end of Darwin* tests
6881 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882 esac
6883 ;;
6884
6885*)
6886 case $ac_sys_system in
6887 OpenUNIX*|UnixWare*)
6888 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6889 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890 SCO_SV*)
6891 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6892 ;;
6893 esac
6894 ;;
6895esac
6896
6897if test "$Py_DEBUG" = 'true'; then
6898 :
6899else
6900 OPT="-DNDEBUG $OPT"
6901fi
6902
6903if test "$ac_arch_flags"
6904then
6905 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6906fi
6907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908# On some compilers, pthreads are available without further options
6909# (e.g. MacOS X). On some of these systems, the compiler will not
6910# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6911# So we have to see first whether pthreads are available without
6912# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6914$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006915if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006916 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917else
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 ac_cv_pthread_is_default=no
6920else
Matthias Kloseb9621712010-04-24 17:59:49 +00006921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922/* end confdefs.h. */
6923
Stefan Krah7dba5942012-11-22 22:49:11 +01006924#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925#include <pthread.h>
6926
6927void* routine(void* p){return NULL;}
6928
6929int main(){
6930 pthread_t p;
6931 if(pthread_create(&p,NULL,routine,NULL)!=0)
6932 return 1;
6933 (void)pthread_detach(p);
6934 return 0;
6935}
6936
6937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006938if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939
6940 ac_cv_pthread_is_default=yes
6941 ac_cv_kthread=no
6942 ac_cv_pthread=no
6943
6944else
Matthias Kloseb9621712010-04-24 17:59:49 +00006945 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949fi
6950
6951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006952fi
6953
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6955$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956
6957
6958if test $ac_cv_pthread_is_default = yes
6959then
6960 ac_cv_kpthread=no
6961else
6962# -Kpthread, if available, provides the right #defines
6963# and linker options to make pthread_create available
6964# Some compilers won't report that they do not support -Kpthread,
6965# so we need to run a program to see whether it really made the
6966# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6968$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006969if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006971else
6972 ac_save_cc="$CC"
6973CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006974if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975 ac_cv_kpthread=no
6976else
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978/* end confdefs.h. */
6979
Stefan Krah7dba5942012-11-22 22:49:11 +01006980#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981#include <pthread.h>
6982
6983void* routine(void* p){return NULL;}
6984
6985int main(){
6986 pthread_t p;
6987 if(pthread_create(&p,NULL,routine,NULL)!=0)
6988 return 1;
6989 (void)pthread_detach(p);
6990 return 0;
6991}
6992
6993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006994if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995 ac_cv_kpthread=yes
6996else
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001fi
7002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007003CC="$ac_save_cc"
7004fi
7005
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7007$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008fi
7009
7010if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7011then
7012# -Kthread, if available, provides the right #defines
7013# and linker options to make pthread_create available
7014# Some compilers won't report that they do not support -Kthread,
7015# so we need to run a program to see whether it really made the
7016# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7018$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007019if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021else
7022 ac_save_cc="$CC"
7023CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007024if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007025 ac_cv_kthread=no
7026else
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028/* end confdefs.h. */
7029
Stefan Krah7dba5942012-11-22 22:49:11 +01007030#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007031#include <pthread.h>
7032
7033void* routine(void* p){return NULL;}
7034
7035int main(){
7036 pthread_t p;
7037 if(pthread_create(&p,NULL,routine,NULL)!=0)
7038 return 1;
7039 (void)pthread_detach(p);
7040 return 0;
7041}
7042
7043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007044if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007045 ac_cv_kthread=yes
7046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051fi
7052
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007053CC="$ac_save_cc"
7054fi
7055
Matthias Kloseb9621712010-04-24 17:59:49 +00007056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7057$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058fi
7059
7060if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7061then
7062# -pthread, if available, provides the right #defines
7063# and linker options to make pthread_create available
7064# Some compilers won't report that they do not support -pthread,
7065# so we need to run a program to see whether it really made the
7066# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7068$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007069if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007070 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007071else
7072 ac_save_cc="$CC"
7073CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007074if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007075 ac_cv_pthread=no
7076else
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007078/* end confdefs.h. */
7079
Stefan Krah7dba5942012-11-22 22:49:11 +01007080#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081#include <pthread.h>
7082
7083void* routine(void* p){return NULL;}
7084
7085int main(){
7086 pthread_t p;
7087 if(pthread_create(&p,NULL,routine,NULL)!=0)
7088 return 1;
7089 (void)pthread_detach(p);
7090 return 0;
7091}
7092
7093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007094if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007095 ac_cv_pthread=yes
7096else
Matthias Kloseb9621712010-04-24 17:59:49 +00007097 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007101fi
7102
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007103CC="$ac_save_cc"
7104fi
7105
Matthias Kloseb9621712010-04-24 17:59:49 +00007106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7107$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007108fi
7109
7110# If we have set a CC compiler flag for thread support then
7111# check if it works for CXX, too.
7112ac_cv_cxx_thread=no
7113if test ! -z "$CXX"
7114then
Matthias Kloseb9621712010-04-24 17:59:49 +00007115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7116$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007117ac_save_cxx="$CXX"
7118
7119if test "$ac_cv_kpthread" = "yes"
7120then
7121 CXX="$CXX -Kpthread"
7122 ac_cv_cxx_thread=yes
7123elif test "$ac_cv_kthread" = "yes"
7124then
7125 CXX="$CXX -Kthread"
7126 ac_cv_cxx_thread=yes
7127elif test "$ac_cv_pthread" = "yes"
7128then
7129 CXX="$CXX -pthread"
7130 ac_cv_cxx_thread=yes
7131fi
7132
7133if test $ac_cv_cxx_thread = yes
7134then
7135 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7136 $CXX -c conftest.$ac_ext 2>&5
7137 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7138 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7139 then
7140 ac_cv_cxx_thread=yes
7141 else
7142 ac_cv_cxx_thread=no
7143 fi
7144 rm -fr conftest*
7145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7147$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007148fi
7149CXX="$ac_save_cxx"
7150
7151
7152# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7154$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007155if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007157else
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007159/* end confdefs.h. */
7160#include <stdlib.h>
7161#include <stdarg.h>
7162#include <string.h>
7163#include <float.h>
7164
7165int
7166main ()
7167{
7168
7169 ;
7170 return 0;
7171}
7172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007173if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007174 ac_cv_header_stdc=yes
7175else
Matthias Kloseb9621712010-04-24 17:59:49 +00007176 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007177fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179
7180if test $ac_cv_header_stdc = yes; then
7181 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007183/* end confdefs.h. */
7184#include <string.h>
7185
7186_ACEOF
7187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 $EGREP "memchr" >/dev/null 2>&1; then :
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190else
7191 ac_cv_header_stdc=no
7192fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007193rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007194
7195fi
7196
7197if test $ac_cv_header_stdc = yes; then
7198 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007200/* end confdefs.h. */
7201#include <stdlib.h>
7202
7203_ACEOF
7204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007205 $EGREP "free" >/dev/null 2>&1; then :
7206
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007207else
7208 ac_cv_header_stdc=no
7209fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007210rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007211
7212fi
7213
7214if test $ac_cv_header_stdc = yes; then
7215 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217 :
7218else
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007220/* end confdefs.h. */
7221#include <ctype.h>
7222#include <stdlib.h>
7223#if ((' ' & 0x0FF) == 0x020)
7224# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7225# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7226#else
7227# define ISLOWER(c) \
7228 (('a' <= (c) && (c) <= 'i') \
7229 || ('j' <= (c) && (c) <= 'r') \
7230 || ('s' <= (c) && (c) <= 'z'))
7231# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7232#endif
7233
7234#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7235int
7236main ()
7237{
7238 int i;
7239 for (i = 0; i < 256; i++)
7240 if (XOR (islower (i), ISLOWER (i))
7241 || toupper (i) != TOUPPER (i))
7242 return 2;
7243 return 0;
7244}
7245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007246if ac_fn_c_try_run "$LINENO"; then :
7247
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007248else
Matthias Kloseb9621712010-04-24 17:59:49 +00007249 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007253fi
7254
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255fi
7256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7258$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007259if test $ac_cv_header_stdc = yes; then
7260
Matthias Kloseb9621712010-04-24 17:59:49 +00007261$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262
7263fi
7264
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007265for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007266fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007267ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007268sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007269unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007270poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007271sys/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 +01007272sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007273sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007274sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007275sys/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 -07007276libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007277bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7278sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007279do :
7280 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7281ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007282if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007283 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007284#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007285_ACEOF
7286
7287fi
7288
Guido van Rossum627b2d71993-12-24 10:39:16 +00007289done
7290
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007291ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007292for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7295$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007296if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007298else
Matthias Kloseb9621712010-04-24 17:59:49 +00007299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007300/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007301#include <sys/types.h>
7302#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007303
Martin v. Löwis11437992002-04-12 09:54:03 +00007304int
7305main ()
7306{
7307if ((DIR *) 0)
7308return 0;
7309 ;
7310 return 0;
7311}
7312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007314 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007315else
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007320eval ac_res=\$$as_ac_Header
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7322$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007323if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007324 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007325#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007326_ACEOF
7327
7328ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007329fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007331done
7332# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7333if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7335$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007336if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007338else
Martin v. Löwis11437992002-04-12 09:54:03 +00007339 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007342
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007343/* Override any GCC internal prototype to avoid an error.
7344 Use char because int might match the return type of a GCC
7345 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007346#ifdef __cplusplus
7347extern "C"
7348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007349char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007350int
7351main ()
7352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007353return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007354 ;
7355 return 0;
7356}
7357_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007358for ac_lib in '' dir; do
7359 if test -z "$ac_lib"; then
7360 ac_res="none required"
7361 else
7362 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007363 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007364 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007366 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007368rm -f core conftest.err conftest.$ac_objext \
7369 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007370 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007371 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007373done
Victor Stinnere0be4232011-10-25 13:06:09 +02007374if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007375
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007376else
7377 ac_cv_search_opendir=no
7378fi
7379rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007380LIBS=$ac_func_search_save_LIBS
7381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7383$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007384ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007385if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007386 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007387
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007388fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007389
Michael W. Hudson54241132001-12-07 15:38:26 +00007390else
Matthias Kloseb9621712010-04-24 17:59:49 +00007391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7392$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007393if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007395else
7396 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007400/* Override any GCC internal prototype to avoid an error.
7401 Use char because int might match the return type of a GCC
7402 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007403#ifdef __cplusplus
7404extern "C"
7405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007406char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007407int
7408main ()
7409{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007410return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007411 ;
7412 return 0;
7413}
7414_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007415for ac_lib in '' x; do
7416 if test -z "$ac_lib"; then
7417 ac_res="none required"
7418 else
7419 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007420 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007421 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007422 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007423 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007425rm -f core conftest.err conftest.$ac_objext \
7426 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007427 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007428 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007430done
Victor Stinnere0be4232011-10-25 13:06:09 +02007431if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007433else
7434 ac_cv_search_opendir=no
7435fi
7436rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007437LIBS=$ac_func_search_save_LIBS
7438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7440$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007441ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007442if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007443 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007444
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007445fi
7446
7447fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007448
Matthias Kloseb9621712010-04-24 17:59:49 +00007449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7450$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007451if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007453else
Matthias Kloseb9621712010-04-24 17:59:49 +00007454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007455/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007456#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007457int
7458main ()
7459{
7460return makedev(0, 0);
7461 ;
7462 return 0;
7463}
7464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007465if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007466 ac_cv_header_sys_types_h_makedev=yes
7467else
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007470rm -f core conftest.err conftest.$ac_objext \
7471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007472
7473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7475$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007476
7477if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007478ac_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 +02007479if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007482
7483fi
7484
7485
7486
7487 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007488 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 +02007489if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007490
Matthias Kloseb9621712010-04-24 17:59:49 +00007491$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007492
7493fi
7494
7495
7496 fi
7497fi
7498
Michael W. Hudson54241132001-12-07 15:38:26 +00007499
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007500# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7501for ac_header in net/if.h
7502do :
7503 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7504#ifdef STDC_HEADERS
7505# include <stdlib.h>
7506# include <stddef.h>
7507#else
7508# ifdef HAVE_STDLIB_H
7509# include <stdlib.h>
7510# endif
7511#endif
7512#ifdef HAVE_SYS_SOCKET_H
7513# include <sys/socket.h>
7514#endif
7515
7516"
Victor Stinnere0be4232011-10-25 13:06:09 +02007517if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007518 cat >>confdefs.h <<_ACEOF
7519#define HAVE_NET_IF_H 1
7520_ACEOF
7521
7522fi
7523
7524done
7525
7526
Martin v. Löwis11017b12006-01-14 18:12:57 +00007527# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007528for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007529do :
7530 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 +00007531#ifdef HAVE_ASM_TYPES_H
7532#include <asm/types.h>
7533#endif
7534#ifdef HAVE_SYS_SOCKET_H
7535#include <sys/socket.h>
7536#endif
7537
Matthias Kloseb9621712010-04-24 17:59:49 +00007538"
Victor Stinnere0be4232011-10-25 13:06:09 +02007539if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007540 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007541#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007542_ACEOF
7543
7544fi
7545
7546done
7547
7548
Charles-François Natali47413c12011-10-06 19:47:44 +02007549# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007550for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007551do :
7552 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7553ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7554#ifdef HAVE_SYS_SOCKET_H
7555#include <sys/socket.h>
7556#endif
7557
7558"
7559if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7560 cat >>confdefs.h <<_ACEOF
7561#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7562_ACEOF
7563
7564fi
7565
7566done
7567
7568
Guido van Rossum627b2d71993-12-24 10:39:16 +00007569# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007570was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7572$as_echo_n "checking for clock_t in time.h... " >&6; }
7573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007574/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007575#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007576
7577_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007580 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007581else
Martin v. Löwis11437992002-04-12 09:54:03 +00007582
7583
Matthias Kloseb9621712010-04-24 17:59:49 +00007584$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007585
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007586
Guido van Rossum627b2d71993-12-24 10:39:16 +00007587fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007588rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007589
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7591$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7594$as_echo_n "checking for makedev... " >&6; }
7595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007596/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007597
Jesus Cea740f53a2010-04-28 11:35:30 +00007598#if defined(MAJOR_IN_MKDEV)
7599#include <sys/mkdev.h>
7600#elif defined(MAJOR_IN_SYSMACROS)
7601#include <sys/sysmacros.h>
7602#else
7603#include <sys/types.h>
7604#endif
7605
Neal Norwitz11690112002-07-30 01:08:28 +00007606int
7607main ()
7608{
Jesus Cea740f53a2010-04-28 11:35:30 +00007609
7610 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007611 ;
7612 return 0;
7613}
Matthias Kloseb159a552010-04-25 21:00:44 +00007614
Neal Norwitz11690112002-07-30 01:08:28 +00007615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007616if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007617 ac_cv_has_makedev=yes
7618else
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007621rm -f core conftest.err conftest.$ac_objext \
7622 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7624$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007625if test "$ac_cv_has_makedev" = "yes"; then
7626
Matthias Kloseb9621712010-04-24 17:59:49 +00007627$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007628
7629fi
7630
Christian Heimes985ecdc2013-11-20 11:46:18 +01007631# byte swapping
7632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7633$as_echo_n "checking for le64toh... " >&6; }
7634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7635/* end confdefs.h. */
7636
7637#ifdef HAVE_ENDIAN_H
7638#include <endian.h>
7639#elif defined(HAVE_SYS_ENDIAN_H)
7640#include <sys/endian.h>
7641#endif
7642
7643int
7644main ()
7645{
7646
7647 le64toh(1)
7648 ;
7649 return 0;
7650}
7651
7652_ACEOF
7653if ac_fn_c_try_link "$LINENO"; then :
7654 ac_cv_has_le64toh=yes
7655else
7656 ac_cv_has_le64toh=no
7657fi
7658rm -f core conftest.err conftest.$ac_objext \
7659 conftest$ac_exeext conftest.$ac_ext
7660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7661$as_echo "$ac_cv_has_le64toh" >&6; }
7662if test "$ac_cv_has_le64toh" = "yes"; then
7663
7664$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7665
7666fi
7667
Martin v. Löwis399a6892002-10-04 10:22:02 +00007668# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7669# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7670# defined, but the compiler does not support pragma redefine_extname,
7671# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7672# structures (such as rlimit64) without declaring them. As a
7673# work-around, disable LFS on such configurations
7674
7675use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7677$as_echo_n "checking Solaris LFS bug... " >&6; }
7678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007679/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007680
7681#define _LARGEFILE_SOURCE 1
7682#define _FILE_OFFSET_BITS 64
7683#include <sys/resource.h>
7684
Martin v. Löwis399a6892002-10-04 10:22:02 +00007685int
7686main ()
7687{
7688struct rlimit foo;
7689 ;
7690 return 0;
7691}
7692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007694 sol_lfs_bug=no
7695else
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7700$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007701if test "$sol_lfs_bug" = "yes"; then
7702 use_lfs=no
7703fi
7704
7705if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007706# Two defines needed to enable largefile support on various platforms
7707# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007708case $ac_sys_system/$ac_sys_release in
7709AIX*)
7710
7711$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7712
7713 ;;
7714esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007715
Matthias Kloseb9621712010-04-24 17:59:49 +00007716$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007717
7718
Matthias Kloseb9621712010-04-24 17:59:49 +00007719$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007720
Martin v. Löwis399a6892002-10-04 10:22:02 +00007721fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007722
Guido van Rossum84e7b241996-08-19 21:59:00 +00007723# Add some code to confdefs.h so that the test for off_t works on SCO
7724cat >> confdefs.h <<\EOF
7725#if defined(SCO_DS)
7726#undef _OFF_T
7727#endif
7728EOF
7729
Guido van Rossumef2255b2000-03-10 22:30:29 +00007730# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007731ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007732if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007733
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007734else
Martin v. Löwis11437992002-04-12 09:54:03 +00007735
7736cat >>confdefs.h <<_ACEOF
7737#define mode_t int
7738_ACEOF
7739
7740fi
7741
Matthias Kloseb9621712010-04-24 17:59:49 +00007742ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007743if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007744
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007745else
Martin v. Löwis11437992002-04-12 09:54:03 +00007746
7747cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007749_ACEOF
7750
7751fi
7752
Matthias Kloseb9621712010-04-24 17:59:49 +00007753ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007754if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007755
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007756else
Martin v. Löwis11437992002-04-12 09:54:03 +00007757
7758cat >>confdefs.h <<_ACEOF
7759#define pid_t int
7760_ACEOF
7761
7762fi
7763
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007764
Martin v. Löwis11437992002-04-12 09:54:03 +00007765cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007766#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007767_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007768
Matthias Kloseb9621712010-04-24 17:59:49 +00007769ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007770if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007771
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007772else
Martin v. Löwis11437992002-04-12 09:54:03 +00007773
7774cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007775#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007776_ACEOF
7777
7778fi
7779
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7781$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007782if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007786/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007787#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007788
7789_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007792 ac_cv_type_uid_t=yes
7793else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007794 ac_cv_type_uid_t=no
7795fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007796rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7800$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007801if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007802
Matthias Kloseb9621712010-04-24 17:59:49 +00007803$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007804
7805
Matthias Kloseb9621712010-04-24 17:59:49 +00007806$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007807
7808fi
7809
Mark Dickinson983bc162012-12-02 12:11:38 +00007810
7811# There are two separate checks for each of the exact-width integer types we
7812# need. First we check whether the type is available using the usual
7813# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7814# and <stdint.h> where available). We then also use the special type checks of
7815# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7816# directly, #define's uint32_t to be a suitable type.
7817
7818ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7819if test "x$ac_cv_type_uint32_t" = xyes; then :
7820
7821$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7822
7823fi
7824
Matthias Kloseb9621712010-04-24 17:59:49 +00007825ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7826case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007827 no|yes) ;; #(
7828 *)
7829
Matthias Kloseb9621712010-04-24 17:59:49 +00007830$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007831
7832
7833cat >>confdefs.h <<_ACEOF
7834#define uint32_t $ac_cv_c_uint32_t
7835_ACEOF
7836;;
7837 esac
7838
Mark Dickinson983bc162012-12-02 12:11:38 +00007839
7840ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7841if test "x$ac_cv_type_uint64_t" = xyes; then :
7842
7843$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7844
7845fi
7846
Matthias Kloseb9621712010-04-24 17:59:49 +00007847ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7848case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007849 no|yes) ;; #(
7850 *)
7851
Matthias Kloseb9621712010-04-24 17:59:49 +00007852$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007853
7854
7855cat >>confdefs.h <<_ACEOF
7856#define uint64_t $ac_cv_c_uint64_t
7857_ACEOF
7858;;
7859 esac
7860
Mark Dickinson983bc162012-12-02 12:11:38 +00007861
7862ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7863if test "x$ac_cv_type_int32_t" = xyes; then :
7864
7865$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7866
7867fi
7868
Matthias Kloseb9621712010-04-24 17:59:49 +00007869ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7870case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007871 no|yes) ;; #(
7872 *)
7873
7874cat >>confdefs.h <<_ACEOF
7875#define int32_t $ac_cv_c_int32_t
7876_ACEOF
7877;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007878esac
7879
Mark Dickinson983bc162012-12-02 12:11:38 +00007880
7881ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7882if test "x$ac_cv_type_int64_t" = xyes; then :
7883
7884$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7885
7886fi
7887
Matthias Kloseb9621712010-04-24 17:59:49 +00007888ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7889case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007890 no|yes) ;; #(
7891 *)
7892
7893cat >>confdefs.h <<_ACEOF
7894#define int64_t $ac_cv_c_int64_t
7895_ACEOF
7896;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007897esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007898
Mark Dickinson983bc162012-12-02 12:11:38 +00007899
Matthias Kloseb9621712010-04-24 17:59:49 +00007900ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007901if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902
Matthias Kloseb9621712010-04-24 17:59:49 +00007903$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007904
7905fi
7906
Stefan Krah1919b7e2012-03-21 18:25:23 +01007907ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7908if test "x$ac_cv_type___uint128_t" = xyes; then :
7909
7910$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7911
7912fi
7913
Jack Jansendd19cf82001-12-06 22:36:17 +00007914
Michael W. Hudson54241132001-12-07 15:38:26 +00007915# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007916# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917# The cast to long int works around a bug in the HP C Compiler
7918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7920# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7922$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007923if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007925else
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 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 +00007927
Martin v. Löwis11437992002-04-12 09:54:03 +00007928else
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 if test "$ac_cv_type_int" = yes; then
7930 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7931$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007932as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007933See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934 else
7935 ac_cv_sizeof_int=0
7936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938
Martin v. Löwis11437992002-04-12 09:54:03 +00007939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7941$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942
7943
7944
Martin v. Löwis11437992002-04-12 09:54:03 +00007945cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007946#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007947_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007948
7949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950# The cast to long int works around a bug in the HP C Compiler
7951# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7952# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7953# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7955$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007956if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 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 +00007960
Martin v. Löwis11437992002-04-12 09:54:03 +00007961else
Matthias Kloseb9621712010-04-24 17:59:49 +00007962 if test "$ac_cv_type_long" = yes; then
7963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007965as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007966See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967 else
7968 ac_cv_sizeof_long=0
7969 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971
Martin v. Löwis11437992002-04-12 09:54:03 +00007972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7974$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975
7976
7977
Martin v. Löwis11437992002-04-12 09:54:03 +00007978cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007979#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007980_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007981
7982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983# The cast to long int works around a bug in the HP C Compiler
7984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7988$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007989if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007990 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 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 +00007993
Martin v. Löwis11437992002-04-12 09:54:03 +00007994else
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 if test "$ac_cv_type_void_p" = yes; then
7996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007998as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007999See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 else
8001 ac_cv_sizeof_void_p=0
8002 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008004
Martin v. Löwis11437992002-04-12 09:54:03 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8007$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008
8009
8010
Martin v. Löwis11437992002-04-12 09:54:03 +00008011cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008012#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008013_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008014
8015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016# The cast to long int works around a bug in the HP C Compiler
8017# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8018# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8019# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8021$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008022if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008024else
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 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 +00008026
Martin v. Löwis11437992002-04-12 09:54:03 +00008027else
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 if test "$ac_cv_type_short" = yes; then
8029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008031as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008032See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033 else
8034 ac_cv_sizeof_short=0
8035 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037
Martin v. Löwis11437992002-04-12 09:54:03 +00008038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8040$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041
8042
8043
Martin v. Löwis11437992002-04-12 09:54:03 +00008044cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008045#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008046_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008047
8048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049# The cast to long int works around a bug in the HP C Compiler
8050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8052# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8054$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008055if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008057else
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 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 +00008059
Martin v. Löwis11437992002-04-12 09:54:03 +00008060else
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 if test "$ac_cv_type_float" = yes; then
8062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008064as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008065See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066 else
8067 ac_cv_sizeof_float=0
8068 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070
Martin v. Löwis11437992002-04-12 09:54:03 +00008071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8073$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074
8075
8076
Martin v. Löwis11437992002-04-12 09:54:03 +00008077cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008078#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008079_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008080
8081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082# The cast to long int works around a bug in the HP C Compiler
8083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8087$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008088if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 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 +00008092
Martin v. Löwis11437992002-04-12 09:54:03 +00008093else
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 if test "$ac_cv_type_double" = yes; then
8095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008097as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008098See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 else
8100 ac_cv_sizeof_double=0
8101 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008103
Martin v. Löwis11437992002-04-12 09:54:03 +00008104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8106$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107
8108
8109
Martin v. Löwis11437992002-04-12 09:54:03 +00008110cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008111#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008112_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008113
8114
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 fpos_t" >&5
8120$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008121if ${ac_cv_sizeof_fpos_t+:} 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 (fpos_t))" "ac_cv_sizeof_fpos_t" "$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_fpos_t" = 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 (fpos_t)
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_fpos_t=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_fpos_t" >&5
8139$as_echo "$ac_cv_sizeof_fpos_t" >&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 Rossumb9a22a12000-06-30 02:48:53 +00008144#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008145_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008146
Michael W. Hudson54241132001-12-07 15:38:26 +00008147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148# The cast to long int works around a bug in the HP C Compiler
8149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8151# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8153$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008154if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008156else
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 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 +00008158
Martin v. Löwis18e16552006-02-15 17:27:45 +00008159else
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 if test "$ac_cv_type_size_t" = yes; then
8161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008163as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008164See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165 else
8166 ac_cv_sizeof_size_t=0
8167 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008169
Martin v. Löwis18e16552006-02-15 17:27:45 +00008170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8172$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173
8174
8175
Martin v. Löwis18e16552006-02-15 17:27:45 +00008176cat >>confdefs.h <<_ACEOF
8177#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8178_ACEOF
8179
8180
Christian Heimes400adb02008-02-01 08:12:03 +00008181# The cast to long int works around a bug in the HP C Compiler
8182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8184# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8186$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008187if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008188 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008189else
Matthias Kloseb9621712010-04-24 17:59:49 +00008190 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 +00008191
Christian Heimes400adb02008-02-01 08:12:03 +00008192else
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 if test "$ac_cv_type_pid_t" = yes; then
8194 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8195$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008196as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008197See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008198 else
8199 ac_cv_sizeof_pid_t=0
8200 fi
8201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008202
Christian Heimes400adb02008-02-01 08:12:03 +00008203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8205$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008206
8207
8208
8209cat >>confdefs.h <<_ACEOF
8210#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8211_ACEOF
8212
8213
Michael W. Hudson54241132001-12-07 15:38:26 +00008214
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8216$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008217have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008219/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008220
Martin v. Löwis11437992002-04-12 09:54:03 +00008221int
8222main ()
8223{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008224long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ;
8226 return 0;
8227}
8228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008229if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008230
8231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008233
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008234 have_long_long=yes
8235
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8239$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008240if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241# The cast to long int works around a bug in the HP C Compiler
8242# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8243# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8244# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8246$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008247if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008248 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008249else
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 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 +00008251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252else
Matthias Kloseb9621712010-04-24 17:59:49 +00008253 if test "$ac_cv_type_long_long" = yes; then
8254 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8255$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008256as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008257See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258 else
8259 ac_cv_sizeof_long_long=0
8260 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262
Martin v. Löwis11437992002-04-12 09:54:03 +00008263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8265$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266
8267
8268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008270#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008271_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008272
Michael W. Hudson54241132001-12-07 15:38:26 +00008273
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008274fi
8275
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8277$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008278have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008280/* end confdefs.h. */
8281
8282int
8283main ()
8284{
8285long double x; x = (long double)0;
8286 ;
8287 return 0;
8288}
8289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008290if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008291
8292
Matthias Kloseb9621712010-04-24 17:59:49 +00008293$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008294
8295 have_long_double=yes
8296
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008297fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8300$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008301if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008302# The cast to long int works around a bug in the HP C Compiler
8303# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8304# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8305# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8307$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008308if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008309 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 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 +00008312
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008313else
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 if test "$ac_cv_type_long_double" = yes; then
8315 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8316$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008317as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008318See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008319 else
8320 ac_cv_sizeof_long_double=0
8321 fi
8322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008323
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8326$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008327
8328
8329
8330cat >>confdefs.h <<_ACEOF
8331#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8332_ACEOF
8333
8334
8335fi
8336
8337
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8339$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008340have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008342/* end confdefs.h. */
8343
8344int
8345main ()
8346{
8347_Bool x; x = (_Bool)0;
8348 ;
8349 return 0;
8350}
8351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008352if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008353
8354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008356
8357 have_c99_bool=yes
8358
Thomas Woutersb2137042007-02-01 18:02:27 +00008359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8362$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008363if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364# The cast to long int works around a bug in the HP C Compiler
8365# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8366# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8367# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8369$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008370if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 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 +00008374
Thomas Woutersb2137042007-02-01 18:02:27 +00008375else
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 if test "$ac_cv_type__Bool" = yes; then
8377 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008379as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008380See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381 else
8382 ac_cv_sizeof__Bool=0
8383 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385
Thomas Woutersb2137042007-02-01 18:02:27 +00008386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8388$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389
8390
8391
Thomas Woutersb2137042007-02-01 18:02:27 +00008392cat >>confdefs.h <<_ACEOF
8393#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8394_ACEOF
8395
8396
8397fi
8398
Matthias Kloseb9621712010-04-24 17:59:49 +00008399ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008400 #include <stdint.h>
8401 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008402 #ifdef HAVE_INTTYPES_H
8403 #include <inttypes.h>
8404 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008405"
Victor Stinnere0be4232011-10-25 13:06:09 +02008406if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008407
8408cat >>confdefs.h <<_ACEOF
8409#define HAVE_UINTPTR_T 1
8410_ACEOF
8411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412# The cast to long int works around a bug in the HP C Compiler
8413# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8414# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8415# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8417$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008418if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008420else
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 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 +00008422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423else
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 if test "$ac_cv_type_uintptr_t" = yes; then
8425 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008427as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008428See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429 else
8430 ac_cv_sizeof_uintptr_t=0
8431 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8436$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437
8438
8439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008441#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008442_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008443
Michael W. Hudson54241132001-12-07 15:38:26 +00008444
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008445fi
8446
Thomas Wouters89f507f2006-12-13 04:49:30 +00008447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008448# The cast to long int works around a bug in the HP C Compiler
8449# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8450# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8451# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8453$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008454if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008456else
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008458#ifdef HAVE_SYS_TYPES_H
8459#include <sys/types.h>
8460#endif
8461
Matthias Kloseb9621712010-04-24 17:59:49 +00008462"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008463
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 if test "$ac_cv_type_off_t" = yes; then
8466 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008468as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008469See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008470 else
8471 ac_cv_sizeof_off_t=0
8472 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8477$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008479
8480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008482#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008483_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008484
Michael W. Hudson54241132001-12-07 15:38:26 +00008485
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008486
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8488$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008489if test "$have_long_long" = yes
8490then
8491if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008492 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008495
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8497$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8500$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008501fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008502else
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8504$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008505fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008506
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008507# The cast to long int works around a bug in the HP C Compiler
8508# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8509# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8510# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8512$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008513if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008515else
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008517#ifdef HAVE_SYS_TYPES_H
8518#include <sys/types.h>
8519#endif
8520#ifdef HAVE_TIME_H
8521#include <time.h>
8522#endif
8523
Matthias Kloseb9621712010-04-24 17:59:49 +00008524"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008525
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008526else
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 if test "$ac_cv_type_time_t" = yes; then
8528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008530as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008531See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008532 else
8533 ac_cv_sizeof_time_t=0
8534 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8539$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008541
8542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008544#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008545_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008546
Michael W. Hudson54241132001-12-07 15:38:26 +00008547
8548
Trent Mick635f6fb2000-08-23 21:33:05 +00008549# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008550ac_save_cc="$CC"
8551if test "$ac_cv_kpthread" = "yes"
8552then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008553elif test "$ac_cv_kthread" = "yes"
8554then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008555elif test "$ac_cv_pthread" = "yes"
8556then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008557fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008558
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8560$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008561have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008563/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008564
8565 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008566int
8567main ()
8568{
Guido van Rossum12580492000-09-24 16:47:19 +00008569pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 ;
8571 return 0;
8572}
Matthias Kloseb159a552010-04-25 21:00:44 +00008573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008575if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008576 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8580$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008581if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008583# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8584# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8585# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8587$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008588if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008592#ifdef HAVE_PTHREAD_H
8593#include <pthread.h>
8594#endif
8595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008597
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 if test "$ac_cv_type_pthread_t" = yes; then
8600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008602as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008603See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008604 else
8605 ac_cv_sizeof_pthread_t=0
8606 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608
Trent Mick635f6fb2000-08-23 21:33:05 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8611$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008613
8614
Martin v. Löwis11437992002-04-12 09:54:03 +00008615cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008616#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008618
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008619
Trent Mick635f6fb2000-08-23 21:33:05 +00008620fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008621CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008622
Michael W. Hudson54241132001-12-07 15:38:26 +00008623
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008624case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008625 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008626 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8627 ;;
8628 Darwin/*)
8629 OTHER_LIBTOOL_OPT=""
8630 ;;
8631esac
8632
8633
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008634
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008635case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008636 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008637 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8638 if test "${enable_universalsdk}"; then
8639 :
8640 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008641 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008642 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008643 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008644 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008645 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008646 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008647 if test ${gcc_version} '<' 4.0
8648 then
8649 LIBTOOL_CRUFT="-lcc_dynamic"
8650 else
8651 LIBTOOL_CRUFT=""
8652 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008654 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008655else
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008657/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008658
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008659 #include <unistd.h>
8660 int main(int argc, char*argv[])
8661 {
8662 if (sizeof(long) == 4) {
8663 return 0;
8664 } else {
8665 return 1;
8666 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008667 }
8668
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008670if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008671 ac_osx_32bit=yes
8672else
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008677fi
8678
8679
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008680 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008681 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008682 i386)
8683 MACOSX_DEFAULT_ARCH="i386"
8684 ;;
8685 ppc)
8686 MACOSX_DEFAULT_ARCH="ppc"
8687 ;;
8688 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008689 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008690 ;;
8691 esac
8692 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008693 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008694 i386)
8695 MACOSX_DEFAULT_ARCH="x86_64"
8696 ;;
8697 ppc)
8698 MACOSX_DEFAULT_ARCH="ppc64"
8699 ;;
8700 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008701 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008702 ;;
8703 esac
8704
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008705 fi
8706
8707 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008708 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008709 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008710esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8712$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008713if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008714then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008715 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008717 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008718
Matthias Kloseb9621712010-04-24 17:59:49 +00008719$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008720
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8722$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008723 if test $enable_shared = "yes"
8724 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008725 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 +00008726 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8729$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008730fi
8731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8733$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008734case $ac_sys_system/$ac_sys_release in
8735 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008736
Matthias Kloseb9621712010-04-24 17:59:49 +00008737$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008738
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8740$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008741 ;;
8742 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8744$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008745 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008746esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008747
Guido van Rossum0a516c91994-09-12 10:58:40 +00008748# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008749
Michael W. Hudson54241132001-12-07 15:38:26 +00008750
8751
8752
8753
Benjamin Peterson99f03762010-04-11 22:15:28 +00008754
Thomas Wouters477c8d52006-05-27 19:21:47 +00008755
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008756# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8757# -- usually .so, .sl on HP-UX, .dll on Cygwin
8758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8759$as_echo_n "checking the extension of shared libraries... " >&6; }
8760if test -z "$SHLIB_SUFFIX"; then
8761 case $ac_sys_system in
8762 hp*|HP*)
8763 case `uname -m` in
8764 ia64) SHLIB_SUFFIX=.so;;
8765 *) SHLIB_SUFFIX=.sl;;
8766 esac
8767 ;;
8768 CYGWIN*) SHLIB_SUFFIX=.dll;;
8769 *) SHLIB_SUFFIX=.so;;
8770 esac
8771fi
8772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8773$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008774
Guido van Rossum0a516c91994-09-12 10:58:40 +00008775# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008776# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008777# (Shared libraries in this instance are shared modules to be loaded into
8778# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8780$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781if test -z "$LDSHARED"
8782then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008783 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008784 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008785 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008786 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008787 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008788 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008789 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008791 if test "$GCC" = "yes" ; then
8792 LDSHARED='$(CC) -shared'
8793 LDCXXSHARED='$(CXX) -shared'
8794 else
8795 LDSHARED='$(CC) -G'
8796 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008797 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008798 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008799 if test "$GCC" = "yes" ; then
8800 LDSHARED='$(CC) -shared'
8801 LDCXXSHARED='$(CXX) -shared'
8802 else
8803 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008804 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008805 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008806 LDSHARED='$(CC) -bundle'
8807 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008808 if test "$enable_framework" ; then
8809 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008810 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8811 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008812 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008813 else
8814 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008815 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008816 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008817 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008818 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008819 LDSHARED='$(CC) -bundle'
8820 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008821 if test "$enable_framework" ; then
8822 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008823 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8824 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008825 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008826 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008827 # No framework, use the Python app as bundle-loader
8828 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008829 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008830 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008831 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008832 Darwin/*)
8833 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8834 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008835
Ned Deily36820b62014-06-25 13:44:22 -07008836 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8837 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8838 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8839 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8840 if test ${dep_target_major} -eq 10 && \
8841 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008842 then
Ned Deily36820b62014-06-25 13:44:22 -07008843 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008844 LDSHARED='$(CC) -bundle'
8845 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008846 if test "$enable_framework" ; then
8847 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008848 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8849 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008850 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008851 else
8852 # No framework, use the Python app as bundle-loader
8853 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8854 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008855 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008856 fi
Ned Deily36820b62014-06-25 13:44:22 -07008857 else
8858 # building for OS X 10.3 and later
8859 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8860 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8861 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008862 fi
8863 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008864 Linux*|GNU*|QNX*)
8865 LDSHARED='$(CC) -shared'
8866 LDCXXSHARED='$(CXX) -shared';;
8867 BSD/OS*/4*)
8868 LDSHARED="gcc -shared"
8869 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008870 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008871 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008872 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008873 LDSHARED='$(CC) -shared'
8874 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008875 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008876 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008877 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008878 OpenBSD*)
8879 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8880 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008881 LDSHARED='$(CC) -shared $(CCSHARED)'
8882 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008883 else
8884 case `uname -r` in
8885 [01].* | 2.[0-7] | 2.[0-7].*)
8886 LDSHARED="ld -Bshareable ${LDFLAGS}"
8887 ;;
8888 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008889 LDSHARED='$(CC) -shared $(CCSHARED)'
8890 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008891 ;;
8892 esac
8893 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008894 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008895 LDSHARED='$(CC) -shared'
8896 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008897 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008898 if test "$GCC" = "yes" ; then
8899 LDSHARED='$(CC) -shared'
8900 LDCXXSHARED='$(CXX) -shared'
8901 else
8902 LDSHARED='$(CC) -G'
8903 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008904 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008905 SCO_SV*)
8906 LDSHARED='$(CC) -Wl,-G,-Bexport'
8907 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8908 CYGWIN*)
8909 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8910 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008911 *) LDSHARED="ld";;
8912 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8915$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008916LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008917BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008918# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008919# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8921$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008922if test -z "$CCSHARED"
8923then
Guido van Rossum07397971997-04-29 21:49:50 +00008924 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008925 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008926 then CCSHARED="-fPIC";
8927 elif test `uname -p` = sparc;
8928 then CCSHARED="-xcode=pic32";
8929 else CCSHARED="-Kpic";
8930 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008931 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008932 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008933 else CCSHARED="+z";
8934 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008935 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008936 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008937 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008938 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008939 if test "$GCC" = "yes"
8940 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008941 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008942 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008943 SCO_SV*)
8944 if test "$GCC" = "yes"
8945 then CCSHARED="-fPIC"
8946 else CCSHARED="-Kpic -belf"
8947 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008948 IRIX*/6*) case $CC in
8949 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008950 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008951 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008952 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8955$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008956# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008957# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8959$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008960if test -z "$LINKFORSHARED"
8961then
Guido van Rossum07397971997-04-29 21:49:50 +00008962 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008963 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008964 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008965 LINKFORSHARED="-Wl,-E -Wl,+s";;
8966# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008967 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008968 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008969 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008971 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008972
8973 # Issue #18075: the default maximum stack size (8MBytes) is too
8974 # small for the default recursion limit. Increase the stack size
8975 # to ensure that tests don't crash
8976 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8977
Jack Jansene578a632001-08-15 01:27:14 +00008978 if test "$enable_framework"
8979 then
Jack Jansenda49e192005-01-07 13:08:22 +00008980 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008981 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008982 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008983 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008984 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008985 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008986 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008987 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8988 then
8989 LINKFORSHARED="-Wl,--export-dynamic"
8990 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008991 SunOS/5*) case $CC in
8992 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008993 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008994 then
8995 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008996 fi;;
8997 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008998 CYGWIN*)
8999 if test $enable_shared = "no"
9000 then
9001 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9002 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009003 QNX*)
9004 # -Wl,-E causes the symbols to be added to the dynamic
9005 # symbol table so that they can be found when a module
9006 # is loaded. -N 2048K causes the stack size to be set
9007 # to 2048 kilobytes so that the stack doesn't overflow
9008 # when running test_compile.py.
9009 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009010 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9013$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009014
Michael W. Hudson54241132001-12-07 15:38:26 +00009015
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009016
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9018$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009019if test ! "$LIBRARY" = "$LDLIBRARY"
9020then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009021 case $ac_sys_system in
9022 CYGWIN*)
9023 # Cygwin needs CCSHARED when building extension DLLs
9024 # but not when building the interpreter DLL.
9025 CFLAGSFORSHARED='';;
9026 *)
9027 CFLAGSFORSHARED='$(CCSHARED)'
9028 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9031$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009032
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009033# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9034# library (with --enable-shared).
9035# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009036# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9037# if it is not required, since it creates a dependency of the shared library
9038# to LIBS. This, in turn, means that applications linking the shared libpython
9039# don't need to link LIBS explicitly. The default should be only changed
9040# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009041
Matthias Kloseb9621712010-04-24 17:59:49 +00009042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9043$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009044case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009045 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009046 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009047esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9049$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009050
9051
Guido van Rossum627b2d71993-12-24 10:39:16 +00009052# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9054$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009055if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009056 $as_echo_n "(cached) " >&6
9057else
9058 ac_check_lib_save_LIBS=$LIBS
9059LIBS="-lsendfile $LIBS"
9060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9061/* end confdefs.h. */
9062
9063/* Override any GCC internal prototype to avoid an error.
9064 Use char because int might match the return type of a GCC
9065 builtin and then its argument prototype would still apply. */
9066#ifdef __cplusplus
9067extern "C"
9068#endif
9069char sendfile ();
9070int
9071main ()
9072{
9073return sendfile ();
9074 ;
9075 return 0;
9076}
9077_ACEOF
9078if ac_fn_c_try_link "$LINENO"; then :
9079 ac_cv_lib_sendfile_sendfile=yes
9080else
9081 ac_cv_lib_sendfile_sendfile=no
9082fi
9083rm -f core conftest.err conftest.$ac_objext \
9084 conftest$ac_exeext conftest.$ac_ext
9085LIBS=$ac_check_lib_save_LIBS
9086fi
9087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9088$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009089if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009090 cat >>confdefs.h <<_ACEOF
9091#define HAVE_LIBSENDFILE 1
9092_ACEOF
9093
9094 LIBS="-lsendfile $LIBS"
9095
9096fi
9097
Matthias Kloseb9621712010-04-24 17:59:49 +00009098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9099$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009100if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009102else
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009104LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009108/* Override any GCC internal prototype to avoid an error.
9109 Use char because int might match the return type of a GCC
9110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009111#ifdef __cplusplus
9112extern "C"
9113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009114char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009115int
9116main ()
9117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009118return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 ;
9120 return 0;
9121}
9122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009125else
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009128rm -f core conftest.err conftest.$ac_objext \
9129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009130LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9133$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009134if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 cat >>confdefs.h <<_ACEOF
9136#define HAVE_LIBDL 1
9137_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009138
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009139 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009141fi
9142 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9144$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009145if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009147else
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009149LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009153/* Override any GCC internal prototype to avoid an error.
9154 Use char because int might match the return type of a GCC
9155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009156#ifdef __cplusplus
9157extern "C"
9158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009159char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009160int
9161main ()
9162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ;
9165 return 0;
9166}
9167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009168if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009170else
Matthias Kloseb9621712010-04-24 17:59:49 +00009171 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009173rm -f core conftest.err conftest.$ac_objext \
9174 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009175LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9178$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009179if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 cat >>confdefs.h <<_ACEOF
9181#define HAVE_LIBDLD 1
9182_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009183
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009184 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009186fi
9187 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9189$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9190if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9191 $as_echo_n "(cached) " >&6
9192else
9193 ac_check_lib_save_LIBS=$LIBS
9194LIBS="-lcrypto $LIBS"
9195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9196/* end confdefs.h. */
9197
9198/* Override any GCC internal prototype to avoid an error.
9199 Use char because int might match the return type of a GCC
9200 builtin and then its argument prototype would still apply. */
9201#ifdef __cplusplus
9202extern "C"
9203#endif
9204char RAND_egd ();
9205int
9206main ()
9207{
9208return RAND_egd ();
9209 ;
9210 return 0;
9211}
9212_ACEOF
9213if ac_fn_c_try_link "$LINENO"; then :
9214 ac_cv_lib_crypto_RAND_egd=yes
9215else
9216 ac_cv_lib_crypto_RAND_egd=no
9217fi
9218rm -f core conftest.err conftest.$ac_objext \
9219 conftest$ac_exeext conftest.$ac_ext
9220LIBS=$ac_check_lib_save_LIBS
9221fi
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9223$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9224if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9225
9226$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9227
9228fi
9229
Martin v. Löwis519adae2003-09-20 10:47:47 +00009230
Georg Brandlb1441c72009-01-03 22:33:39 +00009231# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009232if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9234$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009235if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009236 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009237else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009238 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242/* Override any GCC internal prototype to avoid an error.
9243 Use char because int might match the return type of a GCC
9244 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009245#ifdef __cplusplus
9246extern "C"
9247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009248char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009249int
9250main ()
9251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ;
9254 return 0;
9255}
9256_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009257for ac_lib in '' pthread rt posix4; do
9258 if test -z "$ac_lib"; then
9259 ac_res="none required"
9260 else
9261 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009262 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009267rm -f core conftest.err conftest.$ac_objext \
9268 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009269 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272done
Victor Stinnere0be4232011-10-25 13:06:09 +02009273if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275else
9276 ac_cv_search_sem_init=no
9277fi
9278rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009279LIBS=$ac_func_search_save_LIBS
9280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9282$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009284if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009285 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009286
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009287fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009288 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009289 # posix4 on Solaris 2.6
9290 # pthread (first!) on Linux
9291fi
9292
Martin v. Löwis19d17342003-06-14 21:03:05 +00009293# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9295$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009296if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009297 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009298else
9299 ac_check_lib_save_LIBS=$LIBS
9300LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009302/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304/* Override any GCC internal prototype to avoid an error.
9305 Use char because int might match the return type of a GCC
9306 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009307#ifdef __cplusplus
9308extern "C"
9309#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009310char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009311int
9312main ()
9313{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009314return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009315 ;
9316 return 0;
9317}
9318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009319if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009320 ac_cv_lib_intl_textdomain=yes
9321else
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009324rm -f core conftest.err conftest.$ac_objext \
9325 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009326LIBS=$ac_check_lib_save_LIBS
9327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9329$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009330if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009331
Matthias Kloseb9621712010-04-24 17:59:49 +00009332$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009333
Brett Cannonc6d936e2009-06-07 20:09:53 +00009334 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009335fi
9336
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009337
9338# checks for system dependent C++ extensions support
9339case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9341$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009343/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009344
Georg Brandl59e87bd2011-02-15 19:48:59 +00009345 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009346int
9347main ()
9348{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009349loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ;
9351 return 0;
9352}
Matthias Kloseb159a552010-04-25 21:00:44 +00009353
Martin v. Löwis11437992002-04-12 09:54:03 +00009354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009355if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009356
Matthias Kloseb159a552010-04-25 21:00:44 +00009357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009359
Matthias Kloseb159a552010-04-25 21:00:44 +00009360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009361$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009362
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009363else
Matthias Kloseb159a552010-04-25 21:00:44 +00009364
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009366$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009367
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009369rm -f core conftest.err conftest.$ac_objext \
9370 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009371 *) ;;
9372esac
9373
Christian Heimes985ecdc2013-11-20 11:46:18 +01009374# check for systems that require aligned memory access
9375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9376$as_echo_n "checking aligned memory access is required... " >&6; }
9377if test "$cross_compiling" = yes; then :
9378 aligned_required=yes
9379else
9380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9381/* end confdefs.h. */
9382
9383int main()
9384{
9385 char s[16];
9386 int i, *p1, *p2;
9387 for (i=0; i < 16; i++)
9388 s[i] = i;
9389 p1 = (int*)(s+1);
9390 p2 = (int*)(s+2);
9391 if (*p1 == *p2)
9392 return 1;
9393 return 0;
9394}
9395
9396_ACEOF
9397if ac_fn_c_try_run "$LINENO"; then :
9398 aligned_required=no
9399else
9400 aligned_required=yes
9401fi
9402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9403 conftest.$ac_objext conftest.beam conftest.$ac_ext
9404fi
9405
9406
9407if test "$aligned_required" = yes ; then
9408
9409$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9410
9411fi
9412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9413$as_echo "$aligned_required" >&6; }
9414
9415
9416# str, bytes and memoryview hash algorithm
9417
9418
9419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9420$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9421
9422# Check whether --with-hash_algorithm was given.
9423if test "${with_hash_algorithm+set}" = set; then :
9424 withval=$with_hash_algorithm;
9425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9426$as_echo "$withval" >&6; }
9427case "$withval" in
9428 siphash24)
9429 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9430
9431 ;;
9432 fnv)
9433 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9434
9435 ;;
9436 *)
9437 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9438 ;;
9439esac
9440
9441else
9442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9443$as_echo "default" >&6; }
9444fi
9445
9446
Charles-François Natalid30b0222014-05-08 23:08:51 +01009447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9448$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9449
9450# Check whether --with-address_sanitizer was given.
9451if test "${with_address_sanitizer+set}" = set; then :
9452 withval=$with_address_sanitizer;
9453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9454$as_echo "$withval" >&6; }
9455BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9456LDFLAGS="-fsanitize=address $LDFLAGS"
9457
9458else
9459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
9461fi
9462
9463
Guido van Rossum70c7f481998-03-26 18:44:10 +00009464# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9466$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009467if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009469else
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009471LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475/* Override any GCC internal prototype to avoid an error.
9476 Use char because int might match the return type of a GCC
9477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009478#ifdef __cplusplus
9479extern "C"
9480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009481char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009482int
9483main ()
9484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 ;
9487 return 0;
9488}
9489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009492else
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009495rm -f core conftest.err conftest.$ac_objext \
9496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009497LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9500$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009501if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009502 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009503fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009504 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9506$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009507if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009508 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009509else
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009511LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515/* Override any GCC internal prototype to avoid an error.
9516 Use char because int might match the return type of a GCC
9517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009518#ifdef __cplusplus
9519extern "C"
9520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009521char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009522int
9523main ()
9524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ;
9527 return 0;
9528}
9529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009532else
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535rm -f core conftest.err conftest.$ac_objext \
9536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009537LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9540$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009541if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009542 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009543fi
9544 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009545
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9547$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009550if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9553$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009554LIBS="$withval $LIBS"
9555
9556else
Matthias Kloseb9621712010-04-24 17:59:49 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9558$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559fi
9560
Guido van Rossum7f43da71994-08-01 12:15:30 +00009561
Victor Stinner8291b5e2015-03-20 16:03:14 +01009562
9563
9564
9565
9566
9567
9568
9569if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9570 if test -n "$ac_tool_prefix"; then
9571 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9572set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9574$as_echo_n "checking for $ac_word... " >&6; }
9575if ${ac_cv_path_PKG_CONFIG+:} false; then :
9576 $as_echo_n "(cached) " >&6
9577else
9578 case $PKG_CONFIG in
9579 [\\/]* | ?:[\\/]*)
9580 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9581 ;;
9582 *)
9583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9584for as_dir in $PATH
9585do
9586 IFS=$as_save_IFS
9587 test -z "$as_dir" && as_dir=.
9588 for ac_exec_ext in '' $ac_executable_extensions; do
9589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9590 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9592 break 2
9593 fi
9594done
9595 done
9596IFS=$as_save_IFS
9597
9598 ;;
9599esac
9600fi
9601PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9602if test -n "$PKG_CONFIG"; then
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9604$as_echo "$PKG_CONFIG" >&6; }
9605else
9606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9607$as_echo "no" >&6; }
9608fi
9609
9610
9611fi
9612if test -z "$ac_cv_path_PKG_CONFIG"; then
9613 ac_pt_PKG_CONFIG=$PKG_CONFIG
9614 # Extract the first word of "pkg-config", so it can be a program name with args.
9615set dummy pkg-config; ac_word=$2
9616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9617$as_echo_n "checking for $ac_word... " >&6; }
9618if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620else
9621 case $ac_pt_PKG_CONFIG in
9622 [\\/]* | ?:[\\/]*)
9623 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9624 ;;
9625 *)
9626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9627for as_dir in $PATH
9628do
9629 IFS=$as_save_IFS
9630 test -z "$as_dir" && as_dir=.
9631 for ac_exec_ext in '' $ac_executable_extensions; do
9632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9633 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9635 break 2
9636 fi
9637done
9638 done
9639IFS=$as_save_IFS
9640
9641 ;;
9642esac
9643fi
9644ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9645if test -n "$ac_pt_PKG_CONFIG"; then
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9647$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9648else
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9650$as_echo "no" >&6; }
9651fi
9652
9653 if test "x$ac_pt_PKG_CONFIG" = x; then
9654 PKG_CONFIG=""
9655 else
9656 case $cross_compiling:$ac_tool_warned in
9657yes:)
9658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9660ac_tool_warned=yes ;;
9661esac
9662 PKG_CONFIG=$ac_pt_PKG_CONFIG
9663 fi
9664else
9665 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9666fi
9667
9668fi
9669if test -n "$PKG_CONFIG"; then
9670 _pkg_min_version=0.9.0
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9672$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9673 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9675$as_echo "yes" >&6; }
9676 else
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9678$as_echo "no" >&6; }
9679 PKG_CONFIG=""
9680 fi
9681fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009682
9683# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9685$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009686
9687# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009688if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009689 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009690else
9691 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009692fi
9693
9694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9696$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009697
9698# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9700$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009701
9702# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009704 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009705else
9706 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009707fi
9708
9709
9710if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009711 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9712else
9713 LIBFFI_INCLUDEDIR=""
9714fi
9715
9716
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9718$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009719
Stefan Krah60187b52012-03-23 19:06:27 +01009720# Check for use of the system libmpdec library
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9722$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9723
9724# Check whether --with-system_libmpdec was given.
9725if test "${with_system_libmpdec+set}" = set; then :
9726 withval=$with_system_libmpdec;
9727else
9728 with_system_libmpdec="no"
9729fi
9730
9731
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9733$as_echo "$with_system_libmpdec" >&6; }
9734
Benjamin Peterson076ed002010-10-31 17:11:02 +00009735# Check for support for loadable sqlite extensions
9736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9737$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9738# Check whether --enable-loadable-sqlite-extensions was given.
9739if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9740 enableval=$enable_loadable_sqlite_extensions;
9741else
9742 enable_loadable_sqlite_extensions="no"
9743fi
9744
9745
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9747$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9748
Ned Deilyd819b932013-09-06 01:07:05 -07009749# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9750
9751
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9753$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9754
9755# Check whether --with-tcltk-includes was given.
9756if test "${with_tcltk_includes+set}" = set; then :
9757 withval=$with_tcltk_includes;
9758else
9759 with_tcltk_includes="default"
9760fi
9761
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9763$as_echo "$with_tcltk_includes" >&6; }
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9765$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9766
9767# Check whether --with-tcltk-libs was given.
9768if test "${with_tcltk_libs+set}" = set; then :
9769 withval=$with_tcltk_libs;
9770else
9771 with_tcltk_libs="default"
9772fi
9773
9774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9775$as_echo "$with_tcltk_libs" >&6; }
9776if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9777then
9778 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9779 then
9780 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9781 fi
9782 TCLTK_INCLUDES=""
9783 TCLTK_LIBS=""
9784else
9785 TCLTK_INCLUDES="$with_tcltk_includes"
9786 TCLTK_LIBS="$with_tcltk_libs"
9787fi
9788
Matthias Klose55708cc2009-04-30 08:06:49 +00009789# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9791$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009792
9793# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009794if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009795 withval=$with_dbmliborder;
9796if test x$with_dbmliborder = xyes
9797then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009798as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009799else
9800 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9801 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9802 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009803 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009804 fi
9805 done
9806fi
9807fi
9808
Matthias Kloseb9621712010-04-24 17:59:49 +00009809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9810$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009811
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009812# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009813
9814
Matthias Kloseb9621712010-04-24 17:59:49 +00009815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9816$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009819if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820 withval=$with_signal_module;
9821fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009822
9823
9824if test -z "$with_signal_module"
9825then with_signal_module="yes"
9826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9828$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009829
9830if test "${with_signal_module}" = "yes"; then
9831 USE_SIGNAL_MODULE=""
9832 SIGNAL_OBJS=""
9833else
9834 USE_SIGNAL_MODULE="#"
9835 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9836fi
9837
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009838# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009839
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009840USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842
Martin v. Löwis11437992002-04-12 09:54:03 +00009843
9844# Templates for things AC_DEFINEd more than once.
9845# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009846
9847
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}: checking for --with-threads" >&5
9850$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 withval=$with_threads;
9855fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009856
9857
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009858# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009861if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862 withval=$with_thread; with_threads=$with_thread
9863fi
9864
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009865
9866if test -z "$with_threads"
9867then with_threads="yes"
9868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9870$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009871
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009872
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009873if test "$with_threads" = "no"
9874then
9875 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009876elif test "$ac_cv_pthread_is_default" = yes
9877then
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009879
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009880 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009882
9883 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009885elif test "$ac_cv_kpthread" = "yes"
9886then
9887 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009888 if test "$ac_cv_cxx_thread" = "yes"; then
9889 CXX="$CXX -Kpthread"
9890 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009892
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009893 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009894 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009895elif test "$ac_cv_kthread" = "yes"
9896then
9897 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009898 if test "$ac_cv_cxx_thread" = "yes"; then
9899 CXX="$CXX -Kthread"
9900 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009902
9903 posix_threads=yes
9904 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009905elif test "$ac_cv_pthread" = "yes"
9906then
9907 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009908 if test "$ac_cv_cxx_thread" = "yes"; then
9909 CXX="$CXX -pthread"
9910 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009912
9913 posix_threads=yes
9914 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009915else
9916 if test ! -z "$with_threads" -a -d "$with_threads"
9917 then LDFLAGS="$LDFLAGS -L$with_threads"
9918 fi
9919 if test ! -z "$withval" -a -d "$withval"
9920 then LDFLAGS="$LDFLAGS -L$withval"
9921 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009922
9923 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009924 # define _POSIX_THREADS in unistd.h. Some apparently don't
9925 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9927$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009929/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009930
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009931#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009932#ifdef _POSIX_THREADS
9933yes
9934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009935
9936_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009939 unistd_defines_pthreads=yes
9940else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009941 unistd_defines_pthreads=no
9942fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009943rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009944
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9946$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009947
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009949
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009950 # Just looking for pthread_create in libpthread is not enough:
9951 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9952 # So we really have to include pthread.h, and then link.
9953 _libs=$LIBS
9954 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9956$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009959
9960#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009961#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009962
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009963void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009964int
9965main ()
9966{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009967
9968pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009969 ;
9970 return 0;
9971}
9972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9976$as_echo "yes" >&6; }
9977 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009978
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009979 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009980 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009981else
Martin v. Löwis11437992002-04-12 09:54:03 +00009982
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009983 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009984 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009985if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009987
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009988 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009989 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009990else
Guido van Rossumad678af1998-10-02 14:42:15 +00009991
Matthias Kloseb9621712010-04-24 17:59:49 +00009992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9993$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009994if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009996else
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009998LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002/* Override any GCC internal prototype to avoid an error.
10003 Use char because int might match the return type of a GCC
10004 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010005#ifdef __cplusplus
10006extern "C"
10007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010008char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010009int
10010main ()
10011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 ;
10014 return 0;
10015}
10016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010019else
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010022rm -f core conftest.err conftest.$ac_objext \
10023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010024LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10027$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010028if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010029 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010030
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010031 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010032 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010033 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010034else
Greg Steinadf63d62000-07-05 10:38:09 +000010035
Matthias Kloseb9621712010-04-24 17:59:49 +000010036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10037$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010038if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010040else
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010042LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046/* Override any GCC internal prototype to avoid an error.
10047 Use char because int might match the return type of a GCC
10048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010049#ifdef __cplusplus
10050extern "C"
10051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010052char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010053int
10054main ()
10055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 ;
10058 return 0;
10059}
10060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010061if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010063else
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010066rm -f core conftest.err conftest.$ac_objext \
10067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010068LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10071$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010072if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010073 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010074
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010075 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010076 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010077 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010078else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010079
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10081$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010082if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010084else
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010086LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090/* Override any GCC internal prototype to avoid an error.
10091 Use char because int might match the return type of a GCC
10092 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010093#ifdef __cplusplus
10094extern "C"
10095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010096char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010097int
10098main ()
10099{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 ;
10102 return 0;
10103}
10104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010105if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010106 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010107else
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010110rm -f core conftest.err conftest.$ac_objext \
10111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010112LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10115$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010116if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010117 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010118
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010119 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010120 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010121 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010122else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010123
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10125$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010126if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010128else
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010130LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134/* Override any GCC internal prototype to avoid an error.
10135 Use char because int might match the return type of a GCC
10136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010137#ifdef __cplusplus
10138extern "C"
10139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010140char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010141int
10142main ()
10143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 ;
10146 return 0;
10147}
10148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010149if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010151else
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010154rm -f core conftest.err conftest.$ac_objext \
10155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010156LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10159$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010160if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010162
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010163 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010164 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010165 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010166else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010167
Martin v. Löwis130fb172001-07-19 11:00:41 +000010168 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010169fi
10170
Guido van Rossum627b2d71993-12-24 10:39:16 +000010171
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010172fi
10173
Guido van Rossum0be3e491997-05-22 20:33:33 +000010174fi
10175
Guido van Rossum49545951997-12-02 19:28:29 +000010176fi
10177
Guido van Rossumb93a8621998-05-07 13:27:32 +000010178fi
10179
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181rm -f core conftest.err conftest.$ac_objext \
10182 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010183
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10185$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010186if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010188else
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010190LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194/* Override any GCC internal prototype to avoid an error.
10195 Use char because int might match the return type of a GCC
10196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010197#ifdef __cplusplus
10198extern "C"
10199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010200char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010201int
10202main ()
10203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 ;
10206 return 0;
10207}
10208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214rm -f core conftest.err conftest.$ac_objext \
10215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010216LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10219$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010220if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010222
Martin v. Löwis130fb172001-07-19 11:00:41 +000010223 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010224 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010225 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010226fi
10227
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010228
Neal Norwitza978ab02002-11-02 16:58:05 +000010229 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10231$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010232if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010234else
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010236LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240/* Override any GCC internal prototype to avoid an error.
10241 Use char because int might match the return type of a GCC
10242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010243#ifdef __cplusplus
10244extern "C"
10245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010246char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010247int
10248main ()
10249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 ;
10252 return 0;
10253}
10254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010255if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010257else
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010260rm -f core conftest.err conftest.$ac_objext \
10261 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010262LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10265$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010266if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010268
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010269 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010270 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010271 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010272fi
10273
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010274 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010275fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010276
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010277if test "$posix_threads" = "yes"; then
10278 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010279
Matthias Kloseb9621712010-04-24 17:59:49 +000010280$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010281
10282 fi
10283
10284 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10285 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010286 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010287$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010288
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010289 ;;
10290 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010291$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010292
10293 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010294 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010295$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010296
10297 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010298 esac
10299
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10301$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010302 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010306 ac_cv_pthread_system_supported=no
10307else
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010310
10311 #include <stdio.h>
10312 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010313 void *foo(void *parm) {
10314 return NULL;
10315 }
10316 main() {
10317 pthread_attr_t attr;
10318 pthread_t id;
10319 if (pthread_attr_init(&attr)) exit(-1);
10320 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10321 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10322 exit(0);
10323 }
10324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010325if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010326 ac_cv_pthread_system_supported=yes
10327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10331 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010332fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334
Guido van Rossum627b2d71993-12-24 10:39:16 +000010335fi
10336
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10338$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010339 if test "$ac_cv_pthread_system_supported" = "yes"; then
10340
Matthias Kloseb9621712010-04-24 17:59:49 +000010341$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010342
10343 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 for ac_func in pthread_sigmask
10345do :
10346 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010347if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010348 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010350_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010351 case $ac_sys_system in
10352 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010353
Matthias Kloseb9621712010-04-24 17:59:49 +000010354$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010355
10356 ;;
10357 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010358fi
10359done
10360
Christian Heimesf77b4b22013-08-21 13:26:05 +020010361 for ac_func in pthread_atfork
10362do :
10363 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10364if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10365 cat >>confdefs.h <<_ACEOF
10366#define HAVE_PTHREAD_ATFORK 1
10367_ACEOF
10368
10369fi
10370done
10371
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010372fi
10373
10374
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010375# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10378$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010380if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010381 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010382 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010385 ipv6=no
10386 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10388$as_echo "yes" >&6; }
10389 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010390
10391 ipv6=yes
10392 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010394else
Martin v. Löwis11437992002-04-12 09:54:03 +000010395
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010397/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010398 /* AF_INET6 available check */
10399#include <sys/types.h>
10400#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010401int
10402main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010403{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010404int domain = AF_INET6;
10405 ;
10406 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010407}
Martin v. Löwis11437992002-04-12 09:54:03 +000010408_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010409if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010410
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10412$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010413 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010414
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010415else
Matthias Kloseb159a552010-04-25 21:00:44 +000010416
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010419 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010420
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010421fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010423
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010424if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10426$as_echo_n "checking if RFC2553 API is available... " >&6; }
10427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010429
10430 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010431#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010432int
10433main ()
10434{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010435struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010436 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ;
10438 return 0;
10439}
Matthias Kloseb159a552010-04-25 21:00:44 +000010440
Martin v. Löwis11437992002-04-12 09:54:03 +000010441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010442if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010443
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010445$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010446 ipv6=yes
10447
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010448else
Matthias Kloseb159a552010-04-25 21:00:44 +000010449
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010451$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010452 ipv6=no
10453
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010456fi
10457
10458if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010460
10461fi
10462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010463fi
10464
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010465
10466ipv6type=unknown
10467ipv6lib=none
10468ipv6trylibc=no
10469
10470if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10472$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010473 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10474 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010475 case $i in
10476 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010478/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010479
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010480#include <netinet/in.h>
10481#ifdef IPV6_INRIA_VERSION
10482yes
10483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010487 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010488fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010489rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010490
10491 ;;
10492 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010494/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010495
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010496#include <netinet/in.h>
10497#ifdef __KAME__
10498yes
10499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010500_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010502 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010503 ipv6type=$i;
10504 ipv6lib=inet6
10505 ipv6libdir=/usr/local/v6/lib
10506 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010507fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010508rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010509
10510 ;;
10511 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010513/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010514
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010515#include <features.h>
10516#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10517yes
10518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010519_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010522 ipv6type=$i;
10523 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010524fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010525rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010526
10527 ;;
10528 linux-inet6)
10529 if test -d /usr/inet6; then
10530 ipv6type=$i
10531 ipv6lib=inet6
10532 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010533 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010534 fi
10535 ;;
10536 solaris)
10537 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010538 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010539 ipv6type=$i
10540 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010541 fi
10542 fi
10543 ;;
10544 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010546/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010547
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010548#include <sys/param.h>
10549#ifdef _TOSHIBA_INET6
10550yes
10551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010552_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010555 ipv6type=$i;
10556 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010557 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010558fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010559rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010560
10561 ;;
10562 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010565
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010566#include </usr/local/v6/include/sys/v6config.h>
10567#ifdef __V6D__
10568yes
10569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010570_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010573 ipv6type=$i;
10574 ipv6lib=v6;
10575 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010576 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010577fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010578rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010579
10580 ;;
10581 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010583/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010584
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010585#include <sys/param.h>
10586#ifdef _ZETA_MINAMI_INET6
10587yes
10588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010589_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010592 ipv6type=$i;
10593 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010594 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010595fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010596rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010597
10598 ;;
10599 esac
10600 if test "$ipv6type" != "unknown"; then
10601 break
10602 fi
10603 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10605$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606fi
10607
10608if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10609 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10610 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10611 echo "using lib$ipv6lib"
10612 else
10613 if test $ipv6trylibc = "yes"; then
10614 echo "using libc"
10615 else
10616 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10617 echo "You need to fetch lib$ipv6lib.a from appropriate"
10618 echo 'ipv6 kit and compile beforehand.'
10619 exit 1
10620 fi
10621 fi
10622fi
10623
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10625$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10627/* end confdefs.h. */
10628 /* CAN_RAW_FD_FRAMES available check */
10629#include <linux/can/raw.h>
10630int
10631main ()
10632{
10633int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10634 ;
10635 return 0;
10636}
10637_ACEOF
10638if ac_fn_c_try_compile "$LINENO"; then :
10639
10640
10641$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10642
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10644$as_echo "yes" >&6; }
10645
10646else
10647
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
10650
10651fi
10652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10655$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010657/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010658
10659 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010660int
10661main ()
10662{
10663FSIORefNum fRef = 0
10664 ;
10665 return 0;
10666}
Matthias Kloseb159a552010-04-25 21:00:44 +000010667
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010670
Matthias Kloseb159a552010-04-25 21:00:44 +000010671
Matthias Kloseb9621712010-04-24 17:59:49 +000010672$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10675$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010676
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010677else
Matthias Kloseb159a552010-04-25 21:00:44 +000010678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010681
10682fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10684
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010685# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10687$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010690if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 withval=$with_doc_strings;
10692fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010693
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010694
10695if test -z "$with_doc_strings"
10696then with_doc_strings="yes"
10697fi
10698if test "$with_doc_strings" != "no"
10699then
10700
Matthias Kloseb9621712010-04-24 17:59:49 +000010701$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010702
10703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10705$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010706
Antoine Pitrou042b1282010-08-13 21:15:58 +000010707# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10709$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010712if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010714if test "$withval" != no
10715then
10716
Matthias Kloseb9621712010-04-24 17:59:49 +000010717$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010718
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10720$as_echo "yes" >&6; }
10721else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010723fi
10724else
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10726$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727fi
10728
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010729
10730# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10732$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010735if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736 withval=$with_pymalloc;
10737fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010738
Neil Schemenauera35c6882001-02-27 04:45:05 +000010739
Neil Schemenauer16c22972002-03-22 15:34:49 +000010740if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010741then
10742 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010743fi
10744if test "$with_pymalloc" != "no"
10745then
Martin v. Löwis11437992002-04-12 09:54:03 +000010746
Matthias Kloseb9621712010-04-24 17:59:49 +000010747$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010748
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010749 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10752$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010753
Benjamin Peterson05159c42009-12-03 03:01:27 +000010754# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10756$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010757
10758# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010759if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010760 withval=$with_valgrind;
10761else
10762 with_valgrind=no
10763fi
10764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10766$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010767if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 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 +020010769if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010770
Matthias Kloseb9621712010-04-24 17:59:49 +000010771$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010772
10773else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010774 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010775
10776fi
10777
10778
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010779 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010780fi
10781
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010782# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010783
Guido van Rossum98935bf2001-09-05 19:13:16 +000010784DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010785
Guido van Rossume97ee181999-12-20 21:27:22 +000010786# the dlopen() function means we might want to use dynload_shlib.o. some
10787# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010788for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010789do :
10790 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010791if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010792 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010793#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010794_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010795
Guido van Rossume97ee181999-12-20 21:27:22 +000010796fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010797done
Guido van Rossume97ee181999-12-20 21:27:22 +000010798
Michael W. Hudson54241132001-12-07 15:38:26 +000010799
Guido van Rossume97ee181999-12-20 21:27:22 +000010800# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10801# loading of modules.
10802
Matthias Kloseb9621712010-04-24 17:59:49 +000010803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10804$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010805if test -z "$DYNLOADFILE"
10806then
10807 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010808 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10809 if test "$ac_cv_func_dlopen" = yes
10810 then DYNLOADFILE="dynload_shlib.o"
10811 else DYNLOADFILE="dynload_aix.o"
10812 fi
10813 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010814 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010815 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10816 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010817 *)
10818 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10819 # out any dynamic loading
10820 if test "$ac_cv_func_dlopen" = yes
10821 then DYNLOADFILE="dynload_shlib.o"
10822 else DYNLOADFILE="dynload_stub.o"
10823 fi
10824 ;;
10825 esac
10826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10828$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010829if test "$DYNLOADFILE" != "dynload_stub.o"
10830then
Martin v. Löwis11437992002-04-12 09:54:03 +000010831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010833
10834fi
10835
Neil Schemenauer4e425612001-06-19 15:44:15 +000010836# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10837
Michael W. Hudson54241132001-12-07 15:38:26 +000010838
Matthias Kloseb9621712010-04-24 17:59:49 +000010839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10840$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010841if test -z "$MACHDEP_OBJS"
10842then
Jack Jansene578a632001-08-15 01:27:14 +000010843 MACHDEP_OBJS=$extra_machdep_objs
10844else
10845 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010846fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010847if test -z "$MACHDEP_OBJS"; then
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10849$as_echo "none" >&6; }
10850else
10851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10852$as_echo "$MACHDEP_OBJS" >&6; }
10853fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010854
Guido van Rossum627b2d71993-12-24 10:39:16 +000010855# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010856for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010857 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010858 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010859 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010860 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010861 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010862 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010863 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10864 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010865 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010866 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010867 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010868 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010869 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010870 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010871 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10872 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010873 sigaction sigaltstack siginterrupt sigpending sigrelse \
10874 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010875 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010876 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010877 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010878do :
10879 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10880ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010881if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010883#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010884_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010885
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010886fi
10887done
10888
Michael W. Hudson54241132001-12-07 15:38:26 +000010889
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010890ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10891 #include <dirent.h>
10892"
10893if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10894
10895$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10896
10897fi
10898
10899
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010900# For some functions, having a definition is not sufficient, since
10901# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10903$as_echo_n "checking for chroot... " >&6; }
10904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010906#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010907int
10908main ()
10909{
10910void *x=chroot
10911 ;
10912 return 0;
10913}
10914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010918
Matthias Kloseb159a552010-04-25 21:00:44 +000010919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010921else
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10923$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010924
10925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10928$as_echo_n "checking for link... " >&6; }
10929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010930/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010931#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010932int
10933main ()
10934{
10935void *x=link
10936 ;
10937 return 0;
10938}
10939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010943
Matthias Kloseb159a552010-04-25 21:00:44 +000010944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010945$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010946else
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10948$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010949
10950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10953$as_echo_n "checking for symlink... " >&6; }
10954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010955/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010956#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010957int
10958main ()
10959{
10960void *x=symlink
10961 ;
10962 return 0;
10963}
10964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010965if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010968
Matthias Kloseb159a552010-04-25 21:00:44 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010970$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010974
10975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10978$as_echo_n "checking for fchdir... " >&6; }
10979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010981#include <unistd.h>
10982int
10983main ()
10984{
10985void *x=fchdir
10986 ;
10987 return 0;
10988}
10989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010990if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010993
Matthias Kloseb159a552010-04-25 21:00:44 +000010994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010995$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010996else
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10998$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010999
11000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11003$as_echo_n "checking for fsync... " >&6; }
11004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011005/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011006#include <unistd.h>
11007int
11008main ()
11009{
11010void *x=fsync
11011 ;
11012 return 0;
11013}
11014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011015if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011016
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011018
Matthias Kloseb159a552010-04-25 21:00:44 +000011019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011020$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011021else
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011024
11025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11028$as_echo_n "checking for fdatasync... " >&6; }
11029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011030/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011031#include <unistd.h>
11032int
11033main ()
11034{
11035void *x=fdatasync
11036 ;
11037 return 0;
11038}
11039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011043
Matthias Kloseb159a552010-04-25 21:00:44 +000011044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011045$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011046else
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011049
11050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11053$as_echo_n "checking for epoll... " >&6; }
11054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011055/* end confdefs.h. */
11056#include <sys/epoll.h>
11057int
11058main ()
11059{
11060void *x=epoll_create
11061 ;
11062 return 0;
11063}
11064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011065if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011068
Matthias Kloseb159a552010-04-25 21:00:44 +000011069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011070$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011071else
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11073$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011074
11075fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11078$as_echo_n "checking for epoll_create1... " >&6; }
11079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11080/* end confdefs.h. */
11081#include <sys/epoll.h>
11082int
11083main ()
11084{
11085void *x=epoll_create1
11086 ;
11087 return 0;
11088}
11089_ACEOF
11090if ac_fn_c_try_compile "$LINENO"; then :
11091
11092$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11093
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11095$as_echo "yes" >&6; }
11096else
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11098$as_echo "no" >&6; }
11099
11100fi
11101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11103$as_echo_n "checking for kqueue... " >&6; }
11104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011105/* end confdefs.h. */
11106
11107#include <sys/types.h>
11108#include <sys/event.h>
11109
11110int
11111main ()
11112{
11113int x=kqueue()
11114 ;
11115 return 0;
11116}
11117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011118if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011119
Matthias Kloseb9621712010-04-24 17:59:49 +000011120$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011121
Matthias Kloseb159a552010-04-25 21:00:44 +000011122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011123$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011124else
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11126$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011127
11128fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11131$as_echo_n "checking for prlimit... " >&6; }
11132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11133/* end confdefs.h. */
11134
11135#include <sys/time.h>
11136#include <sys/resource.h>
11137
11138int
11139main ()
11140{
11141void *x=prlimit
11142 ;
11143 return 0;
11144}
11145_ACEOF
11146if ac_fn_c_try_compile "$LINENO"; then :
11147
11148$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11149
11150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11151$as_echo "yes" >&6; }
11152else
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11154$as_echo "no" >&6; }
11155
11156fi
11157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11158
Martin v. Löwisd5843682002-11-21 20:41:28 +000011159# On some systems (eg. FreeBSD 5), we would find a definition of the
11160# functions ctermid_r, setgroups in the library, but no prototype
11161# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11162# address to avoid compiler warnings and potential miscompilations
11163# because of the missing prototypes.
11164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11166$as_echo_n "checking for ctermid_r... " >&6; }
11167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011169
Martin v. Löwisd5843682002-11-21 20:41:28 +000011170#include <stdio.h>
11171
Martin v. Löwisd5843682002-11-21 20:41:28 +000011172int
11173main ()
11174{
11175void* p = ctermid_r
11176 ;
11177 return 0;
11178}
11179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011181
Matthias Kloseb9621712010-04-24 17:59:49 +000011182$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011183
Matthias Kloseb159a552010-04-25 21:00:44 +000011184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011185$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011186else
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011189
11190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11192
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11194$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011195if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011196 $as_echo_n "(cached) " >&6
11197else
11198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011199/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011200#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011201int
11202main ()
11203{
11204void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011205
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011206 ;
11207 return 0;
11208}
11209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011210if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011211 ac_cv_flock_decl=yes
11212else
11213 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011214
11215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011217
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011218fi
11219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11220$as_echo "$ac_cv_flock_decl" >&6; }
11221if test "x${ac_cv_flock_decl}" = xyes; then
11222 for ac_func in flock
11223do :
11224 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011225if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011226 cat >>confdefs.h <<_ACEOF
11227#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011228_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011229
Antoine Pitroua3000072010-09-07 14:52:42 +000011230else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011232$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011233if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011234 $as_echo_n "(cached) " >&6
11235else
11236 ac_check_lib_save_LIBS=$LIBS
11237LIBS="-lbsd $LIBS"
11238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11239/* end confdefs.h. */
11240
11241/* Override any GCC internal prototype to avoid an error.
11242 Use char because int might match the return type of a GCC
11243 builtin and then its argument prototype would still apply. */
11244#ifdef __cplusplus
11245extern "C"
11246#endif
11247char flock ();
11248int
11249main ()
11250{
11251return flock ();
11252 ;
11253 return 0;
11254}
11255_ACEOF
11256if ac_fn_c_try_link "$LINENO"; then :
11257 ac_cv_lib_bsd_flock=yes
11258else
11259 ac_cv_lib_bsd_flock=no
11260fi
11261rm -f core conftest.err conftest.$ac_objext \
11262 conftest$ac_exeext conftest.$ac_ext
11263LIBS=$ac_check_lib_save_LIBS
11264fi
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11266$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011267if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011268 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011269
11270
11271$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11272
11273
11274fi
11275
11276
11277fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011278done
11279
Antoine Pitroua3000072010-09-07 14:52:42 +000011280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11283$as_echo_n "checking for getpagesize... " >&6; }
11284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011285/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011286
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011287#include <unistd.h>
11288
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011289int
11290main ()
11291{
11292void* p = getpagesize
11293 ;
11294 return 0;
11295}
11296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011300
Matthias Kloseb159a552010-04-25 21:00:44 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011303else
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011306
11307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011309
Victor Stinner984890f2011-11-24 13:53:38 +010011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11311$as_echo_n "checking for broken unsetenv... " >&6; }
11312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11313/* end confdefs.h. */
11314
11315#include <stdlib.h>
11316
11317int
11318main ()
11319{
11320int res = unsetenv("DUMMY")
11321 ;
11322 return 0;
11323}
11324_ACEOF
11325if ac_fn_c_try_compile "$LINENO"; then :
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
11328else
11329
11330$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11331
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11333$as_echo "yes" >&6; }
11334
11335fi
11336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11337
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011338for ac_prog in true
11339do
11340 # Extract the first word of "$ac_prog", so it can be a program name with args.
11341set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11343$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011344if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011346else
11347 if test -n "$TRUE"; then
11348 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11349else
11350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11351for as_dir in $PATH
11352do
11353 IFS=$as_save_IFS
11354 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011355 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011356 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011357 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 $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 +000011359 break 2
11360 fi
11361done
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011364
11365fi
11366fi
11367TRUE=$ac_cv_prog_TRUE
11368if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11370$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011371else
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11373$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011374fi
11375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011377 test -n "$TRUE" && break
11378done
11379test -n "$TRUE" || TRUE="/bin/true"
11380
11381
Matthias Kloseb9621712010-04-24 17:59:49 +000011382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11383$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011384if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011386else
11387 ac_check_lib_save_LIBS=$LIBS
11388LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392/* Override any GCC internal prototype to avoid an error.
11393 Use char because int might match the return type of a GCC
11394 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011395#ifdef __cplusplus
11396extern "C"
11397#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011398char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011399int
11400main ()
11401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011403 ;
11404 return 0;
11405}
11406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011407if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011408 ac_cv_lib_c_inet_aton=yes
11409else
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011412rm -f core conftest.err conftest.$ac_objext \
11413 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011414LIBS=$ac_check_lib_save_LIBS
11415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11417$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011418if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011419 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011420else
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11422$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011423if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011425else
11426 ac_check_lib_save_LIBS=$LIBS
11427LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011429/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011431/* Override any GCC internal prototype to avoid an error.
11432 Use char because int might match the return type of a GCC
11433 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011434#ifdef __cplusplus
11435extern "C"
11436#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011437char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011438int
11439main ()
11440{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011442 ;
11443 return 0;
11444}
11445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011447 ac_cv_lib_resolv_inet_aton=yes
11448else
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011451rm -f core conftest.err conftest.$ac_objext \
11452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011453LIBS=$ac_check_lib_save_LIBS
11454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11456$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011457if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011458 cat >>confdefs.h <<_ACEOF
11459#define HAVE_LIBRESOLV 1
11460_ACEOF
11461
11462 LIBS="-lresolv $LIBS"
11463
11464fi
11465
11466
11467fi
11468
11469
Christian Heimesd0764e22007-12-04 15:00:33 +000011470# On Tru64, chflags seems to be present, but calling it will
11471# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11473$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011474if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011476else
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011478 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011479else
Matthias Kloseb9621712010-04-24 17:59:49 +000011480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011481/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011482
Christian Heimesd0764e22007-12-04 15:00:33 +000011483#include <sys/stat.h>
11484#include <unistd.h>
11485int main(int argc, char*argv[])
11486{
11487 if(chflags(argv[0], 0) != 0)
11488 return 1;
11489 return 0;
11490}
Ned Deily3eb67d52011-06-28 00:00:28 -070011491
Christian Heimesd0764e22007-12-04 15:00:33 +000011492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011493if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011494 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011495else
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011500fi
11501
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11505$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011506if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011508if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011509 ac_cv_have_chflags="yes"
11510else
11511 ac_cv_have_chflags="no"
11512fi
11513
11514fi
11515if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011516
Matthias Kloseb9621712010-04-24 17:59:49 +000011517$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011518
11519fi
11520
Matthias Kloseb9621712010-04-24 17:59:49 +000011521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11522$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011523if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011525else
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011527 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011528else
Matthias Kloseb9621712010-04-24 17:59:49 +000011529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011530/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011531
Christian Heimesd0764e22007-12-04 15:00:33 +000011532#include <sys/stat.h>
11533#include <unistd.h>
11534int main(int argc, char*argv[])
11535{
11536 if(lchflags(argv[0], 0) != 0)
11537 return 1;
11538 return 0;
11539}
Ned Deily3eb67d52011-06-28 00:00:28 -070011540
Christian Heimesd0764e22007-12-04 15:00:33 +000011541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011542if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011543 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011544else
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011549fi
11550
11551
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11554$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011555if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011557if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011558 ac_cv_have_lchflags="yes"
11559else
11560 ac_cv_have_lchflags="no"
11561fi
11562
11563fi
11564if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011567
11568fi
11569
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011570case $ac_sys_system/$ac_sys_release in
11571Darwin/*)
11572 _CUR_CFLAGS="${CFLAGS}"
11573 _CUR_LDFLAGS="${LDFLAGS}"
11574 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11575 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11576 ;;
11577esac
11578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11580$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011581if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011583else
11584 ac_check_lib_save_LIBS=$LIBS
11585LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011587/* end confdefs.h. */
11588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589/* Override any GCC internal prototype to avoid an error.
11590 Use char because int might match the return type of a GCC
11591 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011592#ifdef __cplusplus
11593extern "C"
11594#endif
11595char inflateCopy ();
11596int
11597main ()
11598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011599return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011600 ;
11601 return 0;
11602}
11603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011604if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011605 ac_cv_lib_z_inflateCopy=yes
11606else
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011609rm -f core conftest.err conftest.$ac_objext \
11610 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011611LIBS=$ac_check_lib_save_LIBS
11612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11614$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011615if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011618
11619fi
11620
11621
11622case $ac_sys_system/$ac_sys_release in
11623Darwin/*)
11624 CFLAGS="${_CUR_CFLAGS}"
11625 LDFLAGS="${_CUR_LDFLAGS}"
11626 ;;
11627esac
11628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11630$as_echo_n "checking for hstrerror... " >&6; }
11631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011633
Martin v. Löwise9416172003-05-03 10:12:45 +000011634#include <netdb.h>
11635
Martin v. Löwise9416172003-05-03 10:12:45 +000011636int
11637main ()
11638{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011639void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011640 ;
11641 return 0;
11642}
11643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011645
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011647
Matthias Kloseb159a552010-04-25 21:00:44 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011649$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011650else
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11652$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011653
11654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011655rm -f core conftest.err conftest.$ac_objext \
11656 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11659$as_echo_n "checking for inet_aton... " >&6; }
11660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011661/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011662
Martin v. Löwis86d66262006-02-17 08:40:11 +000011663#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011664#include <sys/socket.h>
11665#include <netinet/in.h>
11666#include <arpa/inet.h>
11667
Martin v. Löwise9416172003-05-03 10:12:45 +000011668int
11669main ()
11670{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011671void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011672 ;
11673 return 0;
11674}
11675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011676if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011677
Matthias Kloseb9621712010-04-24 17:59:49 +000011678$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011679
Matthias Kloseb159a552010-04-25 21:00:44 +000011680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011681$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011682else
Matthias Kloseb9621712010-04-24 17:59:49 +000011683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11684$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011685
11686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011687rm -f core conftest.err conftest.$ac_objext \
11688 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11691$as_echo_n "checking for inet_pton... " >&6; }
11692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011693/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011694
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011695#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011696#include <sys/socket.h>
11697#include <netinet/in.h>
11698#include <arpa/inet.h>
11699
Martin v. Löwise9416172003-05-03 10:12:45 +000011700int
11701main ()
11702{
11703void* p = inet_pton
11704 ;
11705 return 0;
11706}
11707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011708if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011711
Matthias Kloseb159a552010-04-25 21:00:44 +000011712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011713$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011714else
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11716$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011717
11718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011720
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011721# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11723$as_echo_n "checking for setgroups... " >&6; }
11724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011726
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011727#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011728#ifdef HAVE_GRP_H
11729#include <grp.h>
11730#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011731
Martin v. Löwisd5843682002-11-21 20:41:28 +000011732int
11733main ()
11734{
11735void* p = setgroups
11736 ;
11737 return 0;
11738}
11739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011741
Matthias Kloseb9621712010-04-24 17:59:49 +000011742$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011743
Matthias Kloseb159a552010-04-25 21:00:44 +000011744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011745$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011746else
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11748$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011749
11750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011752
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011753# check for openpty and forkpty
11754
11755for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011756do :
11757 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011761_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011762
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11765$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011766if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011768else
Martin v. Löwis11437992002-04-12 09:54:03 +000011769 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011770LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774/* Override any GCC internal prototype to avoid an error.
11775 Use char because int might match the return type of a GCC
11776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011777#ifdef __cplusplus
11778extern "C"
11779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011780char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011781int
11782main ()
11783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011784return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 ;
11786 return 0;
11787}
11788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011791else
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011794rm -f core conftest.err conftest.$ac_objext \
11795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011796LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11799$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011800if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011802 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011803else
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11805$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011806if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011808else
11809 ac_check_lib_save_LIBS=$LIBS
11810LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011812/* end confdefs.h. */
11813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814/* Override any GCC internal prototype to avoid an error.
11815 Use char because int might match the return type of a GCC
11816 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011817#ifdef __cplusplus
11818extern "C"
11819#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011820char openpty ();
11821int
11822main ()
11823{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011824return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011825 ;
11826 return 0;
11827}
11828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011830 ac_cv_lib_bsd_openpty=yes
11831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011834rm -f core conftest.err conftest.$ac_objext \
11835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011836LIBS=$ac_check_lib_save_LIBS
11837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11839$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011840if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011842 LIBS="$LIBS -lbsd"
11843fi
11844
11845
11846fi
11847
Fred Drake8cef4cf2000-06-28 16:40:38 +000011848
11849fi
11850done
11851
11852for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011853do :
11854 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011855if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011857#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011858_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011859
Fred Drake8cef4cf2000-06-28 16:40:38 +000011860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11862$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011865else
Martin v. Löwis11437992002-04-12 09:54:03 +000011866 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011867LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011871/* Override any GCC internal prototype to avoid an error.
11872 Use char because int might match the return type of a GCC
11873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011874#ifdef __cplusplus
11875extern "C"
11876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011877char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011878int
11879main ()
11880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011881return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011882 ;
11883 return 0;
11884}
11885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011887 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891rm -f core conftest.err conftest.$ac_objext \
11892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011893LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11896$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011899 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011900else
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11902$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011903if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011905else
11906 ac_check_lib_save_LIBS=$LIBS
11907LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011909/* end confdefs.h. */
11910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011911/* Override any GCC internal prototype to avoid an error.
11912 Use char because int might match the return type of a GCC
11913 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011914#ifdef __cplusplus
11915extern "C"
11916#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011917char forkpty ();
11918int
11919main ()
11920{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011921return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011922 ;
11923 return 0;
11924}
11925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011926if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011927 ac_cv_lib_bsd_forkpty=yes
11928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011931rm -f core conftest.err conftest.$ac_objext \
11932 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011933LIBS=$ac_check_lib_save_LIBS
11934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11936$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011937if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011939 LIBS="$LIBS -lbsd"
11940fi
11941
11942
11943fi
11944
Fred Drake8cef4cf2000-06-28 16:40:38 +000011945
11946fi
11947done
11948
Jack Jansendd19cf82001-12-06 22:36:17 +000011949
Christian Heimesb186d002008-03-18 15:15:01 +000011950# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011951for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011952do :
11953 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011954if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011955 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011957_ACEOF
11958
11959fi
11960done
11961
11962
Michael W. Hudson54241132001-12-07 15:38:26 +000011963# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011964for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011965do :
11966 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11967ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011968if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011970#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011971_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011972
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011974done
11975
Michael W. Hudson54241132001-12-07 15:38:26 +000011976
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011977ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011978if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011979 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011980
Martin v. Löwis1142de32002-03-29 16:28:31 +000011981else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011983 *" dup2.$ac_objext "* ) ;;
11984 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011985 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011986esac
11987
Martin v. Löwis1142de32002-03-29 16:28:31 +000011988fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011989
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011990ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011991if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011992 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11993
11994else
11995 case " $LIBOBJS " in
11996 *" strdup.$ac_objext "* ) ;;
11997 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11998 ;;
11999esac
12000
12001fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012002
12003
12004for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012005do :
12006 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012007if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012009#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012012/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012013#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012014int
12015main ()
12016{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012017getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 ;
12019 return 0;
12020}
12021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012022if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012025
Guido van Rossum627b2d71993-12-24 10:39:16 +000012026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012028
Guido van Rossum627b2d71993-12-24 10:39:16 +000012029fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012030done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012031
Jack Jansen150753c2003-03-29 22:07:47 +000012032for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012033do :
12034 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012035if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012036 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012040/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012041#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012042int
12043main ()
12044{
12045setpgrp(0,0);
12046 ;
12047 return 0;
12048}
12049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012050if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012053
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012056
12057fi
12058done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012059
Thomas Wouters3a584202000-08-05 23:28:51 +000012060for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012061do :
12062 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012063if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012065#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012068/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012069#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012070int
12071main ()
12072{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012073gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012074 ;
12075 return 0;
12076}
12077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078if ac_fn_c_try_compile "$LINENO"; then :
12079
Guido van Rossum627b2d71993-12-24 10:39:16 +000012080else
Skip Montanaro6dead952003-09-25 14:50:04 +000012081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012083
Martin v. Löwis11437992002-04-12 09:54:03 +000012084
Guido van Rossum627b2d71993-12-24 10:39:16 +000012085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012087
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012088fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012089done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012090
Michael W. Hudson54241132001-12-07 15:38:26 +000012091
Victor Stinnere0be4232011-10-25 13:06:09 +020012092for ac_func in clock_gettime
12093do :
12094 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12095if test "x$ac_cv_func_clock_gettime" = xyes; then :
12096 cat >>confdefs.h <<_ACEOF
12097#define HAVE_CLOCK_GETTIME 1
12098_ACEOF
12099
12100else
12101
12102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12103$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12104if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12105 $as_echo_n "(cached) " >&6
12106else
12107 ac_check_lib_save_LIBS=$LIBS
12108LIBS="-lrt $LIBS"
12109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12110/* end confdefs.h. */
12111
12112/* Override any GCC internal prototype to avoid an error.
12113 Use char because int might match the return type of a GCC
12114 builtin and then its argument prototype would still apply. */
12115#ifdef __cplusplus
12116extern "C"
12117#endif
12118char clock_gettime ();
12119int
12120main ()
12121{
12122return clock_gettime ();
12123 ;
12124 return 0;
12125}
12126_ACEOF
12127if ac_fn_c_try_link "$LINENO"; then :
12128 ac_cv_lib_rt_clock_gettime=yes
12129else
12130 ac_cv_lib_rt_clock_gettime=no
12131fi
12132rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext conftest.$ac_ext
12134LIBS=$ac_check_lib_save_LIBS
12135fi
12136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12137$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12138if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12139
Victor Stinner7efb8332014-08-29 15:41:08 +020012140 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012141 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12142
12143
12144$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12145
12146
12147fi
12148
12149
12150fi
12151done
12152
12153
12154for ac_func in clock_getres
12155do :
12156 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12157if test "x$ac_cv_func_clock_getres" = xyes; then :
12158 cat >>confdefs.h <<_ACEOF
12159#define HAVE_CLOCK_GETRES 1
12160_ACEOF
12161
12162else
12163
12164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12165$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12166if ${ac_cv_lib_rt_clock_getres+:} false; then :
12167 $as_echo_n "(cached) " >&6
12168else
12169 ac_check_lib_save_LIBS=$LIBS
12170LIBS="-lrt $LIBS"
12171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12172/* end confdefs.h. */
12173
12174/* Override any GCC internal prototype to avoid an error.
12175 Use char because int might match the return type of a GCC
12176 builtin and then its argument prototype would still apply. */
12177#ifdef __cplusplus
12178extern "C"
12179#endif
12180char clock_getres ();
12181int
12182main ()
12183{
12184return clock_getres ();
12185 ;
12186 return 0;
12187}
12188_ACEOF
12189if ac_fn_c_try_link "$LINENO"; then :
12190 ac_cv_lib_rt_clock_getres=yes
12191else
12192 ac_cv_lib_rt_clock_getres=no
12193fi
12194rm -f core conftest.err conftest.$ac_objext \
12195 conftest$ac_exeext conftest.$ac_ext
12196LIBS=$ac_check_lib_save_LIBS
12197fi
12198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12199$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12200if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12201
12202 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12203
12204
12205fi
12206
12207
12208fi
12209done
12210
12211
Matthias Kloseb9621712010-04-24 17:59:49 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12213$as_echo_n "checking for major... " >&6; }
12214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012215/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012216
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012217#if defined(MAJOR_IN_MKDEV)
12218#include <sys/mkdev.h>
12219#elif defined(MAJOR_IN_SYSMACROS)
12220#include <sys/sysmacros.h>
12221#else
12222#include <sys/types.h>
12223#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012224
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012225int
12226main ()
12227{
12228
12229 makedev(major(0),minor(0));
12230
12231 ;
12232 return 0;
12233}
12234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012236
12237
Matthias Kloseb9621712010-04-24 17:59:49 +000012238$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12241$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012242
12243else
Skip Montanaro6dead952003-09-25 14:50:04 +000012244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12246$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012247
12248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012249rm -f core conftest.err conftest.$ac_objext \
12250 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012251
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012252# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012253# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12255$as_echo_n "checking for getaddrinfo... " >&6; }
12256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012257/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012258
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012259#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012260#include <sys/socket.h>
12261#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012262#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012263
Martin v. Löwis11437992002-04-12 09:54:03 +000012264int
12265main ()
12266{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012267getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 ;
12269 return 0;
12270}
12271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012272if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012273 have_getaddrinfo=yes
12274else
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012277rm -f core conftest.err conftest.$ac_objext \
12278 conftest$ac_exeext conftest.$ac_ext
12279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12280$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012281if test $have_getaddrinfo = yes
12282then
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12284$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012285 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012287else
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012289
12290if test "${enable_ipv6+set}" = set; then
12291 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12292else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012293 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012294fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012295else
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012297/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012298
Stefan Krah19c21392012-11-22 23:47:32 +010012299#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012300#include <sys/types.h>
12301#include <netdb.h>
12302#include <string.h>
12303#include <sys/socket.h>
12304#include <netinet/in.h>
12305
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012306int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012307{
12308 int passive, gaierr, inet4 = 0, inet6 = 0;
12309 struct addrinfo hints, *ai, *aitop;
12310 char straddr[INET6_ADDRSTRLEN], strport[16];
12311
12312 for (passive = 0; passive <= 1; passive++) {
12313 memset(&hints, 0, sizeof(hints));
12314 hints.ai_family = AF_UNSPEC;
12315 hints.ai_flags = passive ? AI_PASSIVE : 0;
12316 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012317 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012318 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12319 (void)gai_strerror(gaierr);
12320 goto bad;
12321 }
12322 for (ai = aitop; ai; ai = ai->ai_next) {
12323 if (ai->ai_addr == NULL ||
12324 ai->ai_addrlen == 0 ||
12325 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12326 straddr, sizeof(straddr), strport, sizeof(strport),
12327 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12328 goto bad;
12329 }
12330 switch (ai->ai_family) {
12331 case AF_INET:
12332 if (strcmp(strport, "54321") != 0) {
12333 goto bad;
12334 }
12335 if (passive) {
12336 if (strcmp(straddr, "0.0.0.0") != 0) {
12337 goto bad;
12338 }
12339 } else {
12340 if (strcmp(straddr, "127.0.0.1") != 0) {
12341 goto bad;
12342 }
12343 }
12344 inet4++;
12345 break;
12346 case AF_INET6:
12347 if (strcmp(strport, "54321") != 0) {
12348 goto bad;
12349 }
12350 if (passive) {
12351 if (strcmp(straddr, "::") != 0) {
12352 goto bad;
12353 }
12354 } else {
12355 if (strcmp(straddr, "::1") != 0) {
12356 goto bad;
12357 }
12358 }
12359 inet6++;
12360 break;
12361 case AF_UNSPEC:
12362 goto bad;
12363 break;
12364 default:
12365 /* another family support? */
12366 break;
12367 }
12368 }
12369 }
12370
12371 if (!(inet4 == 0 || inet4 == 2))
12372 goto bad;
12373 if (!(inet6 == 0 || inet6 == 2))
12374 goto bad;
12375
12376 if (aitop)
12377 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012378 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012379
12380 bad:
12381 if (aitop)
12382 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012383 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012384}
12385
Martin v. Löwis11437992002-04-12 09:54:03 +000012386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012387if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012388 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012389else
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012396fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012397
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12401$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12402
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012403if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012404then
12405 if test $ipv6 = yes
12406 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012407 echo 'Fatal: You must get working getaddrinfo() function.'
12408 echo ' or you can specify "--disable-ipv6"'.
12409 exit 1
12410 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012411else
Martin v. Löwis11437992002-04-12 09:54:03 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012414
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012415fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012416
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012417for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012418do :
12419 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012420if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012423_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012424
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012425fi
12426done
12427
Michael W. Hudson54241132001-12-07 15:38:26 +000012428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012429# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12431$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012432if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012434else
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012437#include <sys/types.h>
12438#include <sys/time.h>
12439#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
Martin v. Löwis11437992002-04-12 09:54:03 +000012441int
12442main ()
12443{
12444if ((struct tm *) 0)
12445return 0;
12446 ;
12447 return 0;
12448}
12449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012450if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012452else
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12458$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012459if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Matthias Kloseb9621712010-04-24 17:59:49 +000012461$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462
12463fi
12464
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12466$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012467if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469else
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012472#include <sys/types.h>
12473#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012474
Martin v. Löwis11437992002-04-12 09:54:03 +000012475int
12476main ()
12477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478struct tm tm;
12479 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012486 ac_cv_struct_tm=time.h
12487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12493$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012494if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497
12498fi
12499
Matthias Kloseb9621712010-04-24 17:59:49 +000012500ac_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 +000012501#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
Matthias Kloseb9621712010-04-24 17:59:49 +000012503"
Victor Stinnere0be4232011-10-25 13:06:09 +020012504if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
12506cat >>confdefs.h <<_ACEOF
12507#define HAVE_STRUCT_TM_TM_ZONE 1
12508_ACEOF
12509
12510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012512
Martin v. Löwis11437992002-04-12 09:54:03 +000012513if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12514
Matthias Kloseb9621712010-04-24 17:59:49 +000012515$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012516
12517else
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12519"
Victor Stinnere0be4232011-10-25 13:06:09 +020012520if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522else
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524fi
12525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012527#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528_ACEOF
12529
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12531$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012532if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534else
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012536/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012537#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538#if !HAVE_DECL_TZNAME
12539extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
Martin v. Löwis11437992002-04-12 09:54:03 +000012542int
12543main ()
12544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012546 ;
12547 return 0;
12548}
12549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012550if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012551 ac_cv_var_tzname=yes
12552else
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012555rm -f core conftest.err conftest.$ac_objext \
12556 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12559$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012560 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Matthias Kloseb9621712010-04-24 17:59:49 +000012562$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012563
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012564 fi
12565fi
12566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567ac_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 +020012568if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
12570cat >>confdefs.h <<_ACEOF
12571#define HAVE_STRUCT_STAT_ST_RDEV 1
12572_ACEOF
12573
12574
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012575fi
12576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577ac_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 +020012578if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580cat >>confdefs.h <<_ACEOF
12581#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12582_ACEOF
12583
12584
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012585fi
12586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587ac_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 +020012588if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012589
12590cat >>confdefs.h <<_ACEOF
12591#define HAVE_STRUCT_STAT_ST_FLAGS 1
12592_ACEOF
12593
12594
12595fi
12596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597ac_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 +020012598if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012599
12600cat >>confdefs.h <<_ACEOF
12601#define HAVE_STRUCT_STAT_ST_GEN 1
12602_ACEOF
12603
12604
12605fi
12606
Matthias Kloseb9621712010-04-24 17:59:49 +000012607ac_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 +020012608if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012609
12610cat >>confdefs.h <<_ACEOF
12611#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12612_ACEOF
12613
12614
12615fi
12616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617ac_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 +020012618if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012619
Martin v. Löwis11437992002-04-12 09:54:03 +000012620cat >>confdefs.h <<_ACEOF
12621#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12622_ACEOF
12623
12624
Matthias Kloseb9621712010-04-24 17:59:49 +000012625$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012626
12627else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012629 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012630 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12631 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012632esac
12633
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012634fi
12635
Michael W. Hudson54241132001-12-07 15:38:26 +000012636
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12639$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012640if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012642else
Matthias Kloseb159a552010-04-25 21:00:44 +000012643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012645/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012646#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012647int
12648main ()
12649{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012650return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 ;
12652 return 0;
12653}
12654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012655if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012656 ac_cv_header_time_altzone=yes
12657else
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012662fi
12663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12665$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012669
12670fi
12671
Guido van Rossumda88dad1995-01-26 00:46:29 +000012672was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12674$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012677
12678#include <sys/types.h>
12679#include <sys/select.h>
12680#include <sys/time.h>
12681
Martin v. Löwis11437992002-04-12 09:54:03 +000012682int
12683main ()
12684{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012685;
Martin v. Löwis11437992002-04-12 09:54:03 +000012686 ;
12687 return 0;
12688}
12689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
12692
Matthias Kloseb9621712010-04-24 17:59:49 +000012693$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012694
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012695 was_it_defined=yes
12696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12700$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12703$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012704if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012706else
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012708/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012709#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012710int
12711main ()
12712{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012713struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ;
12715 return 0;
12716}
12717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012718if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012719 ac_cv_struct_addrinfo=yes
12720else
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12724fi
12725
Matthias Kloseb9621712010-04-24 17:59:49 +000012726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12727$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012728if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012731
12732fi
12733
Matthias Kloseb9621712010-04-24 17:59:49 +000012734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12735$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012736if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012738else
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012741
12742# include <sys/types.h>
12743# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012744int
12745main ()
12746{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012747struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 ;
12749 return 0;
12750}
12751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012752if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012753 ac_cv_struct_sockaddr_storage=yes
12754else
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12758fi
12759
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12761$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012762if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012763
Matthias Kloseb9621712010-04-24 17:59:49 +000012764$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012765
12766fi
12767
Guido van Rossum627b2d71993-12-24 10:39:16 +000012768# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12771$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012772if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012777$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012778int
12779main ()
12780{
12781static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012782test_array [0] = 0;
12783return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012784
12785 ;
12786 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012787}
Martin v. Löwis11437992002-04-12 09:54:03 +000012788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012790 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12797$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012798if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012800
12801fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012802
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12804$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012805if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012809/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012810
Martin v. Löwis11437992002-04-12 09:54:03 +000012811int
12812main ()
12813{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012814
Martin v. Löwis11437992002-04-12 09:54:03 +000012815#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012816 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012818 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820 char const *const *pcpcc;
12821 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 /* NEC SVR4.0.2 mips cc rejects this. */
12823 struct point {int x, y;};
12824 static struct point const zero = {0,0};
12825 /* AIX XL C 1.02.0.0 rejects this.
12826 It does not let you subtract one const X* pointer from another in
12827 an arm of an if-expression whose if-part is not a constant
12828 expression */
12829 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012831 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832 ++pcpcc;
12833 ppc = (char**) pcpcc;
12834 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012835 { /* SCO 3.2v4 cc rejects this sort of thing. */
12836 char tx;
12837 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012839
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 }
12843 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12844 int x[] = {25, 17};
12845 const int *foo = &x[0];
12846 ++foo;
12847 }
12848 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12849 typedef const int *iptr;
12850 iptr p = 0;
12851 ++p;
12852 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012853 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012855 struct s { int j; const int *ap[3]; } bx;
12856 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 }
12858 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12859 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012863#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012864
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 ;
12866 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012867}
Martin v. Löwis11437992002-04-12 09:54:03 +000012868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012869if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870 ac_cv_c_const=yes
12871else
Matthias Kloseb9621712010-04-24 17:59:49 +000012872 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12877$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012881
12882fi
12883
Michael W. Hudson54241132001-12-07 15:38:26 +000012884
Guido van Rossumda88dad1995-01-26 00:46:29 +000012885works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12887$as_echo_n "checking for working volatile... " >&6; }
12888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012889/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012890
Martin v. Löwis11437992002-04-12 09:54:03 +000012891int
12892main ()
12893{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ;
12896 return 0;
12897}
12898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012899if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012900 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012901else
Skip Montanaro6dead952003-09-25 14:50:04 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012904
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012905
Guido van Rossum627b2d71993-12-24 10:39:16 +000012906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12909$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012910
Guido van Rossumda88dad1995-01-26 00:46:29 +000012911works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12913$as_echo_n "checking for working signed char... " >&6; }
12914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012915/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012916
Martin v. Löwis11437992002-04-12 09:54:03 +000012917int
12918main ()
12919{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012920signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012921 ;
12922 return 0;
12923}
12924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012925if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012926 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012927else
Skip Montanaro6dead952003-09-25 14:50:04 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012930
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012931
Guido van Rossum7f43da71994-08-01 12:15:30 +000012932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12935$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012936
Guido van Rossumda88dad1995-01-26 00:46:29 +000012937have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12939$as_echo_n "checking for prototypes... " >&6; }
12940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012941/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012942int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012943int
12944main ()
12945{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012946return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 ;
12948 return 0;
12949}
12950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012951if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Matthias Kloseb159a552010-04-25 21:00:44 +000012955 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12959$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012960
Guido van Rossumda88dad1995-01-26 00:46:29 +000012961works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12963$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012965/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012966
12967#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012968int foo(int x, ...) {
12969 va_list va;
12970 va_start(va, x);
12971 va_arg(va, int);
12972 va_arg(va, char *);
12973 va_arg(va, double);
12974 return 0;
12975}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012976
Martin v. Löwis11437992002-04-12 09:54:03 +000012977int
12978main ()
12979{
Guido van Rossum90eea071996-08-30 20:58:57 +000012980return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 ;
12982 return 0;
12983}
12984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012985if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
12987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012989
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012990 works=yes
12991
Guido van Rossum627b2d71993-12-24 10:39:16 +000012992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12995$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996
Martin v. Löwisd6320502004-08-12 13:45:08 +000012997# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12999$as_echo_n "checking for socketpair... " >&6; }
13000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013001/* end confdefs.h. */
13002
13003#include <sys/types.h>
13004#include <sys/socket.h>
13005
13006int
13007main ()
13008{
13009void *x=socketpair
13010 ;
13011 return 0;
13012}
13013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013017
Matthias Kloseb159a552010-04-25 21:00:44 +000013018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013019$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013020else
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13022$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013023
13024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013026
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13029$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013031/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013032#include <sys/types.h>
13033#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013034int
13035main ()
13036{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013037struct sockaddr x;
13038x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 ;
13040 return 0;
13041}
13042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013043if ac_fn_c_try_compile "$LINENO"; then :
13044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13045$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013048
13049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13051$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013052
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013055
Guido van Rossumda88dad1995-01-26 00:46:29 +000013056va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13058$as_echo_n "checking whether va_list is an array... " >&6; }
13059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013060/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013061
13062#ifdef HAVE_STDARG_PROTOTYPES
13063#include <stdarg.h>
13064#else
13065#include <varargs.h>
13066#endif
13067
Martin v. Löwis11437992002-04-12 09:54:03 +000013068int
13069main ()
13070{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013072 ;
13073 return 0;
13074}
13075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013076if ac_fn_c_try_compile "$LINENO"; then :
13077
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013078else
Skip Montanaro6dead952003-09-25 14:50:04 +000013079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013082
Guido van Rossumda88dad1995-01-26 00:46:29 +000013083 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13088$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013089
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013090# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013091
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013094if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13099$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013100 OLD_CFLAGS=$CFLAGS
13101 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013103/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013104
13105# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107int
13108main ()
13109{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013110
13111 char *name;
13112 struct hostent *he, *res;
13113 char buffer[2048];
13114 int buflen = 2048;
13115 int h_errnop;
13116
13117 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013118
13119 ;
13120 return 0;
13121}
13122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013123if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013126
Martin v. Löwis11437992002-04-12 09:54:03 +000013127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13131$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013132
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013133else
Skip Montanaro6dead952003-09-25 14:50:04 +000013134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13136$as_echo "no" >&6; }
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13138$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013140/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013141
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013142# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013143
Martin v. Löwis11437992002-04-12 09:54:03 +000013144int
13145main ()
13146{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013147
13148 char *name;
13149 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013150 char buffer[2048];
13151 int buflen = 2048;
13152 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013153
Matthias Kloseb159a552010-04-25 21:00:44 +000013154 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
13156 ;
13157 return 0;
13158}
13159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013161
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013163
Martin v. Löwis11437992002-04-12 09:54:03 +000013164
Matthias Kloseb159a552010-04-25 21:00:44 +000013165$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013166
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13168$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013169
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013170else
Skip Montanaro6dead952003-09-25 14:50:04 +000013171
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13173$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13175$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13177/* end confdefs.h. */
13178
13179# include <netdb.h>
13180
13181int
13182main ()
13183{
13184
13185 char *name;
13186 struct hostent *he;
13187 struct hostent_data data;
13188
13189 (void) gethostbyname_r(name, he, &data);
13190
13191 ;
13192 return 0;
13193}
13194_ACEOF
13195if ac_fn_c_try_compile "$LINENO"; then :
13196
13197 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13198
13199
13200$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13201
13202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13203$as_echo "yes" >&6; }
13204
13205else
13206
13207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13208$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013209
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013218 CFLAGS=$OLD_CFLAGS
13219
13220else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013221
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 for ac_func in gethostbyname
13223do :
13224 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013225if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013227#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013228_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013229
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013230fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013231done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013232
Michael W. Hudson54241132001-12-07 15:38:26 +000013233
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013234fi
13235
Michael W. Hudson54241132001-12-07 15:38:26 +000013236
13237
13238
13239
13240
13241
Guido van Rossum627b2d71993-12-24 10:39:16 +000013242# checks for system services
13243# (none yet)
13244
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013245# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013246ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013247if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013248
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013249else
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13251$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013252if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013254else
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013256LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260/* Override any GCC internal prototype to avoid an error.
13261 Use char because int might match the return type of a GCC
13262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013263#ifdef __cplusplus
13264extern "C"
13265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013266char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013267int
13268main ()
13269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 ;
13272 return 0;
13273}
13274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013280rm -f core conftest.err conftest.$ac_objext \
13281 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013282LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13285$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013286if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 cat >>confdefs.h <<_ACEOF
13288#define HAVE_LIBIEEE 1
13289_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013291 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013292
Guido van Rossum627b2d71993-12-24 10:39:16 +000013293fi
13294
Michael W. Hudson54241132001-12-07 15:38:26 +000013295
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013296fi
13297
Michael W. Hudson54241132001-12-07 15:38:26 +000013298
Guido van Rossum7f253911997-05-09 02:42:48 +000013299# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13301$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013303# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013306if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013307then
13308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13312$as_echo "yes" >&6; }
13313else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13314$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013315fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13318$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319fi
13320
Guido van Rossum7f253911997-05-09 02:42:48 +000013321
Guido van Rossum7f43da71994-08-01 12:15:30 +000013322# check for --with-libm=...
13323
Guido van Rossum563e7081996-09-10 18:20:48 +000013324case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013325Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013326*) LIBM=-lm
13327esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13329$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013332if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013334if test "$withval" = no
13335then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13337$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013338elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013339then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13341$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013342else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013343fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13346$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347fi
13348
Guido van Rossum7f43da71994-08-01 12:15:30 +000013349
13350# check for --with-libc=...
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13353$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013356if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013358if test "$withval" = no
13359then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13361$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013362elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013363then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13365$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013366else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013367fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013368else
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13370$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371fi
13372
Guido van Rossum7f43da71994-08-01 12:15:30 +000013373
Stefan Krah1919b7e2012-03-21 18:25:23 +010013374# **************************************
13375# * Check for gcc x64 inline assembler *
13376# **************************************
13377
13378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13379$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13381/* end confdefs.h. */
13382
13383int
13384main ()
13385{
13386
13387 __asm__ __volatile__ ("movq %rcx, %rax");
13388
13389 ;
13390 return 0;
13391}
13392_ACEOF
13393if ac_fn_c_try_compile "$LINENO"; then :
13394 have_gcc_asm_for_x64=yes
13395else
13396 have_gcc_asm_for_x64=no
13397fi
13398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13400$as_echo "$have_gcc_asm_for_x64" >&6; }
13401if test "$have_gcc_asm_for_x64" = yes
13402then
13403
13404$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13405
13406fi
13407
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013408# **************************************************
13409# * Check for various properties of floating point *
13410# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13413$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013414if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013416else
13417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013419 ac_cv_little_endian_double=no
13420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013422/* end confdefs.h. */
13423
13424#include <string.h>
13425int main() {
13426 double x = 9006104071832581.0;
13427 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13428 return 0;
13429 else
13430 return 1;
13431}
13432
13433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013434if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013435 ac_cv_little_endian_double=yes
13436else
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13440 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013441fi
13442
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013443fi
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13446$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013447if test "$ac_cv_little_endian_double" = yes
13448then
13449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013451
13452fi
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13455$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013456if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013458else
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013461 ac_cv_big_endian_double=no
13462else
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013464/* end confdefs.h. */
13465
13466#include <string.h>
13467int main() {
13468 double x = 9006104071832581.0;
13469 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13470 return 0;
13471 else
13472 return 1;
13473}
13474
13475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013476if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013477 ac_cv_big_endian_double=yes
13478else
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13482 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013483fi
13484
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013485fi
13486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13488$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013489if test "$ac_cv_big_endian_double" = yes
13490then
13491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013493
13494fi
13495
13496# Some ARM platforms use a mixed-endian representation for doubles.
13497# While Python doesn't currently have full support for these platforms
13498# (see e.g., issue 1762561), we can at least make sure that float <-> string
13499# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13501$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013502if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013504else
13505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013507 ac_cv_mixed_endian_double=no
13508else
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013510/* end confdefs.h. */
13511
13512#include <string.h>
13513int main() {
13514 double x = 9006104071832581.0;
13515 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13516 return 0;
13517 else
13518 return 1;
13519}
13520
13521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013523 ac_cv_mixed_endian_double=yes
13524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013529fi
13530
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013531fi
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13534$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013535if test "$ac_cv_mixed_endian_double" = yes
13536then
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013539
13540fi
13541
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013542# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013543# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013544# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013545# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013546# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013547# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013548
13549# This inline assembler syntax may also work for suncc and icc,
13550# so we try it on all platforms.
13551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13553$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013555/* end confdefs.h. */
13556
13557int
13558main ()
13559{
13560
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013561 unsigned short cw;
13562 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13563 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013564
13565 ;
13566 return 0;
13567}
13568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013569if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013570 have_gcc_asm_for_x87=yes
13571else
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013573fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13576$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013577if test "$have_gcc_asm_for_x87" = yes
13578then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013581
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013582fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13585$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587/* end confdefs.h. */
13588
13589int
13590main ()
13591{
13592
13593 unsigned int fpcr;
13594 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13595 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13596
13597 ;
13598 return 0;
13599}
13600_ACEOF
13601if ac_fn_c_try_compile "$LINENO"; then :
13602 have_gcc_asm_for_mc68881=yes
13603else
13604 have_gcc_asm_for_mc68881=no
13605fi
13606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13608$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13609if test "$have_gcc_asm_for_mc68881" = yes
13610then
13611
13612$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13613
13614fi
13615
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013616# Detect whether system arithmetic is subject to x87-style double
13617# rounding issues. The result of this test has little meaning on non
13618# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13619# mode is round-to-nearest and double rounding issues are present, and
13620# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13622$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013623# $BASECFLAGS may affect the result
13624ac_save_cc="$CC"
13625CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013626if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013627 ac_cv_x87_double_rounding=no
13628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013630/* end confdefs.h. */
13631
13632#include <stdlib.h>
13633#include <math.h>
13634int main() {
13635 volatile double x, y, z;
13636 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13637 x = 0.99999999999999989; /* 1-2**-53 */
13638 y = 1./x;
13639 if (y != 1.)
13640 exit(0);
13641 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13642 x = 1e16;
13643 y = 2.99999;
13644 z = x + y;
13645 if (z != 1e16+4.)
13646 exit(0);
13647 /* both tests show evidence of double rounding */
13648 exit(1);
13649}
13650
13651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013652if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013653 ac_cv_x87_double_rounding=no
13654else
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013659fi
13660
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013661CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13663$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013664if test "$ac_cv_x87_double_rounding" = yes
13665then
13666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013668
13669fi
13670
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013671# ************************************
13672# * Check for mathematical functions *
13673# ************************************
13674
13675LIBS_SAVE=$LIBS
13676LIBS="$LIBS $LIBM"
13677
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013678for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13679do :
13680 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13681ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013682if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013683 cat >>confdefs.h <<_ACEOF
13684#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13685_ACEOF
13686
13687fi
13688done
13689
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013690for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013691do :
13692 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13693ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013694if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013695 cat >>confdefs.h <<_ACEOF
13696#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13697_ACEOF
13698
13699fi
13700done
13701
13702ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13703"
Victor Stinnere0be4232011-10-25 13:06:09 +020013704if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013705 ac_have_decl=1
13706else
13707 ac_have_decl=0
13708fi
13709
13710cat >>confdefs.h <<_ACEOF
13711#define HAVE_DECL_ISINF $ac_have_decl
13712_ACEOF
13713ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13714"
Victor Stinnere0be4232011-10-25 13:06:09 +020013715if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013716 ac_have_decl=1
13717else
13718 ac_have_decl=0
13719fi
13720
13721cat >>confdefs.h <<_ACEOF
13722#define HAVE_DECL_ISNAN $ac_have_decl
13723_ACEOF
13724ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13725"
Victor Stinnere0be4232011-10-25 13:06:09 +020013726if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013727 ac_have_decl=1
13728else
13729 ac_have_decl=0
13730fi
13731
13732cat >>confdefs.h <<_ACEOF
13733#define HAVE_DECL_ISFINITE $ac_have_decl
13734_ACEOF
13735
13736
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013737# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13738# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13740$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013741if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013743else
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013746 ac_cv_tanh_preserves_zero_sign=no
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013749/* end confdefs.h. */
13750
13751#include <math.h>
13752#include <stdlib.h>
13753int main() {
13754 /* return 0 if either negative zeros don't exist
13755 on this platform or if negative zeros exist
13756 and tanh(-0.) == -0. */
13757 if (atan2(0., -1.) == atan2(-0., -1.) ||
13758 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13759 else exit(1);
13760}
13761
13762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013763if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013764 ac_cv_tanh_preserves_zero_sign=yes
13765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13769 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013770fi
13771
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013772fi
13773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13775$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013776if test "$ac_cv_tanh_preserves_zero_sign" = yes
13777then
13778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013780
13781fi
13782
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013783if test "$ac_cv_func_log1p" = yes
13784then
13785 # On some versions of AIX, log1p(-0.) returns 0. instead of
13786 # -0. See issue #9920.
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13788$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013789 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013790 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013791else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013792
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013793 if test "$cross_compiling" = yes; then :
13794 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013795else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13797/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013798
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013799 #include <math.h>
13800 #include <stdlib.h>
13801 int main() {
13802 /* Fail if the signs of log1p(-0.) and -0. can be
13803 distinguished. */
13804 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13805 return 0;
13806 else
13807 return 1;
13808 }
13809
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013810_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013811if ac_fn_c_try_run "$LINENO"; then :
13812 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013813else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013814 ac_cv_log1p_drops_zero_sign=yes
13815fi
13816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13817 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013818fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013819
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013820fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013821
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13823$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13824fi
13825if test "$ac_cv_log1p_drops_zero_sign" = yes
13826then
13827
13828$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13829
13830fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013831
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013832LIBS=$LIBS_SAVE
13833
Mark Dickinsona614f042009-11-28 12:48:43 +000013834# For multiprocessing module, check that sem_open
13835# actually works. For FreeBSD versions <= 7.2,
13836# the kernel module that provides POSIX semaphores
13837# isn't loaded by default, so an attempt to call
13838# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13840$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013841if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013845 ac_cv_posix_semaphores_enabled=yes
13846else
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013848/* end confdefs.h. */
13849
13850#include <unistd.h>
13851#include <fcntl.h>
13852#include <stdio.h>
13853#include <semaphore.h>
13854#include <sys/stat.h>
13855
13856int main(void) {
13857 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13858 if (a == SEM_FAILED) {
13859 perror("sem_open");
13860 return 1;
13861 }
13862 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013863 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013864 return 0;
13865}
13866
13867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013868if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013869 ac_cv_posix_semaphores_enabled=yes
13870else
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013875fi
13876
13877
Mark Dickinsona614f042009-11-28 12:48:43 +000013878fi
13879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13881$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013882if test $ac_cv_posix_semaphores_enabled = no
13883then
13884
Matthias Kloseb9621712010-04-24 17:59:49 +000013885$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013886
13887fi
13888
Mark Dickinson10683072009-04-18 21:18:19 +000013889# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13891$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013892if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013894else
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013896 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013897else
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013899/* end confdefs.h. */
13900
13901#include <unistd.h>
13902#include <fcntl.h>
13903#include <stdio.h>
13904#include <semaphore.h>
13905#include <sys/stat.h>
13906
13907int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013908 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013909 int count;
13910 int res;
13911 if(a==SEM_FAILED){
13912 perror("sem_open");
13913 return 1;
13914
13915 }
13916 res = sem_getvalue(a, &count);
13917 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013918 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013919 return res==-1 ? 1 : 0;
13920}
13921
Mark Dickinson10683072009-04-18 21:18:19 +000013922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013923if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013924 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013925else
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13929 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013930fi
13931
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013932
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013933fi
13934
Matthias Kloseb9621712010-04-24 17:59:49 +000013935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13936$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013937if test $ac_cv_broken_sem_getvalue = yes
13938then
13939
Matthias Kloseb9621712010-04-24 17:59:49 +000013940$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013941
13942fi
13943
Mark Dickinsonbd792642009-03-18 20:06:12 +000013944# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13946$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013947# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013948if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013949 enableval=$enable_big_digits; case $enable_big_digits in
13950yes)
13951 enable_big_digits=30 ;;
13952no)
13953 enable_big_digits=15 ;;
1395415|30)
13955 ;;
13956*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013957 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 +000013958esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13960$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013961
13962cat >>confdefs.h <<_ACEOF
13963#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13964_ACEOF
13965
13966
13967else
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13969$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013970fi
13971
13972
Guido van Rossumef2255b2000-03-10 22:30:29 +000013973# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013974ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013975if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013976
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013980 wchar_h="yes"
13981
Guido van Rossumef2255b2000-03-10 22:30:29 +000013982else
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013984
13985fi
13986
Michael W. Hudson54241132001-12-07 15:38:26 +000013987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013989# determine wchar_t size
13990if test "$wchar_h" = yes
13991then
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13995# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13997$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013998if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014000else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14002"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004else
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 if test "$ac_cv_type_wchar_t" = yes; then
14006 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014008as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014009See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010 else
14011 ac_cv_sizeof_wchar_t=0
14012 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014014
Martin v. Löwis11437992002-04-12 09:54:03 +000014015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14017$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014018
14019
14020
Martin v. Löwis11437992002-04-12 09:54:03 +000014021cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014022#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014023_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014024
Michael W. Hudson54241132001-12-07 15:38:26 +000014025
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014026fi
14027
Matthias Kloseb9621712010-04-24 17:59:49 +000014028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14029$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014030have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014032/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014033
14034#include <tcl.h>
14035#if TCL_UTF_MAX != 6
14036# error "NOT UCS4_TCL"
14037#endif
14038int
14039main ()
14040{
14041
14042 ;
14043 return 0;
14044}
14045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014047
14048
Matthias Kloseb9621712010-04-24 17:59:49 +000014049$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014050
14051 have_ucs4_tcl=yes
14052
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14056$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014057
Skip Montanaro6dead952003-09-25 14:50:04 +000014058# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014059if test "$wchar_h" = yes
14060then
14061 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14063$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014064 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014066else
14067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014069 ac_cv_wchar_t_signed=yes
14070else
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014072/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014073
14074 #include <wchar.h>
14075 int main()
14076 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014077 /* Success: exit code 0 */
14078 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014079 }
14080
14081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014082if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014083 ac_cv_wchar_t_signed=yes
14084else
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14088 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014089fi
14090
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014091fi
14092
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14094$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095fi
14096
Georg Brandl52d168a2008-01-07 18:10:24 +000014097# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014098if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014099 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014100then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014101 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Georg Brandl52d168a2008-01-07 18:10:24 +000014105else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014106 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014107fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14109$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014110
14111# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14113$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014114if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014116else
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 ac_cv_c_bigendian=unknown
14118 # See if we're dealing with a universal compiler.
14119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120/* end confdefs.h. */
14121#ifndef __APPLE_CC__
14122 not a universal capable compiler
14123 #endif
14124 typedef int dummy;
14125
Skip Montanaro6dead952003-09-25 14:50:04 +000014126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014127if ac_fn_c_try_compile "$LINENO"; then :
14128
14129 # Check for potential -arch flags. It is not universal unless
14130 # there are at least two -arch flags with different values.
14131 ac_arch=
14132 ac_prev=
14133 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14134 if test -n "$ac_prev"; then
14135 case $ac_word in
14136 i?86 | x86_64 | ppc | ppc64)
14137 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14138 ac_arch=$ac_word
14139 else
14140 ac_cv_c_bigendian=universal
14141 break
14142 fi
14143 ;;
14144 esac
14145 ac_prev=
14146 elif test "x$ac_word" = "x-arch"; then
14147 ac_prev=arch
14148 fi
14149 done
14150fi
14151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14152 if test $ac_cv_c_bigendian = unknown; then
14153 # See if sys/param.h defines the BYTE_ORDER macro.
14154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014155/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014156#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014158
Martin v. Löwis11437992002-04-12 09:54:03 +000014159int
14160main ()
14161{
Matthias Kloseb9621712010-04-24 17:59:49 +000014162#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14163 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14164 && LITTLE_ENDIAN)
14165 bogus endian macros
14166 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
14168 ;
14169 return 0;
14170}
14171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014172if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014173 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014175/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014176#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014178
Martin v. Löwis11437992002-04-12 09:54:03 +000014179int
14180main ()
14181{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014182#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 not big endian
14184 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
14186 ;
14187 return 0;
14188}
14189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014190if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014191 ac_cv_c_bigendian=yes
14192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014196fi
14197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14198 fi
14199 if test $ac_cv_c_bigendian = unknown; then
14200 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014202/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014203#include <limits.h>
14204
Martin v. Löwis11437992002-04-12 09:54:03 +000014205int
14206main ()
14207{
Matthias Kloseb9621712010-04-24 17:59:49 +000014208#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14209 bogus endian macros
14210 #endif
14211
Martin v. Löwis11437992002-04-12 09:54:03 +000014212 ;
14213 return 0;
14214}
14215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014216if ac_fn_c_try_compile "$LINENO"; then :
14217 # It does; now see whether it defined to _BIG_ENDIAN or not.
14218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14219/* end confdefs.h. */
14220#include <limits.h>
14221
14222int
14223main ()
14224{
14225#ifndef _BIG_ENDIAN
14226 not big endian
14227 #endif
14228
14229 ;
14230 return 0;
14231}
14232_ACEOF
14233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014235else
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14239fi
14240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14241 fi
14242 if test $ac_cv_c_bigendian = unknown; then
14243 # Compile a test program.
14244 if test "$cross_compiling" = yes; then :
14245 # Try to guess by grepping values from an object file.
14246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14247/* end confdefs.h. */
14248short int ascii_mm[] =
14249 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14250 short int ascii_ii[] =
14251 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14252 int use_ascii (int i) {
14253 return ascii_mm[i] + ascii_ii[i];
14254 }
14255 short int ebcdic_ii[] =
14256 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14257 short int ebcdic_mm[] =
14258 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14259 int use_ebcdic (int i) {
14260 return ebcdic_mm[i] + ebcdic_ii[i];
14261 }
14262 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264int
14265main ()
14266{
14267return use_ascii (foo) == use_ebcdic (foo);
14268 ;
14269 return 0;
14270}
14271_ACEOF
14272if ac_fn_c_try_compile "$LINENO"; then :
14273 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14274 ac_cv_c_bigendian=yes
14275 fi
14276 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14277 if test "$ac_cv_c_bigendian" = unknown; then
14278 ac_cv_c_bigendian=no
14279 else
14280 # finding both strings is unlikely to happen, but who knows?
14281 ac_cv_c_bigendian=unknown
14282 fi
14283 fi
14284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014288/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014290int
14291main ()
14292{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293
Matthias Kloseb9621712010-04-24 17:59:49 +000014294 /* Are we little or big endian? From Harbison&Steele. */
14295 union
14296 {
14297 long int l;
14298 char c[sizeof (long int)];
14299 } u;
14300 u.l = 1;
14301 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302
14303 ;
14304 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014305}
Martin v. Löwis11437992002-04-12 09:54:03 +000014306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014307if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014308 ac_cv_c_bigendian=no
14309else
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14313 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315
Matthias Kloseb9621712010-04-24 17:59:49 +000014316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14319$as_echo "$ac_cv_c_bigendian" >&6; }
14320 case $ac_cv_c_bigendian in #(
14321 yes)
14322 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14323;; #(
14324 no)
14325 ;; #(
14326 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014329
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 ;; #(
14331 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014332 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014333 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014335
Michael W. Hudson54241132001-12-07 15:38:26 +000014336
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014337# ABI version string for Python extension modules. This appears between the
14338# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14339# from the following attributes which affect the ABI of this Python build (in
14340# this order):
14341#
14342# * The Python implementation (always 'cpython-' for us)
14343# * The major and minor version numbers
14344# * --with-pydebug (adds a 'd')
14345# * --with-pymalloc (adds a 'm')
14346# * --with-wide-unicode (adds a 'u')
14347#
14348# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014349# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14350# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014351
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14353$as_echo_n "checking ABIFLAGS... " >&6; }
14354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14355$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14357$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014358SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14360$as_echo "$SOABI" >&6; }
14361
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014362
14363case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014364 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014365 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14366 *)
14367 EXT_SUFFIX=${SHLIB_SUFFIX};;
14368esac
14369
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14371$as_echo_n "checking LDVERSION... " >&6; }
14372LDVERSION='$(VERSION)$(ABIFLAGS)'
14373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14374$as_echo "$LDVERSION" >&6; }
14375
doko@python.org87421192013-01-26 11:39:31 +010014376
14377LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14378
14379
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014380# Check whether right shifting a negative integer extends the sign bit
14381# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14383$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014384if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014386else
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
Matthias Kloseb9621712010-04-24 17:59:49 +000014388if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014389 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014390else
Matthias Kloseb9621712010-04-24 17:59:49 +000014391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014392/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014393
14394int main()
14395{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014396 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014397}
14398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014400if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014401 ac_cv_rshift_extends_sign=yes
14402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14406 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014407fi
14408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409fi
14410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14412$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014413if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014414then
Martin v. Löwis11437992002-04-12 09:54:03 +000014415
Matthias Kloseb9621712010-04-24 17:59:49 +000014416$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014417
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014418fi
14419
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014420# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14422$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014423if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014425else
Martin v. Löwis11437992002-04-12 09:54:03 +000014426
Matthias Kloseb9621712010-04-24 17:59:49 +000014427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014428/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014429#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014430int
14431main ()
14432{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014433
14434 FILE *f = fopen("/dev/null", "r");
14435 flockfile(f);
14436 getc_unlocked(f);
14437 funlockfile(f);
14438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439 ;
14440 return 0;
14441}
14442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014443if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014444 ac_cv_have_getc_unlocked=yes
14445else
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 ac_cv_have_getc_unlocked=no
14447fi
14448rm -f core conftest.err conftest.$ac_objext \
14449 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14453$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014454if test "$ac_cv_have_getc_unlocked" = yes
14455then
Martin v. Löwis11437992002-04-12 09:54:03 +000014456
Matthias Kloseb9621712010-04-24 17:59:49 +000014457$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014458
14459fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014460
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014461# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014462# save the value of LIBS so we don't actually link Python with readline
14463LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014464
Gregory P. Smith18820942008-09-07 06:24:49 +000014465# On some systems we need to link readline to a termcap compatible
14466# library. NOTE: Keep the precedence of listed libraries synchronised
14467# with setup.py.
14468py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14470$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014471for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014472 if test -z "$py_libtermcap"; then
14473 READLINE_LIBS="-lreadline"
14474 else
14475 READLINE_LIBS="-lreadline -l$py_libtermcap"
14476 fi
14477 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014479/* end confdefs.h. */
14480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481/* Override any GCC internal prototype to avoid an error.
14482 Use char because int might match the return type of a GCC
14483 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014484#ifdef __cplusplus
14485extern "C"
14486#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014487char readline ();
14488int
14489main ()
14490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014492 ;
14493 return 0;
14494}
14495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014496if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014497 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014499rm -f core conftest.err conftest.$ac_objext \
14500 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014501 if test $py_cv_lib_readline = yes; then
14502 break
14503 fi
14504done
14505# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14506#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014507if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14509$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014510else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14512$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014513
Matthias Kloseb9621712010-04-24 17:59:49 +000014514$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014515
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014516fi
14517
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014518# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14520$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014521if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014522 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014523else
14524 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014525LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014527/* end confdefs.h. */
14528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529/* Override any GCC internal prototype to avoid an error.
14530 Use char because int might match the return type of a GCC
14531 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014532#ifdef __cplusplus
14533extern "C"
14534#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014535char rl_callback_handler_install ();
14536int
14537main ()
14538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014540 ;
14541 return 0;
14542}
14543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014544if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014545 ac_cv_lib_readline_rl_callback_handler_install=yes
14546else
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014549rm -f core conftest.err conftest.$ac_objext \
14550 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014551LIBS=$ac_check_lib_save_LIBS
14552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14554$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014555if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014556
Matthias Kloseb9621712010-04-24 17:59:49 +000014557$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014558
14559fi
14560
14561
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014562# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014564/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014565#include <readline/readline.h>
14566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014567if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014568 have_readline=yes
14569else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014570 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014571
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014572fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014573rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014574if test $have_readline = yes
14575then
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014577/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014578#include <readline/readline.h>
14579
14580_ACEOF
14581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014585
14586fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014587rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014590/* end confdefs.h. */
14591#include <readline/readline.h>
14592
14593_ACEOF
14594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014598
14599fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014600rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014601
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014602fi
14603
Martin v. Löwis0daad592001-09-30 21:09:59 +000014604# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14606$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014607if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014609else
Martin v. Löwis11437992002-04-12 09:54:03 +000014610 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014611LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615/* Override any GCC internal prototype to avoid an error.
14616 Use char because int might match the return type of a GCC
14617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014618#ifdef __cplusplus
14619extern "C"
14620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014621char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014622int
14623main ()
14624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 ;
14627 return 0;
14628}
14629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014630if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014631 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014632else
Matthias Kloseb9621712010-04-24 17:59:49 +000014633 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014635rm -f core conftest.err conftest.$ac_objext \
14636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014637LIBS=$ac_check_lib_save_LIBS
14638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14640$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014641if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014644
Martin v. Löwis0daad592001-09-30 21:09:59 +000014645fi
14646
Michael W. Hudson54241132001-12-07 15:38:26 +000014647
Thomas Wouters89d996e2007-09-08 17:39:28 +000014648# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14650$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014651if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014653else
14654 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014655LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014657/* end confdefs.h. */
14658
14659/* Override any GCC internal prototype to avoid an error.
14660 Use char because int might match the return type of a GCC
14661 builtin and then its argument prototype would still apply. */
14662#ifdef __cplusplus
14663extern "C"
14664#endif
14665char rl_completion_display_matches_hook ();
14666int
14667main ()
14668{
14669return rl_completion_display_matches_hook ();
14670 ;
14671 return 0;
14672}
14673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014674if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014675 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14676else
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014679rm -f core conftest.err conftest.$ac_objext \
14680 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014681LIBS=$ac_check_lib_save_LIBS
14682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14684$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014685if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014688
14689fi
14690
14691
Martin v. Löwis0daad592001-09-30 21:09:59 +000014692# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14694$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014695if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014697else
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014699LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703/* Override any GCC internal prototype to avoid an error.
14704 Use char because int might match the return type of a GCC
14705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014706#ifdef __cplusplus
14707extern "C"
14708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014709char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014710int
14711main ()
14712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 ;
14715 return 0;
14716}
14717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014719 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014720else
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014723rm -f core conftest.err conftest.$ac_objext \
14724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014725LIBS=$ac_check_lib_save_LIBS
14726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14728$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014729if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014732
Guido van Rossum353ae582001-07-10 16:45:32 +000014733fi
14734
Jack Jansendd19cf82001-12-06 22:36:17 +000014735
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014736# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014738/* end confdefs.h. */
14739#include <readline/readline.h>
14740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014741if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014742 have_readline=yes
14743else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014744 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014745
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014746fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014747rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014748if test $have_readline = yes
14749then
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014751/* end confdefs.h. */
14752#include <readline/readline.h>
14753
14754_ACEOF
14755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014759
14760fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014761rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014762
14763fi
14764
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14766$as_echo_n "checking for append_history in -lreadline... " >&6; }
14767if ${ac_cv_lib_readline_append_history+:} false; then :
14768 $as_echo_n "(cached) " >&6
14769else
14770 ac_check_lib_save_LIBS=$LIBS
14771LIBS="-lreadline $READLINE_LIBS $LIBS"
14772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14773/* end confdefs.h. */
14774
14775/* Override any GCC internal prototype to avoid an error.
14776 Use char because int might match the return type of a GCC
14777 builtin and then its argument prototype would still apply. */
14778#ifdef __cplusplus
14779extern "C"
14780#endif
14781char append_history ();
14782int
14783main ()
14784{
14785return append_history ();
14786 ;
14787 return 0;
14788}
14789_ACEOF
14790if ac_fn_c_try_link "$LINENO"; then :
14791 ac_cv_lib_readline_append_history=yes
14792else
14793 ac_cv_lib_readline_append_history=no
14794fi
14795rm -f core conftest.err conftest.$ac_objext \
14796 conftest$ac_exeext conftest.$ac_ext
14797LIBS=$ac_check_lib_save_LIBS
14798fi
14799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14800$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14801if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14802
14803$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14804
14805fi
14806
14807
Martin v. Löwis82bca632006-02-10 20:49:30 +000014808# End of readline checks: restore LIBS
14809LIBS=$LIBS_no_readline
14810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14812$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014813if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014815else
Martin v. Löwis11437992002-04-12 09:54:03 +000014816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014818 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014821/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014822
14823int main()
14824{
14825 int val1 = nice(1);
14826 if (val1 != -1 && val1 == nice(2))
14827 exit(0);
14828 exit(1);
14829}
14830
Martin v. Löwis11437992002-04-12 09:54:03 +000014831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014832if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014833 ac_cv_broken_nice=yes
14834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014839fi
14840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841fi
14842
Matthias Kloseb9621712010-04-24 17:59:49 +000014843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14844$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014845if test "$ac_cv_broken_nice" = yes
14846then
Martin v. Löwis11437992002-04-12 09:54:03 +000014847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014849
14850fi
14851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14853$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014854if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014856else
Matthias Kloseb9621712010-04-24 17:59:49 +000014857 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014858 ac_cv_broken_poll=no
14859else
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014861/* end confdefs.h. */
14862
14863#include <poll.h>
14864
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014865int main()
14866{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014867 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014868 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014869
14870 close (42);
14871
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014872 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014873 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014874 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014875 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014876 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014877 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014878 return 1;
14879}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014880
14881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014882if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014883 ac_cv_broken_poll=yes
14884else
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14888 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014891fi
14892
Matthias Kloseb9621712010-04-24 17:59:49 +000014893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14894$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014895if test "$ac_cv_broken_poll" = yes
14896then
14897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014899
14900fi
14901
Brett Cannon43802422005-02-10 20:48:03 +000014902# 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 +000014903# (which is not required by ISO C or UNIX spec) and/or if we support
14904# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014905ac_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 +000014906#include <$ac_cv_struct_tm>
14907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908"
Victor Stinnere0be4232011-10-25 13:06:09 +020014909if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014910
14911cat >>confdefs.h <<_ACEOF
14912#define HAVE_STRUCT_TM_TM_ZONE 1
14913_ACEOF
14914
14915
14916fi
14917
14918if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014921
14922else
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14924"
Victor Stinnere0be4232011-10-25 13:06:09 +020014925if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929fi
14930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014932#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933_ACEOF
14934
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14936$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014937if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939else
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014941/* end confdefs.h. */
14942#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943#if !HAVE_DECL_TZNAME
14944extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014945#endif
14946
14947int
14948main ()
14949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014951 ;
14952 return 0;
14953}
14954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014955if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014956 ac_cv_var_tzname=yes
14957else
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014960rm -f core conftest.err conftest.$ac_objext \
14961 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14964$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014965 if test $ac_cv_var_tzname = yes; then
14966
Matthias Kloseb9621712010-04-24 17:59:49 +000014967$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014968
14969 fi
14970fi
14971
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014972
Martin v. Löwis1d459062005-03-14 21:23:33 +000014973# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14975$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014976if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014978else
14979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014981 ac_cv_working_tzset=no
14982else
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014984/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014985
14986#include <stdlib.h>
14987#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014988#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014989
14990#if HAVE_TZNAME
14991extern char *tzname[];
14992#endif
14993
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014994int main()
14995{
Brett Cannon18367812003-09-19 00:59:16 +000014996 /* Note that we need to ensure that not only does tzset(3)
14997 do 'something' with localtime, but it works as documented
14998 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014999 This includes making sure that tzname is set properly if
15000 tm->tm_zone does not exist since it is the alternative way
15001 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015002
15003 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015004 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015005 */
15006
Martin v. Löwis1d459062005-03-14 21:23:33 +000015007 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015008 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15009
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015010 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015011 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015012 if (localtime(&groundhogday)->tm_hour != 0)
15013 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015014#if HAVE_TZNAME
15015 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15016 if (strcmp(tzname[0], "UTC") ||
15017 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15018 exit(1);
15019#endif
Brett Cannon18367812003-09-19 00:59:16 +000015020
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015021 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015022 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015023 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015024 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015025#if HAVE_TZNAME
15026 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15027 exit(1);
15028#endif
Brett Cannon18367812003-09-19 00:59:16 +000015029
15030 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15031 tzset();
15032 if (localtime(&groundhogday)->tm_hour != 11)
15033 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015034#if HAVE_TZNAME
15035 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15036 exit(1);
15037#endif
15038
15039#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015040 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15041 exit(1);
15042 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15043 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015044#endif
Brett Cannon18367812003-09-19 00:59:16 +000015045
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015046 exit(0);
15047}
15048
15049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015050if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015051 ac_cv_working_tzset=yes
15052else
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015057fi
15058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059fi
15060
Matthias Kloseb9621712010-04-24 17:59:49 +000015061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15062$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015063if test "$ac_cv_working_tzset" = yes
15064then
15065
Matthias Kloseb9621712010-04-24 17:59:49 +000015066$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015067
15068fi
15069
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015070# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15072$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015073if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015075else
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015077/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015078#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015079int
15080main ()
15081{
15082
15083struct stat st;
15084st.st_mtim.tv_nsec = 1;
15085
15086 ;
15087 return 0;
15088}
15089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015091 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015092else
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15096fi
15097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15099$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015100if test "$ac_cv_stat_tv_nsec" = yes
15101then
15102
Matthias Kloseb9621712010-04-24 17:59:49 +000015103$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015104
15105fi
15106
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015107# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15109$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015110if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015112else
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015114/* end confdefs.h. */
15115#include <sys/stat.h>
15116int
15117main ()
15118{
15119
15120struct stat st;
15121st.st_mtimespec.tv_nsec = 1;
15122
15123 ;
15124 return 0;
15125}
15126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015127if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015128 ac_cv_stat_tv_nsec2=yes
15129else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15133fi
15134
Matthias Kloseb9621712010-04-24 17:59:49 +000015135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15136$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015137if test "$ac_cv_stat_tv_nsec2" = yes
15138then
15139
Matthias Kloseb9621712010-04-24 17:59:49 +000015140$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015141
15142fi
15143
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015144# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015145ac_save_cppflags="$CPPFLAGS"
15146CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015147
15148for ac_header in curses.h ncurses.h
15149do :
15150 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15151ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15152if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15153 cat >>confdefs.h <<_ACEOF
15154#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15155_ACEOF
15156
15157fi
15158
15159done
15160
15161
15162# On Solaris, term.h requires curses.h
15163for ac_header in term.h
15164do :
15165 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15166#ifdef HAVE_CURSES_H
15167#include <curses.h>
15168#endif
15169
15170"
15171if test "x$ac_cv_header_term_h" = xyes; then :
15172 cat >>confdefs.h <<_ACEOF
15173#define HAVE_TERM_H 1
15174_ACEOF
15175
15176fi
15177
15178done
15179
15180
Jack Jansen666b1e72001-10-31 12:11:48 +000015181# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15183$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015184if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015186else
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015188/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015189#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015190int
15191main ()
15192{
Jack Jansen666b1e72001-10-31 12:11:48 +000015193
15194 int rtn;
15195 rtn = mvwdelch(0,0,0);
15196
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 ;
15198 return 0;
15199}
15200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015201if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015202 ac_cv_mvwdelch_is_expression=yes
15203else
Matthias Kloseb9621712010-04-24 17:59:49 +000015204 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15207fi
15208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15210$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015211
15212if test "$ac_cv_mvwdelch_is_expression" = yes
15213then
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015216
15217fi
15218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15220$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015221if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015223else
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015225/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015226#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015227int
15228main ()
15229{
Jack Jansen666b1e72001-10-31 12:11:48 +000015230
15231 WINDOW *w;
15232 w->_flags = 0;
15233
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 ;
15235 return 0;
15236}
15237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015238if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015239 ac_cv_window_has_flags=yes
15240else
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15244fi
15245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15247$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015248
Jack Jansen666b1e72001-10-31 12:11:48 +000015249
15250if test "$ac_cv_window_has_flags" = yes
15251then
Martin v. Löwis11437992002-04-12 09:54:03 +000015252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015254
15255fi
15256
Matthias Kloseb9621712010-04-24 17:59:49 +000015257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15258$as_echo_n "checking for is_term_resized... " >&6; }
15259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015260/* end confdefs.h. */
15261#include <curses.h>
15262int
15263main ()
15264{
15265void *x=is_term_resized
15266 ;
15267 return 0;
15268}
15269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015270if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015273
Matthias Kloseb159a552010-04-25 21:00:44 +000015274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015275$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015276else
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15278$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015279
15280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15282
Matthias Kloseb9621712010-04-24 17:59:49 +000015283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15284$as_echo_n "checking for resize_term... " >&6; }
15285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015286/* end confdefs.h. */
15287#include <curses.h>
15288int
15289main ()
15290{
15291void *x=resize_term
15292 ;
15293 return 0;
15294}
15295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015296if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015299
Matthias Kloseb159a552010-04-25 21:00:44 +000015300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015301$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015302else
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15304$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015305
15306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15310$as_echo_n "checking for resizeterm... " >&6; }
15311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015312/* end confdefs.h. */
15313#include <curses.h>
15314int
15315main ()
15316{
15317void *x=resizeterm
15318 ;
15319 return 0;
15320}
15321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015323
Matthias Kloseb9621712010-04-24 17:59:49 +000015324$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015325
Matthias Kloseb159a552010-04-25 21:00:44 +000015326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015327$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015328else
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15330$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015331
15332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015334# last curses configure check
15335CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15338$as_echo "$as_me: checking for device files" >&6;}
15339
15340if test "x$cross_compiling" = xyes; then
15341 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15343$as_echo_n "checking for /dev/ptmx... " >&6; }
15344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15345$as_echo "not set" >&6; }
15346 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15347 fi
15348 if test "${ac_cv_file__dev_ptc+set}" != set; then
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15350$as_echo_n "checking for /dev/ptc... " >&6; }
15351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15352$as_echo "not set" >&6; }
15353 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15354 fi
15355fi
15356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15358$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015359if ${ac_cv_file__dev_ptmx+:} false; then :
15360 $as_echo_n "(cached) " >&6
15361else
15362 test "$cross_compiling" = yes &&
15363 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15364if test -r "/dev/ptmx"; then
15365 ac_cv_file__dev_ptmx=yes
15366else
15367 ac_cv_file__dev_ptmx=no
15368fi
15369fi
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15371$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15372if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015373
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015374fi
15375
15376if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015377
Matthias Kloseb9621712010-04-24 17:59:49 +000015378$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015379
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15382$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015383if ${ac_cv_file__dev_ptc+:} false; then :
15384 $as_echo_n "(cached) " >&6
15385else
15386 test "$cross_compiling" = yes &&
15387 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15388if test -r "/dev/ptc"; then
15389 ac_cv_file__dev_ptc=yes
15390else
15391 ac_cv_file__dev_ptc=no
15392fi
15393fi
15394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15395$as_echo "$ac_cv_file__dev_ptc" >&6; }
15396if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015397
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015398fi
15399
15400if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015403
Neal Norwitz865400f2003-03-21 01:42:58 +000015404fi
15405
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015406if test "$have_long_long" = yes
15407then
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15409$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015410 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015411 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015412else
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015414 ac_cv_have_long_long_format="cross -- assuming no"
15415 if test x$GCC = xyes; then
15416 save_CFLAGS=$CFLAGS
15417 CFLAGS="$CFLAGS -Werror -Wformat"
15418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15419/* end confdefs.h. */
15420
15421 #include <stdio.h>
15422 #include <stddef.h>
15423
15424int
15425main ()
15426{
15427
15428 char *buffer;
15429 sprintf(buffer, "%lld", (long long)123);
15430 sprintf(buffer, "%lld", (long long)-123);
15431 sprintf(buffer, "%llu", (unsigned long long)123);
15432
15433 ;
15434 return 0;
15435}
15436_ACEOF
15437if ac_fn_c_try_compile "$LINENO"; then :
15438 ac_cv_have_long_long_format=yes
15439
15440fi
15441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15442 CFLAGS=$save_CFLAGS
15443 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015446/* end confdefs.h. */
15447
15448 #include <stdio.h>
15449 #include <stddef.h>
15450 #include <string.h>
15451
15452 #ifdef HAVE_SYS_TYPES_H
15453 #include <sys/types.h>
15454 #endif
15455
15456 int main()
15457 {
15458 char buffer[256];
15459
15460 if (sprintf(buffer, "%lld", (long long)123) < 0)
15461 return 1;
15462 if (strcmp(buffer, "123"))
15463 return 1;
15464
15465 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15466 return 1;
15467 if (strcmp(buffer, "-123"))
15468 return 1;
15469
15470 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15471 return 1;
15472 if (strcmp(buffer, "123"))
15473 return 1;
15474
15475 return 0;
15476 }
15477
15478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015479if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015480 ac_cv_have_long_long_format=yes
15481else
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015486fi
15487
15488
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015489fi
15490
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15492$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015493fi
15494
Mark Dickinson89d7d412009-12-31 20:50:59 +000015495if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015496then
15497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015499
15500fi
15501
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015502if test $ac_sys_system = Darwin
15503then
15504 LIBS="$LIBS -framework CoreFoundation"
15505fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015506
Matthias Kloseb9621712010-04-24 17:59:49 +000015507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15508$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015509if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015510 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015511else
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015513 ac_cv_have_size_t_format="cross -- assuming yes"
15514
Thomas Wouters477c8d52006-05-27 19:21:47 +000015515else
Matthias Kloseb9621712010-04-24 17:59:49 +000015516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015517/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015518
Thomas Wouters477c8d52006-05-27 19:21:47 +000015519#include <stdio.h>
15520#include <stddef.h>
15521#include <string.h>
15522
Christian Heimes2c181612007-12-17 20:04:13 +000015523#ifdef HAVE_SYS_TYPES_H
15524#include <sys/types.h>
15525#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015526
15527#ifdef HAVE_SSIZE_T
15528typedef ssize_t Py_ssize_t;
15529#elif SIZEOF_VOID_P == SIZEOF_LONG
15530typedef long Py_ssize_t;
15531#else
15532typedef int Py_ssize_t;
15533#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015534
Christian Heimes2c181612007-12-17 20:04:13 +000015535int main()
15536{
15537 char buffer[256];
15538
Thomas Wouters477c8d52006-05-27 19:21:47 +000015539 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15540 return 1;
15541
Thomas Wouters89f507f2006-12-13 04:49:30 +000015542 if (strcmp(buffer, "123"))
15543 return 1;
15544
15545 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15546 return 1;
15547
15548 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015549 return 1;
15550
15551 return 0;
15552}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015553
Thomas Wouters477c8d52006-05-27 19:21:47 +000015554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015555if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015556 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015557else
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015562fi
15563
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15566$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015567if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015568
Matthias Kloseb9621712010-04-24 17:59:49 +000015569$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015570
15571fi
15572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015574#ifdef HAVE_SYS_TYPES_H
15575#include <sys/types.h>
15576#endif
15577#ifdef HAVE_SYS_SOCKET_H
15578#include <sys/socket.h>
15579#endif
15580
Matthias Kloseb9621712010-04-24 17:59:49 +000015581"
Victor Stinnere0be4232011-10-25 13:06:09 +020015582if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015583
Martin v. Löwis11437992002-04-12 09:54:03 +000015584else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015585
Matthias Kloseb9621712010-04-24 17:59:49 +000015586$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015587
15588fi
15589
Michael W. Hudson54241132001-12-07 15:38:26 +000015590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15592$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015593if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015594 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015595else
Matthias Kloseb9621712010-04-24 17:59:49 +000015596 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015597 ac_cv_broken_mbstowcs=no
15598else
Matthias Kloseb9621712010-04-24 17:59:49 +000015599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015600/* end confdefs.h. */
15601
Stefan Krah19c21392012-11-22 23:47:32 +010015602#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015603#include<stdlib.h>
15604int main() {
15605 size_t len = -1;
15606 const char *str = "text";
15607 len = mbstowcs(NULL, str, 0);
15608 return (len != 4);
15609}
15610
15611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015612if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015613 ac_cv_broken_mbstowcs=no
15614else
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15618 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015619fi
15620
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015621fi
15622
Matthias Kloseb9621712010-04-24 17:59:49 +000015623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15624$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015625if test "$ac_cv_broken_mbstowcs" = yes
15626then
15627
Matthias Kloseb9621712010-04-24 17:59:49 +000015628$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015629
15630fi
15631
Antoine Pitroub52ec782009-01-25 16:34:23 +000015632# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15634$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015635
15636# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015637if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015638 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015639if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015640then
15641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15645$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015646fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015647if test "$withval" = no
15648then
15649
15650$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15651
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15653$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015654fi
15655
Antoine Pitrou042b1282010-08-13 21:15:58 +000015656else
15657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15658$as_echo "no value specified" >&6; }
15659fi
15660
Antoine Pitroub52ec782009-01-25 16:34:23 +000015661
Matthias Kloseb17289e2012-03-15 19:51:34 +010015662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15663$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15664if ${ac_cv_computed_gotos+:} false; then :
15665 $as_echo_n "(cached) " >&6
15666else
15667 if test "$cross_compiling" = yes; then :
15668 if test "${with_computed_gotos+set}" = set; then
15669 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15670 else
15671 ac_cv_computed_gotos=no
15672 fi
15673else
15674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15675/* end confdefs.h. */
15676
15677int main(int argc, char **argv)
15678{
15679 static void *targets[1] = { &&LABEL1 };
15680 goto LABEL2;
15681LABEL1:
15682 return 0;
15683LABEL2:
15684 goto *targets[0];
15685 return 1;
15686}
15687
15688_ACEOF
15689if ac_fn_c_try_run "$LINENO"; then :
15690 ac_cv_computed_gotos=yes
15691else
15692 ac_cv_computed_gotos=no
15693fi
15694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15695 conftest.$ac_objext conftest.beam conftest.$ac_ext
15696fi
15697
15698fi
15699
15700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15701$as_echo "$ac_cv_computed_gotos" >&6; }
15702case "$ac_cv_computed_gotos" in yes*)
15703
15704$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15705
15706esac
15707
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015708case $ac_sys_system in
15709AIX*)
15710
15711$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15712 ;;
15713esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015714
Michael W. Hudson54241132001-12-07 15:38:26 +000015715
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015716
15717
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015718for h in `(cd $srcdir;echo Python/thread_*.h)`
15719do
15720 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15721done
15722
Michael W. Hudson54241132001-12-07 15:38:26 +000015723
Ned Deily0db50cf2014-07-25 12:41:31 -070015724SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15726$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015727for dir in $SRCDIRS; do
15728 if test ! -d $dir; then
15729 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015730 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015731done
Matthias Kloseb9621712010-04-24 17:59:49 +000015732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15733$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015734
Stefan Krah1919b7e2012-03-21 18:25:23 +010015735# Availability of -O2:
15736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15737$as_echo_n "checking for -O2... " >&6; }
15738saved_cflags="$CFLAGS"
15739CFLAGS="-O2"
15740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15741/* end confdefs.h. */
15742
15743int
15744main ()
15745{
15746
15747
15748 ;
15749 return 0;
15750}
15751_ACEOF
15752if ac_fn_c_try_compile "$LINENO"; then :
15753 have_O2=yes
15754else
15755 have_O2=no
15756fi
15757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15759$as_echo "$have_O2" >&6; }
15760CFLAGS="$saved_cflags"
15761
15762# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15763# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15765$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15766saved_cflags="$CFLAGS"
15767CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15768if test "$have_O2" = no; then
15769 CFLAGS=""
15770fi
15771if test "$cross_compiling" = yes; then :
15772 have_glibc_memmove_bug=undefined
15773else
15774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15775/* end confdefs.h. */
15776
15777#include <stdio.h>
15778#include <stdlib.h>
15779#include <string.h>
15780void foo(void *p, void *q) { memmove(p, q, 19); }
15781int main() {
15782 char a[32] = "123456789000000000";
15783 foo(&a[9], a);
15784 if (strcmp(a, "123456789123456789000000000") != 0)
15785 return 1;
15786 foo(a, &a[9]);
15787 if (strcmp(a, "123456789000000000") != 0)
15788 return 1;
15789 return 0;
15790}
15791
15792_ACEOF
15793if ac_fn_c_try_run "$LINENO"; then :
15794 have_glibc_memmove_bug=no
15795else
15796 have_glibc_memmove_bug=yes
15797fi
15798rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15799 conftest.$ac_objext conftest.beam conftest.$ac_ext
15800fi
15801
15802CFLAGS="$saved_cflags"
15803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15804$as_echo "$have_glibc_memmove_bug" >&6; }
15805if test "$have_glibc_memmove_bug" = yes; then
15806
15807$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15808
15809fi
15810
15811if test "$have_gcc_asm_for_x87" = yes; then
15812 # Some versions of gcc miscompile inline asm:
15813 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15814 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15815 case $CC in
15816 *gcc*)
15817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15818$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15819 saved_cflags="$CFLAGS"
15820 CFLAGS="-O2"
15821 if test "$cross_compiling" = yes; then :
15822 have_ipa_pure_const_bug=undefined
15823else
15824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15825/* end confdefs.h. */
15826
15827 __attribute__((noinline)) int
15828 foo(int *p) {
15829 int r;
15830 asm ( "movl \$6, (%1)\n\t"
15831 "xorl %0, %0\n\t"
15832 : "=r" (r) : "r" (p) : "memory"
15833 );
15834 return r;
15835 }
15836 int main() {
15837 int p = 8;
15838 if ((foo(&p) ? : p) != 6)
15839 return 1;
15840 return 0;
15841 }
15842
15843_ACEOF
15844if ac_fn_c_try_run "$LINENO"; then :
15845 have_ipa_pure_const_bug=no
15846else
15847 have_ipa_pure_const_bug=yes
15848fi
15849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15850 conftest.$ac_objext conftest.beam conftest.$ac_ext
15851fi
15852
15853 CFLAGS="$saved_cflags"
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15855$as_echo "$have_ipa_pure_const_bug" >&6; }
15856 if test "$have_ipa_pure_const_bug" = yes; then
15857
15858$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15859
15860 fi
15861 ;;
15862 esac
15863fi
15864
Victor Stinner4f5366e2015-01-09 02:13:19 +010015865# Check for stdatomic.h
15866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15867$as_echo_n "checking for stdatomic.h... " >&6; }
15868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15869/* end confdefs.h. */
15870
15871
15872 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015873 atomic_int value = ATOMIC_VAR_INIT(1);
15874 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015875 int main() {
15876 int loaded_value = atomic_load(&value);
15877 return 0;
15878 }
15879
15880
15881_ACEOF
15882if ac_fn_c_try_link "$LINENO"; then :
15883 have_stdatomic_h=yes
15884else
15885 have_stdatomic_h=no
15886fi
15887rm -f core conftest.err conftest.$ac_objext \
15888 conftest$ac_exeext conftest.$ac_ext
15889
15890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15891$as_echo "$have_stdatomic_h" >&6; }
15892
15893if test "$have_stdatomic_h" = yes; then
15894
15895$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15896
15897fi
15898
15899# Check for GCC >= 4.7 __atomic builtins
15900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15901$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15903/* end confdefs.h. */
15904
15905
15906 volatile int val = 1;
15907 int main() {
15908 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15909 return 0;
15910 }
15911
15912
15913_ACEOF
15914if ac_fn_c_try_link "$LINENO"; then :
15915 have_builtin_atomic=yes
15916else
15917 have_builtin_atomic=no
15918fi
15919rm -f core conftest.err conftest.$ac_objext \
15920 conftest$ac_exeext conftest.$ac_ext
15921
15922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15923$as_echo "$have_builtin_atomic" >&6; }
15924
15925if test "$have_builtin_atomic" = yes; then
15926
15927$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15928
15929fi
15930
Ned Deily322f5ba2013-11-21 23:01:59 -080015931# ensurepip option
15932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15933$as_echo_n "checking for ensurepip... " >&6; }
15934
15935# Check whether --with-ensurepip was given.
15936if test "${with_ensurepip+set}" = set; then :
15937 withval=$with_ensurepip;
15938else
15939 with_ensurepip=upgrade
15940fi
15941
15942case $with_ensurepip in #(
15943 yes|upgrade) :
15944 ENSUREPIP=upgrade ;; #(
15945 install) :
15946 ENSUREPIP=install ;; #(
15947 no) :
15948 ENSUREPIP=no ;; #(
15949 *) :
15950 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15951esac
15952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15953$as_echo "$ENSUREPIP" >&6; }
15954
15955
Victor Stinner35a97c02015-03-08 02:59:09 +010015956# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
15957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
15958$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
15959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15960/* end confdefs.h. */
15961
15962
15963 #include <dirent.h>
15964
15965 int main() {
15966 struct dirent entry;
15967 return entry.d_type == DT_UNKNOWN;
15968 }
15969
15970
15971_ACEOF
15972if ac_fn_c_try_link "$LINENO"; then :
15973 have_dirent_d_type=yes
15974else
15975 have_dirent_d_type=no
15976fi
15977rm -f core conftest.err conftest.$ac_objext \
15978 conftest$ac_exeext conftest.$ac_ext
15979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
15980$as_echo "$have_dirent_d_type" >&6; }
15981
15982if test "$have_dirent_d_type" = yes; then
15983
15984$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
15985
15986fi
15987
Victor Stinner9eb57c52015-03-19 22:21:49 +010015988# check if the Linux getrandom() syscall is available
15989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
15990$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
15991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15992/* end confdefs.h. */
15993
15994
15995 #include <sys/syscall.h>
15996
15997 int main() {
15998 const int flags = 0;
15999 char buffer[1];
16000 int n;
16001 /* ignore the result, Python checks for ENOSYS at runtime */
16002 (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
16003 return 0;
16004 }
16005
16006
16007_ACEOF
16008if ac_fn_c_try_link "$LINENO"; then :
16009 have_getrandom_syscall=yes
16010else
16011 have_getrandom_syscall=no
16012fi
16013rm -f core conftest.err conftest.$ac_objext \
16014 conftest$ac_exeext conftest.$ac_ext
16015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16016$as_echo "$have_getrandom_syscall" >&6; }
16017
16018if test "$have_getrandom_syscall" = yes; then
16019
16020$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16021
16022fi
16023
Guido van Rossum627b2d71993-12-24 10:39:16 +000016024# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016025ac_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 +000016026
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016027ac_config_files="$ac_config_files Modules/ld_so_aix"
16028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016030# This file is a shell script that caches the results of configure
16031# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016032# scripts and configure runs, see configure's option --config-cache.
16033# It is not useful on other systems. If it contains results you don't
16034# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016035#
Martin v. Löwis11437992002-04-12 09:54:03 +000016036# config.status only pays attention to the cache file if you give it
16037# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016038#
Skip Montanaro6dead952003-09-25 14:50:04 +000016039# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016040# loading this file, other *unset* `ac_cv_foo' will be assigned the
16041# following values.
16042
16043_ACEOF
16044
Guido van Rossumf78abae1997-01-21 22:02:36 +000016045# The following way of writing the cache mishandles newlines in values,
16046# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016047# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016048# Ultrix sh set writes to stderr and can't be redirected directly,
16049# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050(
16051 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16052 eval ac_val=\$$ac_var
16053 case $ac_val in #(
16054 *${as_nl}*)
16055 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016056 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16057$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058 esac
16059 case $ac_var in #(
16060 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016061 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16062 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016063 esac ;;
16064 esac
16065 done
16066
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16069 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 # `set' does not quote correctly, so add quotes: double-quote
16071 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016073 "s/'/'\\\\''/g;
16074 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016075 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016076 *)
16077 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016078 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016080 esac |
16081 sort
16082) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016083 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016087 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16088 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016089 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16090 :end' >>confcache
16091if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16092 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016093 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16095$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016096 if test ! -f "$cache_file" || test -h "$cache_file"; then
16097 cat confcache >"$cache_file"
16098 else
16099 case $cache_file in #(
16100 */* | ?:*)
16101 mv -f confcache "$cache_file"$$ &&
16102 mv -f "$cache_file"$$ "$cache_file" ;; #(
16103 *)
16104 mv -f confcache "$cache_file" ;;
16105 esac
16106 fi
16107 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016108 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016109 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16110$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016111 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016112fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016113rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016114
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016115test "x$prefix" = xNONE && prefix=$ac_default_prefix
16116# Let make expand exec_prefix.
16117test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016118
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016119DEFS=-DHAVE_CONFIG_H
16120
Skip Montanaro6dead952003-09-25 14:50:04 +000016121ac_libobjs=
16122ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016123U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016124for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16125 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16129 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16131 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016132done
16133LIBOBJS=$ac_libobjs
16134
16135LTLIBOBJS=$ac_ltlibobjs
16136
16137
Martin v. Löwis11437992002-04-12 09:54:03 +000016138
Matthias Kloseb9621712010-04-24 17:59:49 +000016139
Victor Stinnere0be4232011-10-25 13:06:09 +020016140: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016141ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016142ac_clean_files_save=$ac_clean_files
16143ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016144{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16145$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16146as_write_fail=0
16147cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016148#! $SHELL
16149# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016150# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016151# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016152# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016153
Martin v. Löwis11437992002-04-12 09:54:03 +000016154debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016155ac_cs_recheck=false
16156ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016157
Matthias Kloseb9621712010-04-24 17:59:49 +000016158SHELL=\${CONFIG_SHELL-$SHELL}
16159export SHELL
16160_ASEOF
16161cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16162## -------------------- ##
16163## M4sh Initialization. ##
16164## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166# Be more Bourne compatible
16167DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016168if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 emulate sh
16170 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016171 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016172 # is contrary to our usage. Disable this feature.
16173 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016175else
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 case `(set -o) 2>/dev/null` in #(
16177 *posix*) :
16178 set -o posix ;; #(
16179 *) :
16180 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016181esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016182fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016183
16184
Matthias Kloseb9621712010-04-24 17:59:49 +000016185as_nl='
16186'
16187export as_nl
16188# Printing a long string crashes Solaris 7 /usr/bin/printf.
16189as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16190as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16191as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16192# Prefer a ksh shell builtin over an external printf program on Solaris,
16193# but without wasting forks for bash or zsh.
16194if test -z "$BASH_VERSION$ZSH_VERSION" \
16195 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16196 as_echo='print -r --'
16197 as_echo_n='print -rn --'
16198elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16199 as_echo='printf %s\n'
16200 as_echo_n='printf %s'
16201else
16202 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16203 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16204 as_echo_n='/usr/ucb/echo -n'
16205 else
16206 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16207 as_echo_n_body='eval
16208 arg=$1;
16209 case $arg in #(
16210 *"$as_nl"*)
16211 expr "X$arg" : "X\\(.*\\)$as_nl";
16212 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16213 esac;
16214 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16215 '
16216 export as_echo_n_body
16217 as_echo_n='sh -c $as_echo_n_body as_echo'
16218 fi
16219 export as_echo_body
16220 as_echo='sh -c $as_echo_body as_echo'
16221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016222
16223# The user is always right.
16224if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016225 PATH_SEPARATOR=:
16226 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16227 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16228 PATH_SEPARATOR=';'
16229 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016232
16233# IFS
16234# We need space, tab and new line, in precisely that order. Quoting is
16235# there to prevent editors from complaining about space-tab.
16236# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16237# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238IFS=" "" $as_nl"
16239
16240# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016241as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016242case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243 *[\\/]* ) as_myself=$0 ;;
16244 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016245for as_dir in $PATH
16246do
16247 IFS=$as_save_IFS
16248 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016249 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16250 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253 ;;
16254esac
16255# We did not find ourselves, most probably we were run as `sh COMMAND'
16256# in which case we are not to be found in the path.
16257if test "x$as_myself" = x; then
16258 as_myself=$0
16259fi
16260if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016261 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16262 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263fi
16264
Matthias Kloseb9621712010-04-24 17:59:49 +000016265# Unset variables that we do not need and which cause bugs (e.g. in
16266# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16267# suppresses any "Segmentation fault" message there. '((' could
16268# trigger a bug in pdksh 5.2.14.
16269for as_var in BASH_ENV ENV MAIL MAILPATH
16270do eval test x\${$as_var+set} = xset \
16271 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272done
16273PS1='$ '
16274PS2='> '
16275PS4='+ '
16276
16277# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016278LC_ALL=C
16279export LC_ALL
16280LANGUAGE=C
16281export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282
Matthias Kloseb9621712010-04-24 17:59:49 +000016283# CDPATH.
16284(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16285
16286
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016287# as_fn_error STATUS ERROR [LINENO LOG_FD]
16288# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016289# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16290# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016291# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016292as_fn_error ()
16293{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016294 as_status=$1; test $as_status -eq 0 && as_status=1
16295 if test "$4"; then
16296 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16297 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016298 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016299 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016300 as_fn_exit $as_status
16301} # as_fn_error
16302
16303
16304# as_fn_set_status STATUS
16305# -----------------------
16306# Set $? to STATUS, without forking.
16307as_fn_set_status ()
16308{
16309 return $1
16310} # as_fn_set_status
16311
16312# as_fn_exit STATUS
16313# -----------------
16314# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16315as_fn_exit ()
16316{
16317 set +e
16318 as_fn_set_status $1
16319 exit $1
16320} # as_fn_exit
16321
16322# as_fn_unset VAR
16323# ---------------
16324# Portably unset VAR.
16325as_fn_unset ()
16326{
16327 { eval $1=; unset $1;}
16328}
16329as_unset=as_fn_unset
16330# as_fn_append VAR VALUE
16331# ----------------------
16332# Append the text in VALUE to the end of the definition contained in VAR. Take
16333# advantage of any shell optimizations that allow amortized linear growth over
16334# repeated appends, instead of the typical quadratic growth present in naive
16335# implementations.
16336if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16337 eval 'as_fn_append ()
16338 {
16339 eval $1+=\$2
16340 }'
16341else
16342 as_fn_append ()
16343 {
16344 eval $1=\$$1\$2
16345 }
16346fi # as_fn_append
16347
16348# as_fn_arith ARG...
16349# ------------------
16350# Perform arithmetic evaluation on the ARGs, and store the result in the
16351# global $as_val. Take advantage of shells that can avoid forks. The arguments
16352# must be portable across $(()) and expr.
16353if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16354 eval 'as_fn_arith ()
16355 {
16356 as_val=$(( $* ))
16357 }'
16358else
16359 as_fn_arith ()
16360 {
16361 as_val=`expr "$@" || test $? -eq 1`
16362 }
16363fi # as_fn_arith
16364
16365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366if expr a : '\(a\)' >/dev/null 2>&1 &&
16367 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16368 as_expr=expr
16369else
16370 as_expr=false
16371fi
16372
16373if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16374 as_basename=basename
16375else
16376 as_basename=false
16377fi
16378
Matthias Kloseb9621712010-04-24 17:59:49 +000016379if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16380 as_dirname=dirname
16381else
16382 as_dirname=false
16383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016385as_me=`$as_basename -- "$0" ||
16386$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16387 X"$0" : 'X\(//\)$' \| \
16388 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016389$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390 sed '/^.*\/\([^/][^/]*\)\/*$/{
16391 s//\1/
16392 q
16393 }
16394 /^X\/\(\/\/\)$/{
16395 s//\1/
16396 q
16397 }
16398 /^X\/\(\/\).*/{
16399 s//\1/
16400 q
16401 }
16402 s/.*/./; q'`
16403
Matthias Kloseb9621712010-04-24 17:59:49 +000016404# Avoid depending upon Character Ranges.
16405as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16406as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16407as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16408as_cr_digits='0123456789'
16409as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016410
16411ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016412case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016414 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016416 xy) ECHO_C='\c';;
16417 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16418 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419 esac;;
16420*)
16421 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425if test -d conf$$.dir; then
16426 rm -f conf$$.dir/conf$$.file
16427else
16428 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016429 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016431if (echo >conf$$.file) 2>/dev/null; then
16432 if ln -s conf$$.file conf$$ 2>/dev/null; then
16433 as_ln_s='ln -s'
16434 # ... but there are two gotchas:
16435 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16436 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016437 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016438 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016439 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016440 elif ln conf$$.file conf$$ 2>/dev/null; then
16441 as_ln_s=ln
16442 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016443 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016444 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016445else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016446 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016448rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16449rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016450
Matthias Kloseb9621712010-04-24 17:59:49 +000016451
16452# as_fn_mkdir_p
16453# -------------
16454# Create "$as_dir" as a directory, including parents if necessary.
16455as_fn_mkdir_p ()
16456{
16457
16458 case $as_dir in #(
16459 -*) as_dir=./$as_dir;;
16460 esac
16461 test -d "$as_dir" || eval $as_mkdir_p || {
16462 as_dirs=
16463 while :; do
16464 case $as_dir in #(
16465 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16466 *) as_qdir=$as_dir;;
16467 esac
16468 as_dirs="'$as_qdir' $as_dirs"
16469 as_dir=`$as_dirname -- "$as_dir" ||
16470$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16471 X"$as_dir" : 'X\(//\)[^/]' \| \
16472 X"$as_dir" : 'X\(//\)$' \| \
16473 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16474$as_echo X"$as_dir" |
16475 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16476 s//\1/
16477 q
16478 }
16479 /^X\(\/\/\)[^/].*/{
16480 s//\1/
16481 q
16482 }
16483 /^X\(\/\/\)$/{
16484 s//\1/
16485 q
16486 }
16487 /^X\(\/\).*/{
16488 s//\1/
16489 q
16490 }
16491 s/.*/./; q'`
16492 test -d "$as_dir" && break
16493 done
16494 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016495 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016496
16497
16498} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016499if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016500 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016501else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016502 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016503 as_mkdir_p=false
16504fi
16505
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016506
16507# as_fn_executable_p FILE
16508# -----------------------
16509# Test if FILE is an executable regular file.
16510as_fn_executable_p ()
16511{
16512 test -f "$1" && test -x "$1"
16513} # as_fn_executable_p
16514as_test_x='test -x'
16515as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016516
16517# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016518as_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 +000016519
16520# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016521as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016522
16523
Martin v. Löwis11437992002-04-12 09:54:03 +000016524exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016525## ----------------------------------- ##
16526## Main body of $CONFIG_STATUS script. ##
16527## ----------------------------------- ##
16528_ASEOF
16529test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016530
Matthias Kloseb9621712010-04-24 17:59:49 +000016531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16532# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016533# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534# values after options handling.
16535ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016536This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016537generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016538
16539 CONFIG_FILES = $CONFIG_FILES
16540 CONFIG_HEADERS = $CONFIG_HEADERS
16541 CONFIG_LINKS = $CONFIG_LINKS
16542 CONFIG_COMMANDS = $CONFIG_COMMANDS
16543 $ $0 $@
16544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016545on `(hostname || uname -n) 2>/dev/null | sed 1q`
16546"
16547
Martin v. Löwis11437992002-04-12 09:54:03 +000016548_ACEOF
16549
Matthias Kloseb9621712010-04-24 17:59:49 +000016550case $ac_config_files in *"
16551"*) set x $ac_config_files; shift; ac_config_files=$*;;
16552esac
16553
16554case $ac_config_headers in *"
16555"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16556esac
16557
16558
16559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016560# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016561config_files="$ac_config_files"
16562config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016565
Matthias Kloseb9621712010-04-24 17:59:49 +000016566cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016567ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016568\`$as_me' instantiates files and other configuration actions
16569from templates according to the current configuration. Unless the files
16570and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016571
Matthias Kloseb9621712010-04-24 17:59:49 +000016572Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016573
16574 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016575 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016576 --config print configuration, then exit
16577 -q, --quiet, --silent
16578 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016579 -d, --debug don't remove temporary files
16580 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016581 --file=FILE[:TEMPLATE]
16582 instantiate the configuration file FILE
16583 --header=FILE[:TEMPLATE]
16584 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016585
16586Configuration files:
16587$config_files
16588
16589Configuration headers:
16590$config_headers
16591
Matthias Kloseb9621712010-04-24 17:59:49 +000016592Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016595cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16596ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016597ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016598python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016599configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016600 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016601
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016602Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016603This config.status script is free software; the Free Software Foundation
16604gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605
16606ac_pwd='$ac_pwd'
16607srcdir='$srcdir'
16608INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016609MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016610test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016611_ACEOF
16612
Matthias Kloseb9621712010-04-24 17:59:49 +000016613cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16614# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016615ac_need_defaults=:
16616while test $# != 0
16617do
16618 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016619 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16621 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016622 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016623 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016624 --*=)
16625 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16626 ac_optarg=
16627 ac_shift=:
16628 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016630 ac_option=$1
16631 ac_optarg=$2
16632 ac_shift=shift
16633 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 esac
16635
Skip Montanaro6dead952003-09-25 14:50:04 +000016636 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016637 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016638 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16639 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016641 $as_echo "$ac_cs_version"; exit ;;
16642 --config | --confi | --conf | --con | --co | --c )
16643 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 debug=: ;;
16646 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016647 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016648 case $ac_optarg in
16649 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016650 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016651 esac
16652 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016653 ac_need_defaults=false;;
16654 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016655 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016656 case $ac_optarg in
16657 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16658 esac
16659 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661 --he | --h)
16662 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016663 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016664Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016666 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016667 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16668 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16669 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016670
16671 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016672 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016673Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016674
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016677
16678 esac
16679 shift
16680done
16681
Skip Montanaro6dead952003-09-25 14:50:04 +000016682ac_configure_extra_args=
16683
16684if $ac_cs_silent; then
16685 exec 6>/dev/null
16686 ac_configure_extra_args="$ac_configure_extra_args --silent"
16687fi
16688
16689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016690cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016691if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016692 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 shift
16694 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16695 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016697 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016698fi
16699
Martin v. Löwis11437992002-04-12 09:54:03 +000016700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702exec 5>>config.log
16703{
16704 echo
16705 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16706## Running $as_me. ##
16707_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016708 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016712cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016714
Matthias Kloseb9621712010-04-24 17:59:49 +000016715cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716
16717# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016718for ac_config_target in $ac_config_targets
16719do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 case $ac_config_target in
16721 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16722 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16723 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016724 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16725 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16727 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016728 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016729 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016730 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731
Victor Stinnere0be4232011-10-25 13:06:09 +020016732 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016733 esac
16734done
16735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736
Martin v. Löwis11437992002-04-12 09:54:03 +000016737# If the user did not use the arguments to specify the items to instantiate,
16738# then the envvar interface is used. Set only those that are not.
16739# We use the long form for the default assignment because of an extremely
16740# bizarre bug on SunOS 4.1.3.
16741if $ac_need_defaults; then
16742 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16743 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16744fi
16745
Skip Montanaro6dead952003-09-25 14:50:04 +000016746# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016748# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749# Hook for its removal unless debugging.
16750# Note that there is a small window in which the directory will not be cleaned:
16751# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016752$debug ||
16753{
Victor Stinnere0be4232011-10-25 13:06:09 +020016754 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016756 : "${ac_tmp:=$tmp}"
16757 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016758' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016759 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016760}
Martin v. Löwis11437992002-04-12 09:54:03 +000016761# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016762
Martin v. Löwis11437992002-04-12 09:54:03 +000016763{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016764 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016765 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016766} ||
16767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 tmp=./conf$$-$RANDOM
16769 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016770} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016771ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016772
Matthias Kloseb9621712010-04-24 17:59:49 +000016773# Set up the scripts for CONFIG_FILES section.
16774# No need to generate them if there are no CONFIG_FILES.
16775# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016777
Matthias Kloseb9621712010-04-24 17:59:49 +000016778
16779ac_cr=`echo X | tr X '\015'`
16780# On cygwin, bash can eat \r inside `` if the user requested igncr.
16781# But we know of no other shell where ac_cr would be empty at this
16782# point, so we can use a bashism as a fallback.
16783if test "x$ac_cr" = x; then
16784 eval ac_cr=\$\'\\r\'
16785fi
16786ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16787if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016788 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016789else
16790 ac_cs_awk_cr=$ac_cr
16791fi
16792
Victor Stinnere0be4232011-10-25 13:06:09 +020016793echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016794_ACEOF
16795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796
Matthias Kloseb9621712010-04-24 17:59:49 +000016797{
16798 echo "cat >conf$$subs.awk <<_ACEOF" &&
16799 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16800 echo "_ACEOF"
16801} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016802 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16803ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804ac_delim='%!_!# '
16805for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016806 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016807 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808
Matthias Kloseb9621712010-04-24 17:59:49 +000016809 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16810 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811 break
16812 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016813 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814 else
16815 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016816 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817done
Matthias Kloseb9621712010-04-24 17:59:49 +000016818rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819
Matthias Kloseb9621712010-04-24 17:59:49 +000016820cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016821cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016823sed -n '
16824h
16825s/^/S["/; s/!.*/"]=/
16826p
16827g
16828s/^[^!]*!//
16829:repl
16830t repl
16831s/'"$ac_delim"'$//
16832t delim
16833:nl
16834h
16835s/\(.\{148\}\)..*/\1/
16836t more1
16837s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16838p
16839n
16840b repl
16841:more1
16842s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16843p
16844g
16845s/.\{148\}//
16846t nl
16847:delim
16848h
16849s/\(.\{148\}\)..*/\1/
16850t more2
16851s/["\\]/\\&/g; s/^/"/; s/$/"/
16852p
16853b
16854:more2
16855s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16856p
16857g
16858s/.\{148\}//
16859t delim
16860' <conf$$subs.awk | sed '
16861/^[^""]/{
16862 N
16863 s/\n//
16864}
16865' >>$CONFIG_STATUS || ac_write_fail=1
16866rm -f conf$$subs.awk
16867cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16868_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016869cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016870 for (key in S) S_is_set[key] = 1
16871 FS = ""
16872
16873}
16874{
16875 line = $ 0
16876 nfields = split(line, field, "@")
16877 substed = 0
16878 len = length(field[1])
16879 for (i = 2; i < nfields; i++) {
16880 key = field[i]
16881 keylen = length(key)
16882 if (S_is_set[key]) {
16883 value = S[key]
16884 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16885 len += length(value) + length(field[++i])
16886 substed = 1
16887 } else
16888 len += 1 + keylen
16889 }
16890
16891 print line
16892}
16893
16894_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016896cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16897if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16898 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16899else
16900 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016901fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016902 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016903_ACEOF
16904
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016905# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16906# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907# trailing colons and then remove the whole line if VPATH becomes empty
16908# (actually we leave an empty line to preserve line numbers).
16909if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016910 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16911h
16912s///
16913s/^/:/
16914s/[ ]*$/:/
16915s/:\$(srcdir):/:/g
16916s/:\${srcdir}:/:/g
16917s/:@srcdir@:/:/g
16918s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016920x
16921s/\(=[ ]*\).*/\1/
16922G
16923s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016924s/^[^=]*=[ ]*$//
16925}'
16926fi
16927
Matthias Kloseb9621712010-04-24 17:59:49 +000016928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016929fi # test -n "$CONFIG_FILES"
16930
Matthias Kloseb9621712010-04-24 17:59:49 +000016931# Set up the scripts for CONFIG_HEADERS section.
16932# No need to generate them if there are no CONFIG_HEADERS.
16933# This happens for instance with `./config.status Makefile'.
16934if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016935cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016936BEGIN {
16937_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938
Matthias Kloseb9621712010-04-24 17:59:49 +000016939# Transform confdefs.h into an awk script `defines.awk', embedded as
16940# here-document in config.status, that substitutes the proper values into
16941# config.h.in to produce config.h.
16942
16943# Create a delimiter string that does not exist in confdefs.h, to ease
16944# handling of long lines.
16945ac_delim='%!_!# '
16946for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016947 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16948 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016949 break
16950 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016951 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016952 else
16953 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16954 fi
16955done
16956
16957# For the awk script, D is an array of macro values keyed by name,
16958# likewise P contains macro parameters if any. Preserve backslash
16959# newline sequences.
16960
16961ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16962sed -n '
16963s/.\{148\}/&'"$ac_delim"'/g
16964t rset
16965:rset
16966s/^[ ]*#[ ]*define[ ][ ]*/ /
16967t def
16968d
16969:def
16970s/\\$//
16971t bsnl
16972s/["\\]/\\&/g
16973s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16974D["\1"]=" \3"/p
16975s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16976d
16977:bsnl
16978s/["\\]/\\&/g
16979s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16980D["\1"]=" \3\\\\\\n"\\/p
16981t cont
16982s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16983t cont
16984d
16985:cont
16986n
16987s/.\{148\}/&'"$ac_delim"'/g
16988t clear
16989:clear
16990s/\\$//
16991t bsnlc
16992s/["\\]/\\&/g; s/^/"/; s/$/"/p
16993d
16994:bsnlc
16995s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16996b cont
16997' <confdefs.h | sed '
16998s/'"$ac_delim"'/"\\\
16999"/g' >>$CONFIG_STATUS || ac_write_fail=1
17000
17001cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17002 for (key in D) D_is_set[key] = 1
17003 FS = ""
17004}
17005/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17006 line = \$ 0
17007 split(line, arg, " ")
17008 if (arg[1] == "#") {
17009 defundef = arg[2]
17010 mac1 = arg[3]
17011 } else {
17012 defundef = substr(arg[1], 2)
17013 mac1 = arg[2]
17014 }
17015 split(mac1, mac2, "(") #)
17016 macro = mac2[1]
17017 prefix = substr(line, 1, index(line, defundef) - 1)
17018 if (D_is_set[macro]) {
17019 # Preserve the white space surrounding the "#".
17020 print prefix "define", macro P[macro] D[macro]
17021 next
17022 } else {
17023 # Replace #undef with comments. This is necessary, for example,
17024 # in the case of _POSIX_SOURCE, which is predefined and required
17025 # on some systems where configure will not decide to define it.
17026 if (defundef == "undef") {
17027 print "/*", prefix defundef, macro, "*/"
17028 next
17029 }
17030 }
17031}
17032{ print }
17033_ACAWK
17034_ACEOF
17035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017036 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017037fi # test -n "$CONFIG_HEADERS"
17038
17039
17040eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17041shift
17042for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043do
17044 case $ac_tag in
17045 :[FHLC]) ac_mode=$ac_tag; continue;;
17046 esac
17047 case $ac_mode$ac_tag in
17048 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017049 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050 :[FH]-) ac_tag=-:-;;
17051 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17052 esac
17053 ac_save_IFS=$IFS
17054 IFS=:
17055 set x $ac_tag
17056 IFS=$ac_save_IFS
17057 shift
17058 ac_file=$1
17059 shift
17060
17061 case $ac_mode in
17062 :L) ac_source=$1;;
17063 :[FH])
17064 ac_file_inputs=
17065 for ac_f
17066 do
17067 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017068 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069 *) # Look for the file first in the build tree, then in the source tree
17070 # (if the path is not absolute). The absolute path cannot be DOS-style,
17071 # because $ac_f cannot contain `:'.
17072 test -f "$ac_f" ||
17073 case $ac_f in
17074 [\\/$]*) false;;
17075 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17076 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017077 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017079 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17080 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081 done
17082
17083 # Let's still pretend it is `configure' which instantiates (i.e., don't
17084 # use $as_me), people would be surprised to read:
17085 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017086 configure_input='Generated from '`
17087 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17088 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017089 if test x"$ac_file" != x-; then
17090 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017091 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17092$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017094 # Neutralize special characters interpreted by sed in replacement strings.
17095 case $configure_input in #(
17096 *\&* | *\|* | *\\* )
17097 ac_sed_conf_input=`$as_echo "$configure_input" |
17098 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17099 *) ac_sed_conf_input=$configure_input;;
17100 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101
17102 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017103 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17104 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017105 esac
17106 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017107 esac
17108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017110$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017111 X"$ac_file" : 'X\(//\)[^/]' \| \
17112 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017113 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017114$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17116 s//\1/
17117 q
17118 }
17119 /^X\(\/\/\)[^/].*/{
17120 s//\1/
17121 q
17122 }
17123 /^X\(\/\/\)$/{
17124 s//\1/
17125 q
17126 }
17127 /^X\(\/\).*/{
17128 s//\1/
17129 q
17130 }
17131 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017132 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017133 ac_builddir=.
17134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017135case "$ac_dir" in
17136.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17137*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017138 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017139 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017140 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017141 case $ac_top_builddir_sub in
17142 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17143 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17144 esac ;;
17145esac
17146ac_abs_top_builddir=$ac_pwd
17147ac_abs_builddir=$ac_pwd$ac_dir_suffix
17148# for backward compatibility:
17149ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017150
17151case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017152 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017153 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017154 ac_top_srcdir=$ac_top_builddir_sub
17155 ac_abs_top_srcdir=$ac_pwd ;;
17156 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017157 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017158 ac_top_srcdir=$srcdir
17159 ac_abs_top_srcdir=$srcdir ;;
17160 *) # Relative name.
17161 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17162 ac_top_srcdir=$ac_top_build_prefix$srcdir
17163 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017164esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017165ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017166
Martin v. Löwis11437992002-04-12 09:54:03 +000017167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168 case $ac_mode in
17169 :F)
17170 #
17171 # CONFIG_FILE
17172 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017173
17174 case $INSTALL in
17175 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017177 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017178 ac_MKDIR_P=$MKDIR_P
17179 case $MKDIR_P in
17180 [\\/$]* | ?:[\\/]* ) ;;
17181 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17182 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017183_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184
Matthias Kloseb9621712010-04-24 17:59:49 +000017185cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186# If the template does not know about datarootdir, expand it.
17187# FIXME: This hack should be removed a few years after 2.60.
17188ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017189ac_sed_dataroot='
17190/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191 p
17192 q
17193}
17194/@datadir@/p
17195/@docdir@/p
17196/@infodir@/p
17197/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017198/@mandir@/p'
17199case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200*datarootdir*) ac_datarootdir_seen=yes;;
17201*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017202 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17203$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206 ac_datarootdir_hack='
17207 s&@datadir@&$datadir&g
17208 s&@docdir@&$docdir&g
17209 s&@infodir@&$infodir&g
17210 s&@localedir@&$localedir&g
17211 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017212 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213esac
17214_ACEOF
17215
17216# Neutralize VPATH when `$srcdir' = `.'.
17217# Shell code in configure.ac might set extrasub.
17218# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17220ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017221$extrasub
17222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017224:t
17225/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017226s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017227s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017228s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229s&@srcdir@&$ac_srcdir&;t t
17230s&@abs_srcdir@&$ac_abs_srcdir&;t t
17231s&@top_srcdir@&$ac_top_srcdir&;t t
17232s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17233s&@builddir@&$ac_builddir&;t t
17234s&@abs_builddir@&$ac_abs_builddir&;t t
17235s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17236s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017237s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017239"
Victor Stinnere0be4232011-10-25 13:06:09 +020017240eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17241 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017243test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017244 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17245 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17246 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017247 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017248which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017249$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017250which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017251
Victor Stinnere0be4232011-10-25 13:06:09 +020017252 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017254 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17255 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017256 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017257 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258 ;;
17259 :H)
17260 #
17261 # CONFIG_HEADER
17262 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017264 {
17265 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017266 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17267 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017268 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017269 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017270 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17271$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017272 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017274 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017275 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017276 fi
17277 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017278 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017279 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017280 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017281 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017284
17285 esac
17286
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017287
17288 case $ac_file$ac_mode in
17289 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17290
17291 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292done # for ac_tag
17293
Guido van Rossum627b2d71993-12-24 10:39:16 +000017294
Matthias Kloseb9621712010-04-24 17:59:49 +000017295as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017296_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017297ac_clean_files=$ac_clean_files_save
17298
Matthias Kloseb9621712010-04-24 17:59:49 +000017299test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017300 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017301
Martin v. Löwis11437992002-04-12 09:54:03 +000017302
17303# configure is writing to config.log, and then calls config.status.
17304# config.status does its own redirection, appending to config.log.
17305# Unfortunately, on DOS this fails, as config.log is still kept open
17306# by configure, so config.status won't be able to write to it; its
17307# output is simply discarded. So we exec the FD to /dev/null,
17308# effectively closing config.log, so it can be properly (re)opened and
17309# appended to by config.status. When coming back to configure, we
17310# need to make the FD available again.
17311if test "$no_create" != yes; then
17312 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017313 ac_config_status_args=
17314 test "$silent" = yes &&
17315 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017316 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017317 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017318 exec 5>>config.log
17319 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17320 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017321 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017322fi
17323if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17325$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017326fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017327
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017328
Christian Heimes75ed8902013-11-20 01:11:18 +010017329echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017330if test ! -f Modules/Setup
17331then
17332 cp $srcdir/Modules/Setup.dist Modules/Setup
17333fi
17334
Christian Heimes75ed8902013-11-20 01:11:18 +010017335echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017336if test ! -f Modules/Setup.local
17337then
17338 echo "# Edit this file for local setup changes" >Modules/Setup.local
17339fi
17340
Christian Heimes75ed8902013-11-20 01:11:18 +010017341echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017342$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17343 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017344 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017345mv config.c Modules