blob: 01dd2535de9cd76e34fb9af697ae6c798f060557 [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.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://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
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$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'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://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
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200683ac_ct_READELF
684READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000685ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200686ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000687AR
688RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000689USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000690GNULD
691LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000696PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BLDLIBRARY
698DLLLIBRARY
699LDLIBRARY
700LIBRARY
701BUILDEXEEXT
702EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200703NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200704MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200705PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200706PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200708ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MAINCC
710CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711GREP
712CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200723_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000724MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000725FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000726FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800727FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000743GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200744PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200745PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700778runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000779localstatedir
780sharedstatedir
781sysconfdir
782datadir
783datarootdir
784libexecdir
785sbindir
786bindir
787program_transform_name
788prefix
789exec_prefix
790PACKAGE_URL
791PACKAGE_BUGREPORT
792PACKAGE_STRING
793PACKAGE_VERSION
794PACKAGE_TARNAME
795PACKAGE_NAME
796PATH_SEPARATOR
797SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000798ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000799ac_user_opts='
800enable_option_checking
801enable_universalsdk
802with_universal_archs
803with_framework_name
804enable_framework
805with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600806with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_cxx_main
808with_suffix
809enable_shared
810enable_profiling
811with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700812with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100813with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100814with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_libs
816with_system_expat
817with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100818with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000819enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700820with_tcltk_includes
821with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_dbmliborder
823with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_threads
825with_thread
826enable_ipv6
827with_doc_strings
828with_tsc
829with_pymalloc
830with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_fpectl
832with_libm
833with_libc
834enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800836with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000837'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 ac_precious_vars='build_alias
839host_alias
840target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100841MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842CC
843CFLAGS
844LDFLAGS
845LIBS
846CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100847CPP
848PKG_CONFIG
849PKG_CONFIG_PATH
850PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854ac_init_help=
855ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000856ac_unrecognized_opts=
857ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# The variables have the same names as the options, with
859# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872x_includes=NONE
873x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700889runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890includedir='${prefix}/include'
891oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893infodir='${datarootdir}/info'
894htmldir='${docdir}'
895dvidir='${docdir}'
896pdfdir='${docdir}'
897psdir='${docdir}'
898libdir='${exec_prefix}/lib'
899localedir='${datarootdir}/locale'
900mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 # If the previous option needs an argument, assign it.
907 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 ac_prev=
910 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200914 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915 *=) ac_optarg= ;;
916 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Accept the important Cygnus configure options, so we can diagnose typos.
920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_dashdash$ac_option in
922 --)
923 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -bindir | --bindir | --bindi | --bind | --bin | --bi)
926 ac_prev=bindir ;;
927 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
930 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 -cache-file | --cache-file | --cache-fil | --cache-fi \
936 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937 ac_prev=cache_file ;;
938 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 cache_file=$ac_optarg ;;
941
942 --config-cache | -C)
943 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951 | --dataroo | --dataro | --datar)
952 ac_prev=datarootdir ;;
953 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955 datarootdir=$ac_optarg ;;
956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200961 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt_orig=$ac_useropt
963 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972
973 -docdir | --docdir | --docdi | --doc | --do)
974 ac_prev=docdir ;;
975 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976 docdir=$ac_optarg ;;
977
978 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979 ac_prev=dvidir ;;
980 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001 | --exec | --exe | --ex)
1002 ac_prev=exec_prefix ;;
1003 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 # Obsolete; use --with-gas.
1010 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 -help | --help | --hel | --he | -h)
1013 ac_init_help=long ;;
1014 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015 ac_init_help=recursive ;;
1016 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025 ac_prev=htmldir ;;
1026 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027 | --ht=*)
1028 htmldir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -includedir | --includedir | --includedi | --included | --include \
1031 | --includ | --inclu | --incl | --inc)
1032 ac_prev=includedir ;;
1033 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -infodir | --infodir | --infodi | --infod | --info | --inf)
1038 ac_prev=infodir ;;
1039 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libdir | --libdir | --libdi | --libd)
1043 ac_prev=libdir ;;
1044 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048 | --libexe | --libex | --libe)
1049 ac_prev=libexecdir ;;
1050 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -localedir | --localedir | --localedi | --localed | --locale)
1055 ac_prev=localedir ;;
1056 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057 localedir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 ac_prev=localstatedir ;;
1062 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067 ac_prev=mandir ;;
1068 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 # Obsolete; use --without-fp.
1073 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 no_create=yes ;;
1078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085 | --oldin | --oldi | --old | --ol | --o)
1086 ac_prev=oldincludedir ;;
1087 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093 ac_prev=prefix ;;
1094 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098 | --program-pre | --program-pr | --program-p)
1099 ac_prev=program_prefix ;;
1100 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105 | --program-suf | --program-su | --program-s)
1106 ac_prev=program_suffix ;;
1107 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-transform-name | --program-transform-name \
1112 | --program-transform-nam | --program-transform-na \
1113 | --program-transform-n | --program-transform- \
1114 | --program-transform | --program-transfor \
1115 | --program-transfo | --program-transf \
1116 | --program-trans | --program-tran \
1117 | --progr-tra | --program-tr | --program-t)
1118 ac_prev=program_transform_name ;;
1119 -program-transform-name=* | --program-transform-name=* \
1120 | --program-transform-nam=* | --program-transform-na=* \
1121 | --program-transform-n=* | --program-transform-=* \
1122 | --program-transform=* | --program-transfor=* \
1123 | --program-transfo=* | --program-transf=* \
1124 | --program-trans=* | --program-tran=* \
1125 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001128 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129 ac_prev=pdfdir ;;
1130 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131 pdfdir=$ac_optarg ;;
1132
1133 -psdir | --psdir | --psdi | --psd | --ps)
1134 ac_prev=psdir ;;
1135 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136 psdir=$ac_optarg ;;
1137
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 silent=yes ;;
1141
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001142 -runstatedir | --runstatedir | --runstatedi | --runstated \
1143 | --runstate | --runstat | --runsta | --runst | --runs \
1144 | --run | --ru | --r)
1145 ac_prev=runstatedir ;;
1146 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1147 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1148 | --run=* | --ru=* | --r=*)
1149 runstatedir=$ac_optarg ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001288 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001401\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001441 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001467 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001530 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001624python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
1977# ac_fn_c_find_uintX_t LINENO BITS VAR
1978# ------------------------------------
1979# Finds an unsigned integer type with width BITS, setting cache variable VAR
1980# accordingly.
1981ac_fn_c_find_uintX_t ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1985$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001986if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001987 $as_echo_n "(cached) " >&6
1988else
1989 eval "$3=no"
1990 # Order is important - never check a type that is potentially smaller
1991 # than half of the expected target width.
1992 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1993 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$ac_includes_default
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 case $ac_type in #(
2010 uint$2_t) :
2011 eval "$3=yes" ;; #(
2012 *) :
2013 eval "$3=\$ac_type" ;;
2014esac
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002017 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019else
2020 break
2021fi
2022 done
2023fi
2024eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029} # ac_fn_c_find_uintX_t
2030
2031# ac_fn_c_find_intX_t LINENO BITS VAR
2032# -----------------------------------
2033# Finds a signed integer type with width BITS, setting cache variable VAR
2034# accordingly.
2035ac_fn_c_find_intX_t ()
2036{
2037 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2039$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002040if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002041 $as_echo_n "(cached) " >&6
2042else
2043 eval "$3=no"
2044 # Order is important - never check a type that is potentially smaller
2045 # than half of the expected target width.
2046 for ac_type in int$2_t 'int' 'long int' \
2047 'long long int' 'short int' 'signed char'; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002051 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002052int
2053main ()
2054{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002055static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002056test_array [0] = 0;
2057return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002067 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002068int
2069main ()
2070{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002071static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002072 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081
2082else
2083 case $ac_type in #(
2084 int$2_t) :
2085 eval "$3=yes" ;; #(
2086 *) :
2087 eval "$3=\$ac_type" ;;
2088esac
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002093 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095else
2096 break
2097fi
2098 done
2099fi
2100eval ac_res=\$$3
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2102$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002103 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105} # ac_fn_c_find_intX_t
2106
2107# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2108# --------------------------------------------
2109# Tries to find the compile-time value of EXPR in a program that includes
2110# INCLUDES, setting VAR accordingly. Returns whether the value could be
2111# computed
2112ac_fn_c_compute_int ()
2113{
2114 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2115 if test "$cross_compiling" = yes; then
2116 # Depending upon the size, compute the lo and hi bounds.
2117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120int
2121main ()
2122{
2123static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002124test_array [0] = 0;
2125return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002126
2127 ;
2128 return 0;
2129}
2130_ACEOF
2131if ac_fn_c_try_compile "$LINENO"; then :
2132 ac_lo=0 ac_mid=0
2133 while :; do
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137int
2138main ()
2139{
2140static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002141test_array [0] = 0;
2142return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_compile "$LINENO"; then :
2149 ac_hi=$ac_mid; break
2150else
2151 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2152 if test $ac_lo -le $ac_mid; then
2153 ac_lo= ac_hi=
2154 break
2155 fi
2156 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2157fi
2158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159 done
2160else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164int
2165main ()
2166{
2167static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002168test_array [0] = 0;
2169return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002170
2171 ;
2172 return 0;
2173}
2174_ACEOF
2175if ac_fn_c_try_compile "$LINENO"; then :
2176 ac_hi=-1 ac_mid=-1
2177 while :; do
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180$4
2181int
2182main ()
2183{
2184static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002185test_array [0] = 0;
2186return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002187
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_compile "$LINENO"; then :
2193 ac_lo=$ac_mid; break
2194else
2195 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2196 if test $ac_mid -le $ac_hi; then
2197 ac_lo= ac_hi=
2198 break
2199 fi
2200 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203 done
2204else
2205 ac_lo= ac_hi=
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210# Binary search between lo and hi bounds.
2211while test "x$ac_lo" != "x$ac_hi"; do
2212 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215$4
2216int
2217main ()
2218{
2219static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002220test_array [0] = 0;
2221return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002222
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_compile "$LINENO"; then :
2228 ac_hi=$ac_mid
2229else
2230 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2231fi
2232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233done
2234case $ac_lo in #((
2235?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2236'') ac_retval=1 ;;
2237esac
2238 else
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241$4
2242static long int longval () { return $2; }
2243static unsigned long int ulongval () { return $2; }
2244#include <stdio.h>
2245#include <stdlib.h>
2246int
2247main ()
2248{
2249
2250 FILE *f = fopen ("conftest.val", "w");
2251 if (! f)
2252 return 1;
2253 if (($2) < 0)
2254 {
2255 long int i = longval ();
2256 if (i != ($2))
2257 return 1;
2258 fprintf (f, "%ld", i);
2259 }
2260 else
2261 {
2262 unsigned long int i = ulongval ();
2263 if (i != ($2))
2264 return 1;
2265 fprintf (f, "%lu", i);
2266 }
2267 /* Do not output a trailing newline, as this causes \r\n confusion
2268 on some platforms. */
2269 return ferror (f) || fclose (f) != 0;
2270
2271 ;
2272 return 0;
2273}
2274_ACEOF
2275if ac_fn_c_try_run "$LINENO"; then :
2276 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2277else
2278 ac_retval=1
2279fi
2280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2281 conftest.$ac_objext conftest.beam conftest.$ac_ext
2282rm -f conftest.val
2283
2284 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002285 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002286 as_fn_set_status $ac_retval
2287
2288} # ac_fn_c_compute_int
2289
2290# ac_fn_c_check_func LINENO FUNC VAR
2291# ----------------------------------
2292# Tests whether FUNC exists, setting the cache variable VAR accordingly
2293ac_fn_c_check_func ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2297$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002298if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2304 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2305#define $2 innocuous_$2
2306
2307/* System header to define __stub macros and hopefully few prototypes,
2308 which can conflict with char $2 (); below.
2309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2310 <limits.h> exists even on freestanding compilers. */
2311
2312#ifdef __STDC__
2313# include <limits.h>
2314#else
2315# include <assert.h>
2316#endif
2317
2318#undef $2
2319
2320/* Override any GCC internal prototype to avoid an error.
2321 Use char because int might match the return type of a GCC
2322 builtin and then its argument prototype would still apply. */
2323#ifdef __cplusplus
2324extern "C"
2325#endif
2326char $2 ();
2327/* The GNU C library defines this for functions which it implements
2328 to always fail with ENOSYS. Some functions are actually named
2329 something starting with __ and the normal name is an alias. */
2330#if defined __stub_$2 || defined __stub___$2
2331choke me
2332#endif
2333
2334int
2335main ()
2336{
2337return $2 ();
2338 ;
2339 return 0;
2340}
2341_ACEOF
2342if ac_fn_c_try_link "$LINENO"; then :
2343 eval "$3=yes"
2344else
2345 eval "$3=no"
2346fi
2347rm -f core conftest.err conftest.$ac_objext \
2348 conftest$ac_exeext conftest.$ac_ext
2349fi
2350eval ac_res=\$$3
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002354
2355} # ac_fn_c_check_func
2356
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002357# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2358# ---------------------------------------------
2359# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2360# accordingly.
2361ac_fn_c_check_decl ()
2362{
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 as_decl_name=`echo $2|sed 's/ *(.*//'`
2365 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2367$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2368if eval \${$3+:} false; then :
2369 $as_echo_n "(cached) " >&6
2370else
2371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h. */
2373$4
2374int
2375main ()
2376{
2377#ifndef $as_decl_name
2378#ifdef __cplusplus
2379 (void) $as_decl_use;
2380#else
2381 (void) $as_decl_name;
2382#endif
2383#endif
2384
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389if ac_fn_c_try_compile "$LINENO"; then :
2390 eval "$3=yes"
2391else
2392 eval "$3=no"
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396eval ac_res=\$$3
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2398$as_echo "$ac_res" >&6; }
2399 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2400
2401} # ac_fn_c_check_decl
2402
Matthias Kloseb9621712010-04-24 17:59:49 +00002403# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2404# ----------------------------------------------------
2405# Tries to find if the field MEMBER exists in type AGGR, after including
2406# INCLUDES, setting cache variable VAR accordingly.
2407ac_fn_c_check_member ()
2408{
2409 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2411$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002412if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 $as_echo_n "(cached) " >&6
2414else
2415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h. */
2417$5
2418int
2419main ()
2420{
2421static $2 ac_aggr;
2422if (ac_aggr.$3)
2423return 0;
2424 ;
2425 return 0;
2426}
2427_ACEOF
2428if ac_fn_c_try_compile "$LINENO"; then :
2429 eval "$4=yes"
2430else
2431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h. */
2433$5
2434int
2435main ()
2436{
2437static $2 ac_aggr;
2438if (sizeof ac_aggr.$3)
2439return 0;
2440 ;
2441 return 0;
2442}
2443_ACEOF
2444if ac_fn_c_try_compile "$LINENO"; then :
2445 eval "$4=yes"
2446else
2447 eval "$4=no"
2448fi
2449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453eval ac_res=\$$4
2454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2455$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002456 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002457
2458} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002460This file contains any messages produced by compilers while
2461running configure, to aid debugging if configure makes a mistake.
2462
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002463It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002464generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002465
2466 $ $0 $@
2467
2468_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002470{
2471cat <<_ASUNAME
2472## --------- ##
2473## Platform. ##
2474## --------- ##
2475
2476hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2477uname -m = `(uname -m) 2>/dev/null || echo unknown`
2478uname -r = `(uname -r) 2>/dev/null || echo unknown`
2479uname -s = `(uname -s) 2>/dev/null || echo unknown`
2480uname -v = `(uname -v) 2>/dev/null || echo unknown`
2481
2482/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2483/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2484
2485/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2486/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002489/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2490/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2491/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2492
2493_ASUNAME
2494
2495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2496for as_dir in $PATH
2497do
2498 IFS=$as_save_IFS
2499 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "PATH: $as_dir"
2501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
2504} >&5
2505
2506cat >&5 <<_ACEOF
2507
2508
2509## ----------- ##
2510## Core tests. ##
2511## ----------- ##
2512
2513_ACEOF
2514
2515
2516# Keep a trace of the command line.
2517# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002519# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002520# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002521ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002522ac_configure_args0=
2523ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002524ac_must_keep_next=false
2525for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002526do
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 for ac_arg
2528 do
2529 case $ac_arg in
2530 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2531 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2532 | -silent | --silent | --silen | --sile | --sil)
2533 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 esac
2537 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002542 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 case $ac_arg in
2545 *=* | --config-cache | -C | -disable-* | --disable-* \
2546 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2547 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2548 | -with-* | --with-* | -without-* | --without-* | --x)
2549 case "$ac_configure_args0 " in
2550 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2551 esac
2552 ;;
2553 -* ) ac_must_keep_next=true ;;
2554 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 ;;
2558 esac
2559 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002560done
Matthias Kloseb9621712010-04-24 17:59:49 +00002561{ ac_configure_args0=; unset ac_configure_args0;}
2562{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002563
2564# When interrupted or exit'd, cleanup temporary files, and complete
2565# config.log. We remove comments because anyway the quotes in there
2566# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567# WARNING: Use '\'' to represent an apostrophe within the trap.
2568# 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 +00002569trap 'exit_status=$?
2570 # Save into config.log some information that might help in debugging.
2571 {
2572 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002573
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002575## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 echo
2578 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579(
2580 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2581 eval ac_val=\$$ac_var
2582 case $ac_val in #(
2583 *${as_nl}*)
2584 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2586$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 esac
2588 case $ac_var in #(
2589 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2591 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 esac ;;
2593 esac
2594 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2597 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 "s/'\''/'\''\\\\'\'''\''/g;
2600 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2601 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002602 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002604 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 esac |
2606 sort
2607)
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002609
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002610 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002611## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002613 echo
2614 for ac_var in $ac_subst_vars
2615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_val=\$$ac_var
2617 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002621 done | sort
2622 echo
2623
2624 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002625 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002628 echo
2629 for ac_var in $ac_subst_files
2630 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_val=\$$ac_var
2632 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002636 done | sort
2637 echo
2638 fi
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002641 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002642## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 echo
2647 fi
2648 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 $as_echo "$as_me: caught signal $ac_signal"
2650 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652 rm -f core *.core core.conftest.* &&
2653 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002656for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002658done
2659ac_signal=0
2660
2661# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002663
Matthias Kloseb9621712010-04-24 17:59:49 +00002664$as_echo "/* confdefs.h */" > confdefs.h
2665
Martin v. Löwis11437992002-04-12 09:54:03 +00002666# Predefined preprocessor variables.
2667
2668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_NAME "$PACKAGE_NAME"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_VERSION "$PACKAGE_VERSION"
2678_ACEOF
2679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_STRING "$PACKAGE_STRING"
2682_ACEOF
2683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684cat >>confdefs.h <<_ACEOF
2685#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2686_ACEOF
2687
Matthias Kloseb9621712010-04-24 17:59:49 +00002688cat >>confdefs.h <<_ACEOF
2689#define PACKAGE_URL "$PACKAGE_URL"
2690_ACEOF
2691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692
2693# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002694# Prefer an explicitly selected file to automatically selected ones.
2695ac_site_file1=NONE
2696ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002698 # We do not want a PATH search for config.site.
2699 case $CONFIG_SITE in #((
2700 -*) ac_site_file1=./$CONFIG_SITE;;
2701 */*) ac_site_file1=$CONFIG_SITE;;
2702 *) ac_site_file1=./$CONFIG_SITE;;
2703 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 ac_site_file1=$prefix/share/config.site
2706 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707else
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 ac_site_file1=$ac_default_prefix/share/config.site
2709 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002711for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712do
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 test "x$ac_site_file" = xNONE && continue
2714 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2716$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002718 . "$ac_site_file" \
2719 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2721as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002722See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723 fi
2724done
2725
2726if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 # Some versions of bash will fail to source /dev/null (special files
2728 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2729 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2731$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2734 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 esac
2736 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737else
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2739$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 >$cache_file
2741fi
2742
2743# Check that the precious variables saved in the cache have kept the same
2744# value.
2745ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2748 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002749 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2750 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 case $ac_old_set,$ac_new_set in
2752 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2754$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 +00002755 ac_cache_corrupted=: ;;
2756 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2758$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 ac_cache_corrupted=: ;;
2760 ,);;
2761 *)
2762 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002763 # differences in whitespace do not lead to failure.
2764 ac_old_val_w=`echo x $ac_old_val`
2765 ac_new_val_w=`echo x $ac_new_val`
2766 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2768$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2769 ac_cache_corrupted=:
2770 else
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2772$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2773 eval $ac_var=\$ac_old_val
2774 fi
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2776$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2778$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 fi;;
2780 esac
2781 # Pass precious variables to config.status.
2782 if test "$ac_new_set" = set; then
2783 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002784 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 *) ac_arg=$ac_var=$ac_new_val ;;
2786 esac
2787 case " $ac_configure_args " in
2788 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002789 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 esac
2791 fi
2792done
2793if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002794 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2797$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002798 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002800## -------------------- ##
2801## Main body of script. ##
2802## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002803
Guido van Rossum7f43da71994-08-01 12:15:30 +00002804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809
Guido van Rossum627b2d71993-12-24 10:39:16 +00002810
Michael W. Hudson54241132001-12-07 15:38:26 +00002811
Trent Nelson4d4ec652012-10-16 08:51:24 -04002812
Trent Nelson5595ab52012-10-17 04:47:31 -04002813if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002814 # If we're building out-of-tree, we need to make sure the following
2815 # resources get picked up before their $srcdir counterparts.
2816 # Objects/ -> typeslots.inc
2817 # Include/ -> Python-ast.h, graminit.h
2818 # Python/ -> importlib.h
2819 # (A side effect of this is that these resources will automatically be
2820 # regenerated when building out-of-tree, regardless of whether or not
2821 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2822 # off.)
2823 BASECPPFLAGS="-IObjects -IInclude -IPython"
2824else
2825 BASECPPFLAGS=""
2826fi
2827
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002828
2829
2830
2831
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002832if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002833then
2834# Extract the first word of "hg", so it can be a program name with args.
2835set dummy hg; ac_word=$2
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002838if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002839 $as_echo_n "(cached) " >&6
2840else
2841 if test -n "$HAS_HG"; then
2842 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2843else
2844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2845for as_dir in $PATH
2846do
2847 IFS=$as_save_IFS
2848 test -z "$as_dir" && as_dir=.
2849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002851 ac_cv_prog_HAS_HG="found"
2852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2853 break 2
2854 fi
2855done
2856 done
2857IFS=$as_save_IFS
2858
2859 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2860fi
2861fi
2862HAS_HG=$ac_cv_prog_HAS_HG
2863if test -n "$HAS_HG"; then
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2865$as_echo "$HAS_HG" >&6; }
2866else
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868$as_echo "no" >&6; }
2869fi
2870
2871
2872else
2873HAS_HG=no-repository
2874fi
2875if test $HAS_HG = found
2876then
2877 HGVERSION="hg id -i \$(srcdir)"
2878 HGTAG="hg id -t \$(srcdir)"
2879 HGBRANCH="hg id -b \$(srcdir)"
2880else
2881 HGVERSION=""
2882 HGTAG=""
2883 HGBRANCH=""
2884fi
2885
2886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002888
2889
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002890ac_aux_dir=
2891for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2892 if test -f "$ac_dir/install-sh"; then
2893 ac_aux_dir=$ac_dir
2894 ac_install_sh="$ac_aux_dir/install-sh -c"
2895 break
2896 elif test -f "$ac_dir/install.sh"; then
2897 ac_aux_dir=$ac_dir
2898 ac_install_sh="$ac_aux_dir/install.sh -c"
2899 break
2900 elif test -f "$ac_dir/shtool"; then
2901 ac_aux_dir=$ac_dir
2902 ac_install_sh="$ac_aux_dir/shtool install -c"
2903 break
2904 fi
2905done
2906if test -z "$ac_aux_dir"; then
2907 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2908fi
2909
2910# These three variables are undocumented and unsupported,
2911# and are intended to be withdrawn in a future Autoconf release.
2912# They can cause serious problems if a builder's source tree is in a directory
2913# whose full name contains unusual characters.
2914ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2915ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2916ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2917
2918
2919# Make sure we can run config.sub.
2920$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2921 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2922
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2924$as_echo_n "checking build system type... " >&6; }
2925if ${ac_cv_build+:} false; then :
2926 $as_echo_n "(cached) " >&6
2927else
2928 ac_build_alias=$build_alias
2929test "x$ac_build_alias" = x &&
2930 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2931test "x$ac_build_alias" = x &&
2932 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2933ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2934 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2935
2936fi
2937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2938$as_echo "$ac_cv_build" >&6; }
2939case $ac_cv_build in
2940*-*-*) ;;
2941*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2942esac
2943build=$ac_cv_build
2944ac_save_IFS=$IFS; IFS='-'
2945set x $ac_cv_build
2946shift
2947build_cpu=$1
2948build_vendor=$2
2949shift; shift
2950# Remember, the first character of IFS is used to create $*,
2951# except with old shells:
2952build_os=$*
2953IFS=$ac_save_IFS
2954case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2955
2956
2957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2958$as_echo_n "checking host system type... " >&6; }
2959if ${ac_cv_host+:} false; then :
2960 $as_echo_n "(cached) " >&6
2961else
2962 if test "x$host_alias" = x; then
2963 ac_cv_host=$ac_cv_build
2964else
2965 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2966 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2967fi
2968
2969fi
2970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2971$as_echo "$ac_cv_host" >&6; }
2972case $ac_cv_host in
2973*-*-*) ;;
2974*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2975esac
2976host=$ac_cv_host
2977ac_save_IFS=$IFS; IFS='-'
2978set x $ac_cv_host
2979shift
2980host_cpu=$1
2981host_vendor=$2
2982shift; shift
2983# Remember, the first character of IFS is used to create $*,
2984# except with old shells:
2985host_os=$*
2986IFS=$ac_save_IFS
2987case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2988
2989
2990
doko@python.orga10e4a92013-01-25 18:45:12 +01002991
2992
Ned Deilyfcbc2462014-08-22 13:32:49 -07002993# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2994rm -f pybuilddir.txt
2995
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002996for ac_prog in python$PACKAGE_VERSION python3 python
2997do
2998 # Extract the first word of "$ac_prog", so it can be a program name with args.
2999set dummy $ac_prog; ac_word=$2
3000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3001$as_echo_n "checking for $ac_word... " >&6; }
3002if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
3003 $as_echo_n "(cached) " >&6
3004else
3005 if test -n "$PYTHON_FOR_GEN"; then
3006 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
3007else
3008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3009for as_dir in $PATH
3010do
3011 IFS=$as_save_IFS
3012 test -z "$as_dir" && as_dir=.
3013 for ac_exec_ext in '' $ac_executable_extensions; do
3014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3015 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3017 break 2
3018 fi
3019done
3020 done
3021IFS=$as_save_IFS
3022
3023fi
3024fi
3025PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3026if test -n "$PYTHON_FOR_GEN"; then
3027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3028$as_echo "$PYTHON_FOR_GEN" >&6; }
3029else
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3031$as_echo "no" >&6; }
3032fi
3033
3034
3035 test -n "$PYTHON_FOR_GEN" && break
3036done
3037test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3038
3039if test "$PYTHON_FOR_GEN" = not-found; then
3040 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3041 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3042 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3043fi
3044
3045
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003046if test "$cross_compiling" = yes; then
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3048$as_echo_n "checking for python interpreter for cross build... " >&6; }
3049 if test -z "$PYTHON_FOR_BUILD"; then
3050 for interp in python$PACKAGE_VERSION python3 python; do
3051 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003052 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003053 break
3054 fi
3055 interp=
3056 done
3057 if test x$interp = x; then
3058 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3059 fi
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3061$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003062 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 +02003063 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003064 # Used to comment out stuff for rebuilding generated files
3065 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003066elif test "$cross_compiling" = maybe; then
3067 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003068else
3069 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003070 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003071fi
3072
3073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074
Martin Pantereac67be2016-07-28 01:28:27 +00003075
Benjamin Petersond23f8222009-04-05 19:13:16 +00003076if test "$prefix" != "/"; then
3077 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3078fi
3079
3080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081
3082
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003083# We don't use PACKAGE_ variables, and they cause conflicts
3084# with other autoconf-based packages that include Python.h
3085grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3086rm confdefs.h
3087mv confdefs.h.new confdefs.h
3088
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003089
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003090VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003091
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003092# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003093
3094SOVERSION=1.0
3095
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003096# The later defininition of _XOPEN_SOURCE disables certain features
3097# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3098
Matthias Kloseb9621712010-04-24 17:59:49 +00003099$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003100
3101
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003102# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3103# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3104# them.
3105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003107
3108
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003109# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3110# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3111# them.
3112
Matthias Kloseb9621712010-04-24 17:59:49 +00003113$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003114
3115
Martin v. Löwisd6320502004-08-12 13:45:08 +00003116# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3117# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3118
Matthias Kloseb9621712010-04-24 17:59:49 +00003119$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003120
3121
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3123# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3124# them.
3125
Matthias Kloseb9621712010-04-24 17:59:49 +00003126$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127
3128
3129
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003130define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003131
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003132# Arguments passed to configure.
3133
3134CONFIG_ARGS="$ac_configure_args"
3135
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3137$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141 case $enableval in
3142 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003143 # Locate the best usable SDK, see Mac/README.txt for more
3144 # information
3145 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003146 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003147 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003148 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3149 if test ! -d "${enableval}"
3150 then
3151 enableval=/
3152 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003153 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003154 ;;
3155 esac
3156 case $enableval in
3157 no)
3158 UNIVERSALSDK=
3159 enable_universalsdk=
3160 ;;
3161 *)
3162 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003163 if test ! -d "${UNIVERSALSDK}"
3164 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003165 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003166 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167 ;;
3168 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003170
Thomas Wouters477c8d52006-05-27 19:21:47 +00003171else
3172
3173 UNIVERSALSDK=
3174 enable_universalsdk=
3175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003178if test -n "${UNIVERSALSDK}"
3179then
Matthias Kloseb9621712010-04-24 17:59:49 +00003180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3181$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003182else
Matthias Kloseb9621712010-04-24 17:59:49 +00003183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3184$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003185fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003188
Ned Deily87adb6e2013-10-18 21:09:56 -07003189ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003190
Ned Deilycbfb9a52012-06-23 16:02:19 -07003191# For backward compatibility reasons we prefer to select '32-bit' if available,
3192# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003193UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003194if test "`uname -s`" = "Darwin"
3195then
3196 if test -n "${UNIVERSALSDK}"
3197 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003198 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003199 then
3200 UNIVERSAL_ARCHS="intel"
3201 fi
3202 fi
3203fi
3204
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003205
Matthias Kloseb9621712010-04-24 17:59:49 +00003206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3207$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003208
3209# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003210if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212 UNIVERSAL_ARCHS="$withval"
3213
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214fi
3215
Ned Deily87adb6e2013-10-18 21:09:56 -07003216if test -n "${UNIVERSALSDK}"
3217then
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3219$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3220else
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3222$as_echo "no" >&6; }
3223fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
3226# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003227if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 withval=$with_framework_name;
3229 PYTHONFRAMEWORK=${withval}
3230 PYTHONFRAMEWORKDIR=${withval}.framework
3231 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3232
3233else
3234
3235 PYTHONFRAMEWORK=Python
3236 PYTHONFRAMEWORKDIR=Python.framework
3237 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3238
3239fi
3240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003242if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003244 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003245 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003246 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003247 esac
3248 case $enableval in
3249 no)
3250 PYTHONFRAMEWORK=
3251 PYTHONFRAMEWORKDIR=no-framework
3252 PYTHONFRAMEWORKPREFIX=
3253 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254 FRAMEWORKINSTALLFIRST=
3255 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003256 FRAMEWORKALTINSTALLFIRST=
3257 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003258 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259 if test "x${prefix}" = "xNONE"; then
3260 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3261 else
3262 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3263 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003265 ;;
3266 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003267 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003268 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003270 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003271 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3272 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003273 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003274 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003275
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003276 if test "x${prefix}" = "xNONE" ; then
3277 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003278
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003279 else
3280 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3281 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003282
3283 case "${enableval}" in
3284 /System*)
3285 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3286 if test "${prefix}" = "NONE" ; then
3287 # See below
3288 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3289 fi
3290 ;;
3291
3292 /Library*)
3293 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3294 ;;
3295
3296 */Library/Frameworks)
3297 MDIR="`dirname "${enableval}"`"
3298 MDIR="`dirname "${MDIR}"`"
3299 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3300
3301 if test "${prefix}" = "NONE"; then
3302 # User hasn't specified the
3303 # --prefix option, but wants to install
3304 # the framework in a non-default location,
3305 # ensure that the compatibility links get
3306 # installed relative to that prefix as well
3307 # instead of in /usr/local.
3308 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3309 fi
3310 ;;
3311
3312 *)
3313 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3314 ;;
3315 esac
3316
Jack Jansen127e56e2001-09-11 14:41:54 +00003317 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003318
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003319 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003320 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003324
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003325 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3326
3327 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3328
Jack Jansene578a632001-08-15 01:27:14 +00003329 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003330
Guido van Rossum563e7081996-09-10 18:20:48 +00003331else
Martin v. Löwis11437992002-04-12 09:54:03 +00003332
Jack Jansene578a632001-08-15 01:27:14 +00003333 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003334 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003335 PYTHONFRAMEWORKPREFIX=
3336 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003337 FRAMEWORKINSTALLFIRST=
3338 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003339 FRAMEWORKALTINSTALLFIRST=
3340 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003341 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003342 if test "x${prefix}" = "xNONE" ; then
3343 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3344 else
3345 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3346 fi
Jack Jansene578a632001-08-15 01:27:14 +00003347 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003350fi
3351
Thomas Wouters477c8d52006-05-27 19:21:47 +00003352
3353
Michael W. Hudson54241132001-12-07 15:38:26 +00003354
3355
3356
3357
Jack Jansene578a632001-08-15 01:27:14 +00003358
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003359
3360
3361
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003362
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003363
Ned Deilyb8f944f2013-11-21 22:42:25 -08003364
Jack Jansene578a632001-08-15 01:27:14 +00003365##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003366## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003367## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003368##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003369# Set name for machine-dependent library files
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3372$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003373if test -z "$MACHDEP"
3374then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003375 # avoid using uname for cross builds
3376 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003377 # ac_sys_system and ac_sys_release are used for setting
3378 # a lot of different things including 'define_xopen_source'
3379 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003380 case "$host" in
3381 *-*-linux*)
3382 ac_sys_system=Linux
3383 ;;
3384 *-*-cygwin*)
3385 ac_sys_system=Cygwin
3386 ;;
3387 *)
3388 # for now, limit cross builds to known configurations
3389 MACHDEP="unknown"
3390 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3391 esac
3392 ac_sys_release=
3393 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003394 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003395 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003396 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003397 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003398 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003399 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003400 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003401 fi
3402 ac_md_system=`echo $ac_sys_system |
3403 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3404 ac_md_release=`echo $ac_sys_release |
3405 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3406 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003407
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003408 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003409 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003410 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003411 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003412 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003413 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003414 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003415fi
Guido van Rossum91922671997-10-09 20:24:13 +00003416
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003417
3418if test "$cross_compiling" = yes; then
3419 case "$host" in
3420 *-*-linux*)
3421 case "$host_cpu" in
3422 arm*)
3423 _host_cpu=arm
3424 ;;
3425 *)
3426 _host_cpu=$host_cpu
3427 esac
3428 ;;
3429 *-*-cygwin*)
3430 _host_cpu=
3431 ;;
3432 *)
3433 # for now, limit cross builds to known configurations
3434 MACHDEP="unknown"
3435 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3436 esac
3437 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3438fi
3439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3441# disable features if it is defined, without any means to access these
3442# features as extensions. For these systems, we skip the definition of
3443# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3444# some feature, make sure there is no alternative way to access this
3445# feature. Also, when using wildcards, make sure you have verified the
3446# need for not defining _XOPEN_SOURCE on all systems matching the
3447# wildcard, and that the wildcard does not include future systems
3448# (which may remove their limitations).
3449case $ac_sys_system/$ac_sys_release in
3450 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3451 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003452 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003453 # In addition, Stefan Krah confirms that issue #1244610 exists through
3454 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003455 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003456 define_xopen_source=no
3457 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3458 # also defined. This can be overridden by defining _BSD_SOURCE
3459 # As this has a different meaning on Linux, only define it on OpenBSD
3460
Matthias Kloseb9621712010-04-24 17:59:49 +00003461$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003462
3463 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003464 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003465 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3466 # also defined. This can be overridden by defining _BSD_SOURCE
3467 # As this has a different meaning on Linux, only define it on OpenBSD
3468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003470
3471 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003472 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3473 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3474 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003475 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 +00003476 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003477 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3478 # request to enable features supported by the standard as a request
3479 # to disable features not supported by the standard. The best way
3480 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3481 # entirely and define __EXTENSIONS__ instead.
3482 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003483 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003484 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3485 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003486 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003487 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003488 define_xopen_source=no;;
3489 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003490 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003491 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003492 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003493 # On FreeBSD 4, the math functions C89 does not cover are never defined
3494 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3495 FreeBSD/4.*)
3496 define_xopen_source=no;;
3497 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3498 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3499 # identifies itself as Darwin/7.*
3500 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3501 # disables platform specific features beyond repair.
3502 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3503 # has no effect, don't bother defining them
3504 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003505 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003506 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003507 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003508 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3509 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3510 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003511 AIX/4)
3512 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003513 AIX/5)
3514 if test `uname -r` -eq 1; then
3515 define_xopen_source=no
3516 fi
3517 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003518 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3519 # defining NI_NUMERICHOST.
3520 QNX/6.3.2)
3521 define_xopen_source=no
3522 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003523
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003524esac
3525
3526if test $define_xopen_source = yes
3527then
Victor Stinner14d098d2011-09-07 22:29:43 +02003528 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003529
Victor Stinner14d098d2011-09-07 22:29:43 +02003530$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003531
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003532
3533 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3534 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3535 # several APIs are not declared. Since this is also needed in some
3536 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003537
Matthias Kloseb9621712010-04-24 17:59:49 +00003538$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003539
3540
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003541
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003542$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003543
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003544fi
3545
Christian Heimes647cd872013-12-07 23:39:33 +01003546# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3547case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003548 hp*|HP*)
3549 define_stdc_a1=yes;;
3550 *)
3551 define_stdc_a1=no;;
3552esac
3553
3554if test $define_stdc_a1 = yes
3555then
Christian Heimes647cd872013-12-07 23:39:33 +01003556
3557$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3558
Christian Heimesb02bcae2013-12-08 15:21:08 +01003559fi
Christian Heimes647cd872013-12-07 23:39:33 +01003560
Guido van Rossum91922671997-10-09 20:24:13 +00003561#
3562# SGI compilers allow the specification of the both the ABI and the
3563# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003564# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003565#
3566# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3567# thus supply support for various ABI/ISA combinations. The MACHDEP
3568# variable is also adjusted.
3569#
3570
3571if test ! -z "$SGI_ABI"
3572then
3573 CC="cc $SGI_ABI"
3574 LDFLAGS="$SGI_ABI $LDFLAGS"
3575 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3578$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003579
Jack Jansen6b08a402004-06-03 12:41:45 +00003580# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3581# it may influence the way we can build extensions, so distutils
3582# needs to check it
3583
Thomas Wouters477c8d52006-05-27 19:21:47 +00003584
Jack Jansen6b08a402004-06-03 12:41:45 +00003585CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003586EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003587
Guido van Rossum627b2d71993-12-24 10:39:16 +00003588# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003589
3590# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3591# for debug/optimization stuff. BASECFLAGS is for flags that are required
3592# just to get things to compile and link. Users are free to override OPT
3593# when running configure or make. The build should not break if they do.
3594# BASECFLAGS should generally not be messed with, however.
3595
3596# XXX shouldn't some/most/all of this code be merged with the stuff later
3597# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3599$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003602if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003604 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003605 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003606 without_gcc=yes;;
3607 yes) CC=gcc
3608 without_gcc=no;;
3609 *) CC=$withval
3610 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003611 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003612else
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003614 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003615 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003616 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003617 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003618 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619fi
3620
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3622$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003623
Zachary Ware5af85642015-12-21 12:09:17 -06003624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3625$as_echo_n "checking for --with-icc... " >&6; }
3626
3627# Check whether --with-icc was given.
3628if test "${with_icc+set}" = set; then :
3629 withval=$with_icc;
3630 case $withval in
3631 no) CC=${CC:-cc}
3632 with_icc=no;;
3633 yes) CC=icc
3634 CXX=icpc
3635 with_icc=yes;;
3636 *) CC=$withval
3637 with_icc=$withval;;
3638 esac
3639else
3640
3641 with_icc=no
3642fi
3643
3644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3645$as_echo "$with_icc" >&6; }
3646
Guido van Rossum8b131c51995-03-09 14:10:13 +00003647# If the user switches compilers, we can't believe the cache
3648if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3649then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003650 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003651(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003652fi
3653
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003654# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3655# when the compiler supports them, but we don't always want -O2, and
3656# we set -g later.
3657if test -z "$CFLAGS"; then
3658 CFLAGS=
3659fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003660
3661if test "$ac_sys_system" = "Darwin"
3662then
3663 # Compiler selection on MacOSX is more complicated than
3664 # AC_PROG_CC can handle, see Mac/README.txt for more
3665 # information
3666 if test -z "${CC}"
3667 then
3668 found_gcc=
3669 found_clang=
3670 as_save_IFS=$IFS; IFS=:
3671 for as_dir in $PATH
3672 do
3673 IFS=$as_save_IFS
3674 if test -x $as_dir/gcc; then
3675 if test -z "${found_gcc}"; then
3676 found_gcc=$as_dir/gcc
3677 fi
3678 fi
3679 if test -x $as_dir/clang; then
3680 if test -z "${found_clang}"; then
3681 found_clang=$as_dir/clang
3682 fi
3683 fi
3684 done
3685 IFS=$as_save_IFS
3686
3687 if test -n "$found_gcc" -a -n "$found_clang"
3688 then
3689 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3690 then
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3692$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3693 CC="$found_clang"
3694 CXX="$found_clang++"
3695 fi
3696
3697
3698 elif test -z "$found_gcc" -a -n "$found_clang"
3699 then
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3701$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3702 CC="$found_clang"
3703 CXX="$found_clang++"
3704
3705 elif test -z "$found_gcc" -a -z "$found_clang"
3706 then
3707 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3708 if test -n "${found_clang}"
3709 then
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3711$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3712 CC="${found_clang}"
3713 CXX="`/usr/bin/xcrun -find clang++`"
3714
3715 # else: use default behaviour
3716 fi
3717 fi
3718 fi
3719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720ac_ext=c
3721ac_cpp='$CPP $CPPFLAGS'
3722ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3723ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3724ac_compiler_gnu=$ac_cv_c_compiler_gnu
3725if test -n "$ac_tool_prefix"; then
3726 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3727set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $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 +00003745 break 2
3746 fi
3747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Jack Jansendd19cf82001-12-06 22:36:17 +00003751fi
3752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
3764if test -z "$ac_cv_prog_CC"; then
3765 ac_ct_CC=$CC
3766 # Extract the first word of "gcc", so it can be a program name with args.
3767set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003770if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003772else
3773 if test -n "$ac_ct_CC"; then
3774 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3775else
3776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3777for as_dir in $PATH
3778do
3779 IFS=$as_save_IFS
3780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 $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 +00003785 break 2
3786 fi
3787done
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003790
3791fi
3792fi
3793ac_ct_CC=$ac_cv_prog_ac_ct_CC
3794if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3796$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 if test "x$ac_ct_CC" = x; then
3803 CC=""
3804 else
3805 case $cross_compiling:$ac_tool_warned in
3806yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809ac_tool_warned=yes ;;
3810esac
3811 CC=$ac_ct_CC
3812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
3814 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Jack Jansendd19cf82001-12-06 22:36:17 +00003817if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 if test -n "$ac_tool_prefix"; then
3819 # 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 +00003820set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003823if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003825else
3826 if test -n "$CC"; then
3827 ac_cv_prog_CC="$CC" # Let the user override the test.
3828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 break 2
3839 fi
3840done
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
3844fi
3845fi
3846CC=$ac_cv_prog_CC
3847if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3849$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853fi
3854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858if test -z "$CC"; then
3859 # Extract the first word of "cc", so it can be a program name with args.
3860set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003863if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
3866 if test -n "$CC"; then
3867 ac_cv_prog_CC="$CC" # Let the user override the test.
3868else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003869 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871for as_dir in $PATH
3872do
3873 IFS=$as_save_IFS
3874 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3878 ac_prog_rejected=yes
3879 continue
3880 fi
3881 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 $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 +00003883 break 2
3884 fi
3885done
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003889if test $ac_prog_rejected = yes; then
3890 # We found a bogon in the path, so make sure we never use it.
3891 set dummy $ac_cv_prog_CC
3892 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003893 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003894 # We chose a different compiler from the bogus one.
3895 # However, it has the same basename, so the bogon will be chosen
3896 # first if we set CC to just the basename; use the full file name.
3897 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003898 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003899 fi
3900fi
3901fi
3902fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003904if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3906$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003907else
Matthias Kloseb9621712010-04-24 17:59:49 +00003908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3909$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003910fi
3911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913fi
3914if test -z "$CC"; then
3915 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 do
3918 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3921$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003922if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924else
3925 if test -n "$CC"; then
3926 ac_cv_prog_CC="$CC" # Let the user override the test.
3927else
Martin v. Löwis11437992002-04-12 09:54:03 +00003928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3929for as_dir in $PATH
3930do
3931 IFS=$as_save_IFS
3932 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 $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 +00003937 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003938 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003939done
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003942
3943fi
3944fi
3945CC=$ac_cv_prog_CC
3946if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3948$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003949else
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3951$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003952fi
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 test -n "$CC" && break
3956 done
3957fi
3958if test -z "$CC"; then
3959 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003961do
3962 # Extract the first word of "$ac_prog", so it can be a program name with args.
3963set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3965$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003966if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003968else
3969 if test -n "$ac_ct_CC"; then
3970 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3971else
3972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973for as_dir in $PATH
3974do
3975 IFS=$as_save_IFS
3976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 $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 +00003981 break 2
3982 fi
3983done
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987fi
3988fi
3989ac_ct_CC=$ac_cv_prog_ac_ct_CC
3990if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3992$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003993else
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003996fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 test -n "$ac_ct_CC" && break
4000done
Michael W. Hudson54241132001-12-07 15:38:26 +00004001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002 if test "x$ac_ct_CC" = x; then
4003 CC=""
4004 else
4005 case $cross_compiling:$ac_tool_warned in
4006yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009ac_tool_warned=yes ;;
4010esac
4011 CC=$ac_ct_CC
4012 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004013fi
4014
4015fi
4016
4017
Matthias Kloseb9621712010-04-24 17:59:49 +00004018test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004021See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004022
4023# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004024$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4025set X $ac_compile
4026ac_compiler=$2
4027for ac_option in --version -v -V -qversion; do
4028 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004029case "(($ac_try" in
4030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031 *) ac_try_echo=$ac_try;;
4032esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4034$as_echo "$ac_try_echo"; } >&5
4035 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004036 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 if test -s conftest.err; then
4038 sed '10a\
4039... rest of stderr output deleted ...
4040 10q' conftest.err >conftest.er1
4041 cat conftest.er1 >&5
4042 fi
4043 rm -f conftest.er1 conftest.err
4044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045 test $ac_status = 0; }
4046done
Martin v. Löwis11437992002-04-12 09:54:03 +00004047
Matthias Kloseb9621712010-04-24 17:59:49 +00004048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004049/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004050
Martin v. Löwis11437992002-04-12 09:54:03 +00004051int
4052main ()
4053{
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
4059ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004060ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004061# Try to create an executable without -o first, disregard a.out.
4062# It will help us diagnose broken compilers, and finding out an intuition
4063# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4065$as_echo_n "checking whether the C compiler works... " >&6; }
4066ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4067
4068# The possible output files:
4069ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071ac_rmfiles=
4072for ac_file in $ac_files
4073do
4074 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4077 esac
4078done
4079rm -f $ac_rmfiles
4080
Matthias Kloseb9621712010-04-24 17:59:49 +00004081if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4093# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4094# in a Makefile. We should not override ac_cv_exeext if it was cached,
4095# so that the user can short-circuit this test for compilers unknown to
4096# Autoconf.
4097for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004098do
4099 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004102 ;;
4103 [ab].out )
4104 # We found the default executable, but exeext='' is most
4105 # certainly right.
4106 break;;
4107 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 then :; else
4110 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4111 fi
4112 # We set ac_cv_exeext here because the later test for it is not
4113 # safe: cross compilers may not add the suffix if given an `-o'
4114 # argument, so we may need to know it at that point already.
4115 # Even if this section looks crufty: it has the advantage of
4116 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004117 break;;
4118 * )
4119 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 esac
4121done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122test "$ac_cv_exeext" = no && ac_cv_exeext=
4123
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004124else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 ac_file=''
4126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if test -z "$ac_file"; then :
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129$as_echo "no" >&6; }
4130$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004131sed 's/^/| /' conftest.$ac_ext >&5
4132
Matthias Kloseb9621712010-04-24 17:59:49 +00004133{ { $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 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004136See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004137else
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4139$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4142$as_echo_n "checking for C compiler default output file name... " >&6; }
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4144$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004145ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146
Matthias Kloseb9621712010-04-24 17:59:49 +00004147rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004148ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4150$as_echo_n "checking for suffix of executables... " >&6; }
4151if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4163# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4164# work properly (i.e., refer to `conftest.exe'), while it won't with
4165# `rm'.
4166for ac_file in conftest.exe conftest conftest.*; do
4167 test -f "$ac_file" || continue
4168 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004170 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4171 break;;
4172 * ) break;;
4173 esac
4174done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175else
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004178as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004179See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004181rm -f conftest conftest$ac_cv_exeext
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4183$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004184
4185rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186EXEEXT=$ac_cv_exeext
4187ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4189/* end confdefs.h. */
4190#include <stdio.h>
4191int
4192main ()
4193{
4194FILE *f = fopen ("conftest.out", "w");
4195 return ferror (f) || fclose (f) != 0;
4196
4197 ;
4198 return 0;
4199}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201ac_clean_files="$ac_clean_files conftest.out"
4202# Check that the compiler produces executables we can run. If not, either
4203# the compiler is broken, or we cross compile.
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4205$as_echo_n "checking whether we are cross compiling... " >&6; }
4206if test "$cross_compiling" != yes; then
4207 { { ac_try="$ac_link"
4208case "(($ac_try" in
4209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4210 *) ac_try_echo=$ac_try;;
4211esac
4212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4213$as_echo "$ac_try_echo"; } >&5
4214 (eval "$ac_link") 2>&5
4215 ac_status=$?
4216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4217 test $ac_status = 0; }
4218 if { ac_try='./conftest$ac_cv_exeext'
4219 { { case "(($ac_try" in
4220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4221 *) ac_try_echo=$ac_try;;
4222esac
4223eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4224$as_echo "$ac_try_echo"; } >&5
4225 (eval "$ac_try") 2>&5
4226 ac_status=$?
4227 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4228 test $ac_status = 0; }; }; then
4229 cross_compiling=no
4230 else
4231 if test "$cross_compiling" = maybe; then
4232 cross_compiling=yes
4233 else
4234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004236as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004238See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 fi
4240 fi
4241fi
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4243$as_echo "$cross_compiling" >&6; }
4244
4245rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4246ac_clean_files=$ac_clean_files_save
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4248$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
4251else
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004253/* end confdefs.h. */
4254
4255int
4256main ()
4257{
4258
4259 ;
4260 return 0;
4261}
4262_ACEOF
4263rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265case "(($ac_try" in
4266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4267 *) ac_try_echo=$ac_try;;
4268esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4270$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4274 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 for ac_file in conftest.o conftest.obj conftest.*; do
4276 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4280 break;;
4281 esac
4282done
4283else
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004285sed 's/^/| /' conftest.$ac_ext >&5
4286
Matthias Kloseb9621712010-04-24 17:59:49 +00004287{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004289as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004290See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004291fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004292rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4295$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004296OBJEXT=$ac_cv_objext
4297ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4299$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004300if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004302else
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004305
Martin v. Löwis11437992002-04-12 09:54:03 +00004306int
4307main ()
4308{
4309#ifndef __GNUC__
4310 choke me
4311#endif
4312
4313 ;
4314 return 0;
4315}
4316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 ac_compiler_gnu=yes
4319else
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004323ac_cv_c_compiler_gnu=$ac_compiler_gnu
4324
4325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4327$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4328if test $ac_compiler_gnu = yes; then
4329 GCC=yes
4330else
4331 GCC=
4332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004333ac_test_CFLAGS=${CFLAGS+set}
4334ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4336$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004337if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004339else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 ac_save_c_werror_flag=$ac_c_werror_flag
4341 ac_c_werror_flag=yes
4342 ac_cv_prog_cc_g=no
4343 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
Martin v. Löwis11437992002-04-12 09:54:03 +00004347int
4348main ()
4349{
4350
4351 ;
4352 return 0;
4353}
4354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004355if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004356 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357else
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 CFLAGS=""
4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360/* end confdefs.h. */
4361
4362int
4363main ()
4364{
4365
4366 ;
4367 return 0;
4368}
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372else
4373 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376/* end confdefs.h. */
4377
4378int
4379main ()
4380{
4381
4382 ;
4383 return 0;
4384}
4385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004386if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4394 ac_c_werror_flag=$ac_save_c_werror_flag
4395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4397$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004398if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004400elif test $ac_cv_prog_cc_g = yes; then
4401 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004402 CFLAGS="-g -O2"
4403 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004404 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405 fi
4406else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004407 if test "$GCC" = yes; then
4408 CFLAGS="-O2"
4409 else
4410 CFLAGS=
4411 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4414$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004415if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004416 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004417else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004419ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004421/* end confdefs.h. */
4422#include <stdarg.h>
4423#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004424struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004425/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4426struct buf { int x; };
4427FILE * (*rcsopen) (struct buf *, struct stat *, int);
4428static char *e (p, i)
4429 char **p;
4430 int i;
4431{
4432 return p[i];
4433}
4434static char *f (char * (*g) (char **, int), char **p, ...)
4435{
4436 char *s;
4437 va_list v;
4438 va_start (v,p);
4439 s = g (p, va_arg (v,int));
4440 va_end (v);
4441 return s;
4442}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004443
4444/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4445 function prototypes and stuff, but not '\xHH' hex character constants.
4446 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004448 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4449 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004451int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004453/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4454 inside strings and character constants. */
4455#define FOO(x) 'x'
4456int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4457
Skip Montanaro6dead952003-09-25 14:50:04 +00004458int test (int i, double x);
4459struct s1 {int (*f) (int a);};
4460struct s2 {int (*f) (double a);};
4461int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4462int argc;
4463char **argv;
4464int
4465main ()
4466{
4467return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4468 ;
4469 return 0;
4470}
4471_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4473 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004474do
4475 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004477 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479rm -f core conftest.err conftest.$ac_objext
4480 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004481done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004483CC=$ac_save_CC
4484
4485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004486# AC_CACHE_VAL
4487case "x$ac_cv_prog_cc_c89" in
4488 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4490$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4493$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004494 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004495 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4497$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004498esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004499if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004500
Matthias Kloseb9621712010-04-24 17:59:49 +00004501fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004502
Martin v. Löwis11437992002-04-12 09:54:03 +00004503ac_ext=c
4504ac_cpp='$CPP $CPPFLAGS'
4505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4507ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004509ac_ext=c
4510ac_cpp='$CPP $CPPFLAGS'
4511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4513ac_compiler_gnu=$ac_cv_c_compiler_gnu
4514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4515$as_echo_n "checking how to run the C preprocessor... " >&6; }
4516# On Suns, sometimes $CPP names a directory.
4517if test -n "$CPP" && test -d "$CPP"; then
4518 CPP=
4519fi
4520if test -z "$CPP"; then
4521 if ${ac_cv_prog_CPP+:} false; then :
4522 $as_echo_n "(cached) " >&6
4523else
4524 # Double quotes because CPP needs to be expanded
4525 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4526 do
4527 ac_preproc_ok=false
4528for ac_c_preproc_warn_flag in '' yes
4529do
4530 # Use a header file that comes with gcc, so configuring glibc
4531 # with a fresh cross-compiler works.
4532 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4533 # <limits.h> exists even on freestanding compilers.
4534 # On the NeXT, cc -E runs the code through the compiler's parser,
4535 # not just through cpp. "Syntax error" is here to catch this case.
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537/* end confdefs.h. */
4538#ifdef __STDC__
4539# include <limits.h>
4540#else
4541# include <assert.h>
4542#endif
4543 Syntax error
4544_ACEOF
4545if ac_fn_c_try_cpp "$LINENO"; then :
4546
4547else
4548 # Broken: fails on valid input.
4549continue
4550fi
4551rm -f conftest.err conftest.i conftest.$ac_ext
4552
4553 # OK, works on sane cases. Now check whether nonexistent headers
4554 # can be detected and how.
4555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4556/* end confdefs.h. */
4557#include <ac_nonexistent.h>
4558_ACEOF
4559if ac_fn_c_try_cpp "$LINENO"; then :
4560 # Broken: success on invalid input.
4561continue
4562else
4563 # Passes both tests.
4564ac_preproc_ok=:
4565break
4566fi
4567rm -f conftest.err conftest.i conftest.$ac_ext
4568
4569done
4570# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4571rm -f conftest.i conftest.err conftest.$ac_ext
4572if $ac_preproc_ok; then :
4573 break
4574fi
4575
4576 done
4577 ac_cv_prog_CPP=$CPP
4578
4579fi
4580 CPP=$ac_cv_prog_CPP
4581else
4582 ac_cv_prog_CPP=$CPP
4583fi
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4585$as_echo "$CPP" >&6; }
4586ac_preproc_ok=false
4587for ac_c_preproc_warn_flag in '' yes
4588do
4589 # Use a header file that comes with gcc, so configuring glibc
4590 # with a fresh cross-compiler works.
4591 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4592 # <limits.h> exists even on freestanding compilers.
4593 # On the NeXT, cc -E runs the code through the compiler's parser,
4594 # not just through cpp. "Syntax error" is here to catch this case.
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#ifdef __STDC__
4598# include <limits.h>
4599#else
4600# include <assert.h>
4601#endif
4602 Syntax error
4603_ACEOF
4604if ac_fn_c_try_cpp "$LINENO"; then :
4605
4606else
4607 # Broken: fails on valid input.
4608continue
4609fi
4610rm -f conftest.err conftest.i conftest.$ac_ext
4611
4612 # OK, works on sane cases. Now check whether nonexistent headers
4613 # can be detected and how.
4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h. */
4616#include <ac_nonexistent.h>
4617_ACEOF
4618if ac_fn_c_try_cpp "$LINENO"; then :
4619 # Broken: success on invalid input.
4620continue
4621else
4622 # Passes both tests.
4623ac_preproc_ok=:
4624break
4625fi
4626rm -f conftest.err conftest.i conftest.$ac_ext
4627
4628done
4629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4630rm -f conftest.i conftest.err conftest.$ac_ext
4631if $ac_preproc_ok; then :
4632
4633else
4634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4636as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4637See \`config.log' for more details" "$LINENO" 5; }
4638fi
4639
4640ac_ext=c
4641ac_cpp='$CPP $CPPFLAGS'
4642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4644ac_compiler_gnu=$ac_cv_c_compiler_gnu
4645
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4647$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4648if ${ac_cv_path_GREP+:} false; then :
4649 $as_echo_n "(cached) " >&6
4650else
4651 if test -z "$GREP"; then
4652 ac_path_GREP_found=false
4653 # Loop through the user's path and test for each of PROGNAME-LIST
4654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4656do
4657 IFS=$as_save_IFS
4658 test -z "$as_dir" && as_dir=.
4659 for ac_prog in grep ggrep; do
4660 for ac_exec_ext in '' $ac_executable_extensions; do
4661 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4662 as_fn_executable_p "$ac_path_GREP" || continue
4663# Check for GNU ac_path_GREP and select it if it is found.
4664 # Check for GNU $ac_path_GREP
4665case `"$ac_path_GREP" --version 2>&1` in
4666*GNU*)
4667 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4668*)
4669 ac_count=0
4670 $as_echo_n 0123456789 >"conftest.in"
4671 while :
4672 do
4673 cat "conftest.in" "conftest.in" >"conftest.tmp"
4674 mv "conftest.tmp" "conftest.in"
4675 cp "conftest.in" "conftest.nl"
4676 $as_echo 'GREP' >> "conftest.nl"
4677 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4678 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4679 as_fn_arith $ac_count + 1 && ac_count=$as_val
4680 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4681 # Best one so far, save it but keep looking for a better one
4682 ac_cv_path_GREP="$ac_path_GREP"
4683 ac_path_GREP_max=$ac_count
4684 fi
4685 # 10*(2^10) chars as input seems more than enough
4686 test $ac_count -gt 10 && break
4687 done
4688 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4689esac
4690
4691 $ac_path_GREP_found && break 3
4692 done
4693 done
4694 done
4695IFS=$as_save_IFS
4696 if test -z "$ac_cv_path_GREP"; then
4697 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4698 fi
4699else
4700 ac_cv_path_GREP=$GREP
4701fi
4702
4703fi
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4705$as_echo "$ac_cv_path_GREP" >&6; }
4706 GREP="$ac_cv_path_GREP"
4707
4708
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004709
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710
4711
Matthias Kloseb9621712010-04-24 17:59:49 +00004712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4713$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004715# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004716if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004717 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718
4719 case $withval in
4720 no) with_cxx_main=no
4721 MAINCC='$(CC)';;
4722 yes) with_cxx_main=yes
4723 MAINCC='$(CXX)';;
4724 *) with_cxx_main=yes
4725 MAINCC=$withval
4726 if test -z "$CXX"
4727 then
4728 CXX=$withval
4729 fi;;
4730 esac
4731else
4732
4733 with_cxx_main=no
4734 MAINCC='$(CC)'
4735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004736fi
4737
Matthias Kloseb9621712010-04-24 17:59:49 +00004738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4739$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740
4741preset_cxx="$CXX"
4742if test -z "$CXX"
4743then
4744 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745 gcc) if test -n "$ac_tool_prefix"; then
4746 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4747set dummy ${ac_tool_prefix}g++; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
4750if ${ac_cv_path_CXX+:} false; then :
4751 $as_echo_n "(cached) " >&6
4752else
4753 case $CXX in
4754 [\\/]* | ?:[\\/]*)
4755 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4756 ;;
4757 *)
4758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4759for as_dir in notfound
4760do
4761 IFS=$as_save_IFS
4762 test -z "$as_dir" && as_dir=.
4763 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4767 break 2
4768 fi
4769done
4770 done
4771IFS=$as_save_IFS
4772
4773 ;;
4774esac
4775fi
4776CXX=$ac_cv_path_CXX
4777if test -n "$CXX"; then
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4779$as_echo "$CXX" >&6; }
4780else
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
4783fi
4784
4785
4786fi
4787if test -z "$ac_cv_path_CXX"; then
4788 ac_pt_CXX=$CXX
4789 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4792$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793if ${ac_cv_path_ac_pt_CXX+:} false; then :
4794 $as_echo_n "(cached) " >&6
4795else
4796 case $ac_pt_CXX in
4797 [\\/]* | ?:[\\/]*)
4798 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4799 ;;
4800 *)
4801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in notfound
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
4806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810 break 2
4811 fi
4812done
4813 done
4814IFS=$as_save_IFS
4815
4816 ;;
4817esac
4818fi
4819ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4820if test -n "$ac_pt_CXX"; then
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4822$as_echo "$ac_pt_CXX" >&6; }
4823else
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4825$as_echo "no" >&6; }
4826fi
4827
4828 if test "x$ac_pt_CXX" = x; then
4829 CXX="g++"
4830 else
4831 case $cross_compiling:$ac_tool_warned in
4832yes:)
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4835ac_tool_warned=yes ;;
4836esac
4837 CXX=$ac_pt_CXX
4838 fi
4839else
4840 CXX="$ac_cv_path_CXX"
4841fi
4842 ;;
4843 cc) if test -n "$ac_tool_prefix"; then
4844 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4845set dummy ${ac_tool_prefix}c++; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004848if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850else
4851 case $CXX in
4852 [\\/]* | ?:[\\/]*)
4853 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4854 ;;
4855 *)
4856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in notfound
4858do
4859 IFS=$as_save_IFS
4860 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865 break 2
4866 fi
4867done
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004869IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004870
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004871 ;;
4872esac
4873fi
4874CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004875if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4877$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004878else
Matthias Kloseb9621712010-04-24 17:59:49 +00004879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004882
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004883
4884fi
4885if test -z "$ac_cv_path_CXX"; then
4886 ac_pt_CXX=$CXX
4887 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004888set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004891if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004893else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004895 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004896 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 +00004897 ;;
4898 *)
4899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900for as_dir in notfound
4901do
4902 IFS=$as_save_IFS
4903 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004904 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004906 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004908 break 2
4909 fi
4910done
Matthias Kloseb9621712010-04-24 17:59:49 +00004911 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004912IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004913
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004914 ;;
4915esac
4916fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004917ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4918if test -n "$ac_pt_CXX"; then
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4920$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004921else
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004925
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004926 if test "x$ac_pt_CXX" = x; then
4927 CXX="c++"
4928 else
4929 case $cross_compiling:$ac_tool_warned in
4930yes:)
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4932$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4933ac_tool_warned=yes ;;
4934esac
4935 CXX=$ac_pt_CXX
4936 fi
4937else
4938 CXX="$ac_cv_path_CXX"
4939fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004940 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004941 clang|*/clang) if test -n "$ac_tool_prefix"; then
4942 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4943set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4945$as_echo_n "checking for $ac_word... " >&6; }
4946if ${ac_cv_path_CXX+:} false; then :
4947 $as_echo_n "(cached) " >&6
4948else
4949 case $CXX in
4950 [\\/]* | ?:[\\/]*)
4951 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4952 ;;
4953 *)
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in notfound
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4964 fi
4965done
4966 done
4967IFS=$as_save_IFS
4968
Ned Deilycbfb9a52012-06-23 16:02:19 -07004969 ;;
4970esac
4971fi
4972CXX=$ac_cv_path_CXX
4973if test -n "$CXX"; then
4974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4975$as_echo "$CXX" >&6; }
4976else
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4978$as_echo "no" >&6; }
4979fi
4980
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004981
4982fi
4983if test -z "$ac_cv_path_CXX"; then
4984 ac_pt_CXX=$CXX
4985 # Extract the first word of "clang++", so it can be a program name with args.
4986set dummy clang++; ac_word=$2
4987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4988$as_echo_n "checking for $ac_word... " >&6; }
4989if ${ac_cv_path_ac_pt_CXX+:} false; then :
4990 $as_echo_n "(cached) " >&6
4991else
4992 case $ac_pt_CXX in
4993 [\\/]* | ?:[\\/]*)
4994 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4995 ;;
4996 *)
4997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in notfound
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
5002 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005004 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5006 break 2
5007 fi
5008done
5009 done
5010IFS=$as_save_IFS
5011
5012 ;;
5013esac
5014fi
5015ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5016if test -n "$ac_pt_CXX"; then
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5018$as_echo "$ac_pt_CXX" >&6; }
5019else
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
5022fi
5023
5024 if test "x$ac_pt_CXX" = x; then
5025 CXX="clang++"
5026 else
5027 case $cross_compiling:$ac_tool_warned in
5028yes:)
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5031ac_tool_warned=yes ;;
5032esac
5033 CXX=$ac_pt_CXX
5034 fi
5035else
5036 CXX="$ac_cv_path_CXX"
5037fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005038 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005039 icc|*/icc) if test -n "$ac_tool_prefix"; then
5040 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5041set dummy ${ac_tool_prefix}icpc; ac_word=$2
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5043$as_echo_n "checking for $ac_word... " >&6; }
5044if ${ac_cv_path_CXX+:} false; then :
5045 $as_echo_n "(cached) " >&6
5046else
5047 case $CXX in
5048 [\\/]* | ?:[\\/]*)
5049 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5050 ;;
5051 *)
5052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053for as_dir in notfound
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
5057 for ac_exec_ext in '' $ac_executable_extensions; do
5058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5059 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5061 break 2
5062 fi
5063done
5064 done
5065IFS=$as_save_IFS
5066
5067 ;;
5068esac
5069fi
5070CXX=$ac_cv_path_CXX
5071if test -n "$CXX"; then
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5073$as_echo "$CXX" >&6; }
5074else
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
5077fi
5078
5079
5080fi
5081if test -z "$ac_cv_path_CXX"; then
5082 ac_pt_CXX=$CXX
5083 # Extract the first word of "icpc", so it can be a program name with args.
5084set dummy icpc; ac_word=$2
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
5087if ${ac_cv_path_ac_pt_CXX+:} false; then :
5088 $as_echo_n "(cached) " >&6
5089else
5090 case $ac_pt_CXX in
5091 [\\/]* | ?:[\\/]*)
5092 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5093 ;;
5094 *)
5095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in notfound
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5102 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106done
5107 done
5108IFS=$as_save_IFS
5109
5110 ;;
5111esac
5112fi
5113ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5114if test -n "$ac_pt_CXX"; then
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5116$as_echo "$ac_pt_CXX" >&6; }
5117else
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
5120fi
5121
5122 if test "x$ac_pt_CXX" = x; then
5123 CXX="icpc"
5124 else
5125 case $cross_compiling:$ac_tool_warned in
5126yes:)
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5129ac_tool_warned=yes ;;
5130esac
5131 CXX=$ac_pt_CXX
5132 fi
5133else
5134 CXX="$ac_cv_path_CXX"
5135fi
5136 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137 esac
5138 if test "$CXX" = "notfound"
5139 then
5140 CXX=""
5141 fi
5142fi
5143if test -z "$CXX"
5144then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005145 if test -n "$ac_tool_prefix"; then
5146 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5147 do
5148 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5149set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5151$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005152if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154else
5155 if test -n "$CXX"; then
5156 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5157else
5158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159for as_dir in $PATH
5160do
5161 IFS=$as_save_IFS
5162 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005165 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167 break 2
5168 fi
5169done
Matthias Kloseb9621712010-04-24 17:59:49 +00005170 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005171IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172
5173fi
5174fi
5175CXX=$ac_cv_prog_CXX
5176if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5178$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179else
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182fi
5183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005184
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005185 test -n "$CXX" && break
5186 done
5187fi
5188if test -z "$CXX"; then
5189 ac_ct_CXX=$CXX
5190 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5191do
5192 # Extract the first word of "$ac_prog", so it can be a program name with args.
5193set dummy $ac_prog; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5197 $as_echo_n "(cached) " >&6
5198else
5199 if test -n "$ac_ct_CXX"; then
5200 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5201else
5202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5203for as_dir in $PATH
5204do
5205 IFS=$as_save_IFS
5206 test -z "$as_dir" && as_dir=.
5207 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005209 ac_cv_prog_ac_ct_CXX="$ac_prog"
5210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5211 break 2
5212 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005213done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005214 done
5215IFS=$as_save_IFS
5216
5217fi
5218fi
5219ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5220if test -n "$ac_ct_CXX"; then
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5222$as_echo "$ac_ct_CXX" >&6; }
5223else
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5225$as_echo "no" >&6; }
5226fi
5227
5228
5229 test -n "$ac_ct_CXX" && break
5230done
5231
5232 if test "x$ac_ct_CXX" = x; then
5233 CXX="notfound"
5234 else
5235 case $cross_compiling:$ac_tool_warned in
5236yes:)
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5239ac_tool_warned=yes ;;
5240esac
5241 CXX=$ac_ct_CXX
5242 fi
5243fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005244
5245 if test "$CXX" = "notfound"
5246 then
5247 CXX=""
5248 fi
5249fi
5250if test "$preset_cxx" != "$CXX"
5251then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005252 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005253
5254 By default, distutils will build C++ extension modules with \"$CXX\".
5255 If this is not intended, then set CXX on the configure command line.
5256 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005257$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005258
5259 By default, distutils will build C++ extension modules with \"$CXX\".
5260 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005261 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005262fi
5263
5264
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5266
5267
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5269$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5270cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005271#undef bfin
5272#undef cris
5273#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005274#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005275#undef hppa
5276#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005278#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005279#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005280#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005281#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005282#if defined(__ANDROID__)
5283# if defined(__x86_64__) && defined(__LP64__)
5284 x86_64-linux-android
5285# elif defined(__i386__)
5286 i686-linux-android
5287# elif defined(__aarch64__) && defined(__AARCH64EL__)
5288# if defined(__ILP32__)
5289 aarch64_ilp32-linux-android
5290# else
5291 aarch64-linux-android
5292# endif
5293# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5294 arm-linux-androideabi
5295# elif defined(__mips_hard_float) && defined(_MIPSEL)
5296# if _MIPS_SIM == _ABIO32
5297 mipsel-linux-android
5298# elif _MIPS_SIM == _ABI64
5299 mips64el-linux-android
5300# else
5301# error unknown platform triplet
5302# endif
5303# else
5304# error unknown platform triplet
5305# endif
5306#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005307# if defined(__x86_64__) && defined(__LP64__)
5308 x86_64-linux-gnu
5309# elif defined(__x86_64__) && defined(__ILP32__)
5310 x86_64-linux-gnux32
5311# elif defined(__i386__)
5312 i386-linux-gnu
5313# elif defined(__aarch64__) && defined(__AARCH64EL__)
5314# if defined(__ILP32__)
5315 aarch64_ilp32-linux-gnu
5316# else
5317 aarch64-linux-gnu
5318# endif
5319# elif defined(__aarch64__) && defined(__AARCH64EB__)
5320# if defined(__ILP32__)
5321 aarch64_be_ilp32-linux-gnu
5322# else
5323 aarch64_be-linux-gnu
5324# endif
5325# elif defined(__alpha__)
5326 alpha-linux-gnu
5327# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5328# if defined(__ARMEL__)
5329 arm-linux-gnueabihf
5330# else
5331 armeb-linux-gnueabihf
5332# endif
5333# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5334# if defined(__ARMEL__)
5335 arm-linux-gnueabi
5336# else
5337 armeb-linux-gnueabi
5338# endif
5339# elif defined(__hppa__)
5340 hppa-linux-gnu
5341# elif defined(__ia64__)
5342 ia64-linux-gnu
5343# elif defined(__m68k__) && !defined(__mcoldfire__)
5344 m68k-linux-gnu
5345# elif defined(__mips_hard_float) && defined(_MIPSEL)
5346# if _MIPS_SIM == _ABIO32
5347 mipsel-linux-gnu
5348# elif _MIPS_SIM == _ABIN32
5349 mips64el-linux-gnuabin32
5350# elif _MIPS_SIM == _ABI64
5351 mips64el-linux-gnuabi64
5352# else
5353# error unknown platform triplet
5354# endif
5355# elif defined(__mips_hard_float)
5356# if _MIPS_SIM == _ABIO32
5357 mips-linux-gnu
5358# elif _MIPS_SIM == _ABIN32
5359 mips64-linux-gnuabin32
5360# elif _MIPS_SIM == _ABI64
5361 mips64-linux-gnuabi64
5362# else
5363# error unknown platform triplet
5364# endif
5365# elif defined(__or1k__)
5366 or1k-linux-gnu
5367# elif defined(__powerpc__) && defined(__SPE__)
5368 powerpc-linux-gnuspe
5369# elif defined(__powerpc64__)
5370# if defined(__LITTLE_ENDIAN__)
5371 powerpc64le-linux-gnu
5372# else
5373 powerpc64-linux-gnu
5374# endif
5375# elif defined(__powerpc__)
5376 powerpc-linux-gnu
5377# elif defined(__s390x__)
5378 s390x-linux-gnu
5379# elif defined(__s390__)
5380 s390-linux-gnu
5381# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5382 sh4-linux-gnu
5383# elif defined(__sparc__) && defined(__arch64__)
5384 sparc64-linux-gnu
5385# elif defined(__sparc__)
5386 sparc-linux-gnu
5387# else
5388# error unknown platform triplet
5389# endif
5390#elif defined(__FreeBSD_kernel__)
5391# if defined(__LP64__)
5392 x86_64-kfreebsd-gnu
5393# elif defined(__i386__)
5394 i386-kfreebsd-gnu
5395# else
5396# error unknown platform triplet
5397# endif
5398#elif defined(__gnu_hurd__)
5399 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005400#elif defined(__APPLE__)
5401 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005402#else
5403# error unknown platform triplet
5404#endif
5405
5406EOF
5407
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005408if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005409 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5411$as_echo "$PLATFORM_TRIPLET" >&6; }
5412else
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5414$as_echo "none" >&6; }
5415fi
5416rm -f conftest.c conftest.out
5417
5418if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5419 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5420 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5421 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005422elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5423 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005424fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005425if test x$PLATFORM_TRIPLET = x; then
5426 PLATDIR=plat-$MACHDEP
5427else
5428 PLATDIR=plat-$PLATFORM_TRIPLET
5429fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005430
5431
doko@ubuntu.com55532312016-06-14 08:55:19 +02005432if test x$MULTIARCH != x; then
5433 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5434fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005435
5436
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5438$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5439save_LDFLAGS="$LDFLAGS"
5440LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005441
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5443/* end confdefs.h. */
5444
5445int
5446main ()
5447{
5448
5449 ;
5450 return 0;
5451}
5452_ACEOF
5453if ac_fn_c_try_link "$LINENO"; then :
5454 NO_AS_NEEDED="-Wl,--no-as-needed"
5455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5456$as_echo "yes" >&6; }
5457else
5458 NO_AS_NEEDED=""
5459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5460$as_echo "no" >&6; }
5461fi
5462rm -f core conftest.err conftest.$ac_objext \
5463 conftest$ac_exeext conftest.$ac_ext
5464LDFLAGS="$save_LDFLAGS"
5465
5466
5467
5468# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005469
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5471$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005472if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005474else
5475 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5476 then ac_cv_path_EGREP="$GREP -E"
5477 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005478 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005479 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 # Loop through the user's path and test for each of PROGNAME-LIST
5481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005482for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5483do
5484 IFS=$as_save_IFS
5485 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005486 for ac_prog in egrep; do
5487 for ac_exec_ext in '' $ac_executable_extensions; do
5488 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005489 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005490# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005491 # Check for GNU $ac_path_EGREP
5492case `"$ac_path_EGREP" --version 2>&1` in
5493*GNU*)
5494 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5495*)
5496 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005498 while :
5499 do
5500 cat "conftest.in" "conftest.in" >"conftest.tmp"
5501 mv "conftest.tmp" "conftest.in"
5502 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005504 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5505 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005507 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5508 # Best one so far, save it but keep looking for a better one
5509 ac_cv_path_EGREP="$ac_path_EGREP"
5510 ac_path_EGREP_max=$ac_count
5511 fi
5512 # 10*(2^10) chars as input seems more than enough
5513 test $ac_count -gt 10 && break
5514 done
5515 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5516esac
5517
Matthias Kloseb9621712010-04-24 17:59:49 +00005518 $ac_path_EGREP_found && break 3
5519 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005520 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005521 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005522IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005523 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005524 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 +00005525 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005526else
5527 ac_cv_path_EGREP=$EGREP
5528fi
5529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005530 fi
5531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5533$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005534 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005535
5536
Matthias Kloseb9621712010-04-24 17:59:49 +00005537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5538$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005539if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 $as_echo_n "(cached) " >&6
5541else
5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005543/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005544#include <stdlib.h>
5545#include <stdarg.h>
5546#include <string.h>
5547#include <float.h>
5548
5549int
5550main ()
5551{
5552
5553 ;
5554 return 0;
5555}
5556_ACEOF
5557if ac_fn_c_try_compile "$LINENO"; then :
5558 ac_cv_header_stdc=yes
5559else
5560 ac_cv_header_stdc=no
5561fi
5562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5563
5564if test $ac_cv_header_stdc = yes; then
5565 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5567/* end confdefs.h. */
5568#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005569
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005570_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005572 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005574else
Matthias Kloseb9621712010-04-24 17:59:49 +00005575 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005576fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005577rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578
Matthias Kloseb9621712010-04-24 17:59:49 +00005579fi
5580
5581if test $ac_cv_header_stdc = yes; then
5582 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5584/* end confdefs.h. */
5585#include <stdlib.h>
5586
5587_ACEOF
5588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5589 $EGREP "free" >/dev/null 2>&1; then :
5590
5591else
5592 ac_cv_header_stdc=no
5593fi
5594rm -f conftest*
5595
5596fi
5597
5598if test $ac_cv_header_stdc = yes; then
5599 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5600 if test "$cross_compiling" = yes; then :
5601 :
5602else
5603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5604/* end confdefs.h. */
5605#include <ctype.h>
5606#include <stdlib.h>
5607#if ((' ' & 0x0FF) == 0x020)
5608# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5609# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5610#else
5611# define ISLOWER(c) \
5612 (('a' <= (c) && (c) <= 'i') \
5613 || ('j' <= (c) && (c) <= 'r') \
5614 || ('s' <= (c) && (c) <= 'z'))
5615# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5616#endif
5617
5618#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5619int
5620main ()
5621{
5622 int i;
5623 for (i = 0; i < 256; i++)
5624 if (XOR (islower (i), ISLOWER (i))
5625 || toupper (i) != TOUPPER (i))
5626 return 2;
5627 return 0;
5628}
5629_ACEOF
5630if ac_fn_c_try_run "$LINENO"; then :
5631
5632else
5633 ac_cv_header_stdc=no
5634fi
5635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5636 conftest.$ac_objext conftest.beam conftest.$ac_ext
5637fi
5638
5639fi
5640fi
5641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5642$as_echo "$ac_cv_header_stdc" >&6; }
5643if test $ac_cv_header_stdc = yes; then
5644
5645$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5646
5647fi
5648
5649# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5650for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5651 inttypes.h stdint.h unistd.h
5652do :
5653 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5654ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5655"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005656if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 cat >>confdefs.h <<_ACEOF
5658#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5659_ACEOF
5660
5661fi
5662
5663done
5664
5665
5666
5667 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 +02005668if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 MINIX=yes
5670else
5671 MINIX=
5672fi
5673
5674
5675 if test "$MINIX" = yes; then
5676
5677$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5678
5679
5680$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5681
5682
5683$as_echo "#define _MINIX 1" >>confdefs.h
5684
5685 fi
5686
5687
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5689$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005690if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 $as_echo_n "(cached) " >&6
5692else
5693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5694/* end confdefs.h. */
5695
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005696# define __EXTENSIONS__ 1
5697 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005698int
5699main ()
5700{
5701
5702 ;
5703 return 0;
5704}
5705_ACEOF
5706if ac_fn_c_try_compile "$LINENO"; then :
5707 ac_cv_safe_to_define___extensions__=yes
5708else
5709 ac_cv_safe_to_define___extensions__=no
5710fi
5711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5712fi
5713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5714$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5715 test $ac_cv_safe_to_define___extensions__ = yes &&
5716 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5717
5718 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5719
5720 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5721
5722 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5723
5724 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5725
5726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
Xavier de Gaye95750b12016-07-09 11:05:42 +02005728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5729$as_echo_n "checking for the Android API level... " >&6; }
5730cat >> conftest.c <<EOF
5731#ifdef __ANDROID__
5732#include <android/api-level.h>
5733__ANDROID_API__
5734#else
5735#error not Android
5736#endif
5737EOF
5738
5739if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5740 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5742$as_echo "$ANDROID_API_LEVEL" >&6; }
5743
5744cat >>confdefs.h <<_ACEOF
5745#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5746_ACEOF
5747
5748else
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5750$as_echo "not Android" >&6; }
5751fi
5752rm -f conftest.c conftest.out
5753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754# Check for unsupported systems
5755case $ac_sys_system/$ac_sys_release in
5756atheos*|Linux*/1*)
5757 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5758 echo See README for details.
5759 exit 1;;
5760esac
5761
5762
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5764$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005767if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 withval=$with_suffix;
5769 case $withval in
5770 no) EXEEXT=;;
5771 yes) EXEEXT=.exe;;
5772 *) EXEEXT=$withval;;
5773 esac
5774fi
5775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5777$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779# Test whether we're running on a non-case-sensitive system, in which
5780# case we give a warning if no ext is given
5781
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5783$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784if test ! -d CaseSensitiveTestDir; then
5785mkdir CaseSensitiveTestDir
5786fi
5787
5788if test -d casesensitivetestdir
5789then
Matthias Kloseb9621712010-04-24 17:59:49 +00005790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5791$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 BUILDEXEEXT=.exe
5793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796 BUILDEXEEXT=$EXEEXT
5797fi
5798rmdir CaseSensitiveTestDir
5799
5800case $MACHDEP in
5801bsdos*)
5802 case $CC in
5803 gcc) CC="$CC -D_HAVE_BSDI";;
5804 esac;;
5805esac
5806
5807case $ac_sys_system in
5808hp*|HP*)
5809 case $CC in
5810 cc|*/cc) CC="$CC -Ae";;
5811 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812esac
5813
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5816$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817if test -z "$LIBRARY"
5818then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005819 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5822$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823
5824# LDLIBRARY is the name of the library to link against (as opposed to the
5825# name of the library into which to insert object files). BLDLIBRARY is also
5826# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5827# is blank as the main program is not linked directly against LDLIBRARY.
5828# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5829# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5830# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5831# DLLLIBRARY is the shared (i.e., DLL) library.
5832#
5833# RUNSHARED is used to run shared python without installed libraries
5834#
5835# INSTSONAME is the name of the shared library that will be use to install
5836# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005837#
5838# LDVERSION is the shared library version number, normally the Python version
5839# with the ABI build flags appended.
5840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841
5842
5843
5844
5845
5846
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848LDLIBRARY="$LIBRARY"
5849BLDLIBRARY='$(LDLIBRARY)'
5850INSTSONAME='$(LDLIBRARY)'
5851DLLLIBRARY=''
5852LDLIBRARYDIR=''
5853RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005854LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855
5856# LINKCC is the command that links the python executable -- default is $(CC).
5857# If CXX is set, and if it is needed to link a main function that was
5858# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5859# python might then depend on the C++ runtime
5860# This is altered for AIX in order to build the export list before
5861# linking.
5862
Matthias Kloseb9621712010-04-24 17:59:49 +00005863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5864$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865if test -z "$LINKCC"
5866then
5867 LINKCC='$(PURIFY) $(MAINCC)'
5868 case $ac_sys_system in
5869 AIX*)
5870 exp_extra="\"\""
5871 if test $ac_sys_release -ge 5 -o \
5872 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5873 exp_extra="."
5874 fi
5875 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 QNX*)
5877 # qcc must be used because the other compilers do not
5878 # support -N.
5879 LINKCC=qcc;;
5880 esac
5881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5883$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
5885# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5886# make sure we default having it set to "no": this is used by
5887# distutils.unixccompiler to know if it should add --enable-new-dtags
5888# to linker command lines, and failing to detect GNU ld simply results
5889# in the same bahaviour as before.
5890
Matthias Kloseb9621712010-04-24 17:59:49 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5892$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893ac_prog=ld
5894if test "$GCC" = yes; then
5895 ac_prog=`$CC -print-prog-name=ld`
5896fi
5897case `"$ac_prog" -V 2>&1 < /dev/null` in
5898 *GNU*)
5899 GNULD=yes;;
5900 *)
5901 GNULD=no;;
5902esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5904$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5907$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005908if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005909 $as_echo_n "(cached) " >&6
5910else
5911 ac_cv_c_inline=no
5912for ac_kw in inline __inline__ __inline; do
5913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5914/* end confdefs.h. */
5915#ifndef __cplusplus
5916typedef int foo_t;
5917static $ac_kw foo_t static_foo () {return 0; }
5918$ac_kw foo_t foo () {return 0; }
5919#endif
5920
5921_ACEOF
5922if ac_fn_c_try_compile "$LINENO"; then :
5923 ac_cv_c_inline=$ac_kw
5924fi
5925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5926 test "$ac_cv_c_inline" != no && break
5927done
5928
5929fi
5930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5931$as_echo "$ac_cv_c_inline" >&6; }
5932
5933case $ac_cv_c_inline in
5934 inline | yes) ;;
5935 *)
5936 case $ac_cv_c_inline in
5937 no) ac_val=;;
5938 *) ac_val=$ac_cv_c_inline;;
5939 esac
5940 cat >>confdefs.h <<_ACEOF
5941#ifndef __cplusplus
5942#define inline $ac_val
5943#endif
5944_ACEOF
5945 ;;
5946esac
5947
5948if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005949
5950$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005951
5952
5953fi
5954
5955
Matthias Kloseb9621712010-04-24 17:59:49 +00005956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5957$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005959if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 enableval=$enable_shared;
5961fi
5962
5963
5964if test -z "$enable_shared"
5965then
5966 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005967 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 enable_shared="yes";;
5969 *)
5970 enable_shared="no";;
5971 esac
5972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5974$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5977$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005979if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005980 enableval=$enable_profiling;
5981fi
5982
5983if test "x$enable_profiling" = xyes; then
5984 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005985 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987/* end confdefs.h. */
5988int main() { return 0; }
5989_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005990if ac_fn_c_try_link "$LINENO"; then :
5991
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005993 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005995rm -f core conftest.err conftest.$ac_objext \
5996 conftest$ac_exeext conftest.$ac_ext
5997 CC="$ac_save_cc"
5998else
5999 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02006001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
6002$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003
doko@ubuntu.comba015832012-06-30 16:52:05 +02006004if test "x$enable_profiling" = xyes; then
6005 BASECFLAGS="-pg $BASECFLAGS"
6006 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007fi
6008
Matthias Kloseb9621712010-04-24 17:59:49 +00006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
6010$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011
6012# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
6013# library that we build, but we do not want to link against it (we
6014# will find it with a -framework option). For this reason there is an
6015# extra variable BLDLIBRARY against which Python and the extension
6016# modules are linked, BLDLIBRARY. This is normally the same as
6017# LDLIBRARY, but empty for MacOSX framework builds.
6018if test "$enable_framework"
6019then
6020 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006021 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022 BLDLIBRARY=''
6023else
6024 BLDLIBRARY='$(LDLIBRARY)'
6025fi
6026
6027# Other platforms follow
6028if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01006029 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030
Matthias Kloseb9621712010-04-24 17:59:49 +00006031$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032
6033 case $ac_sys_system in
6034 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006035 LDLIBRARY='libpython$(LDVERSION).dll.a'
6036 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 ;;
6038 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006039 LDLIBRARY='libpython$(LDVERSION).so'
6040 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006041 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006043 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006044 then
6045 PY3LIBRARY=libpython3.so
6046 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02006048 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006049 LDLIBRARY='libpython$(LDVERSION).so'
6050 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006051 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006053 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006054 then
6055 PY3LIBRARY=libpython3.so
6056 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057 ;;
6058 hp*|HP*)
6059 case `uname -m` in
6060 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006061 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 ;;
6063 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006064 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065 ;;
6066 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006067 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006068 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006071 LDLIBRARY='libpython$(LDVERSION).dylib'
6072 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006073 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006075 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006076 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006077 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006078 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079
6080 esac
6081else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006082 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083 case $ac_sys_system in
6084 CYGWIN*)
6085 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006086 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087 ;;
6088 esac
6089fi
6090
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006091if test "$cross_compiling" = yes; then
6092 RUNSHARED=
6093fi
6094
Matthias Kloseb9621712010-04-24 17:59:49 +00006095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6096$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097
6098if test -n "$ac_tool_prefix"; then
6099 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6100set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006103if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105else
6106 if test -n "$RANLIB"; then
6107 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6108else
6109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6110for as_dir in $PATH
6111do
6112 IFS=$as_save_IFS
6113 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006115 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006116 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118 break 2
6119 fi
6120done
Matthias Kloseb9621712010-04-24 17:59:49 +00006121 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122IFS=$as_save_IFS
6123
6124fi
6125fi
6126RANLIB=$ac_cv_prog_RANLIB
6127if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6129$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130else
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133fi
6134
6135
6136fi
6137if test -z "$ac_cv_prog_RANLIB"; then
6138 ac_ct_RANLIB=$RANLIB
6139 # Extract the first word of "ranlib", so it can be a program name with args.
6140set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6142$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006143if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145else
6146 if test -n "$ac_ct_RANLIB"; then
6147 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6148else
6149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6150for as_dir in $PATH
6151do
6152 IFS=$as_save_IFS
6153 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158 break 2
6159 fi
6160done
Matthias Kloseb9621712010-04-24 17:59:49 +00006161 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162IFS=$as_save_IFS
6163
6164fi
6165fi
6166ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6167if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6169$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170else
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6172$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173fi
6174
6175 if test "x$ac_ct_RANLIB" = x; then
6176 RANLIB=":"
6177 else
6178 case $cross_compiling:$ac_tool_warned in
6179yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182ac_tool_warned=yes ;;
6183esac
6184 RANLIB=$ac_ct_RANLIB
6185 fi
6186else
6187 RANLIB="$ac_cv_prog_RANLIB"
6188fi
6189
6190
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006191if test -n "$ac_tool_prefix"; then
6192 for ac_prog in ar aal
6193 do
6194 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006198if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200else
6201 if test -n "$AR"; then
6202 ac_cv_prog_AR="$AR" # Let the user override the test.
6203else
6204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205for as_dir in $PATH
6206do
6207 IFS=$as_save_IFS
6208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006211 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213 break 2
6214 fi
6215done
Matthias Kloseb9621712010-04-24 17:59:49 +00006216 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217IFS=$as_save_IFS
6218
6219fi
6220fi
6221AR=$ac_cv_prog_AR
6222if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6224$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225else
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6227$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228fi
6229
6230
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006231 test -n "$AR" && break
6232 done
6233fi
6234if test -z "$AR"; then
6235 ac_ct_AR=$AR
6236 for ac_prog in ar aal
6237do
6238 # Extract the first word of "$ac_prog", so it can be a program name with args.
6239set dummy $ac_prog; ac_word=$2
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6241$as_echo_n "checking for $ac_word... " >&6; }
6242if ${ac_cv_prog_ac_ct_AR+:} false; then :
6243 $as_echo_n "(cached) " >&6
6244else
6245 if test -n "$ac_ct_AR"; then
6246 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6247else
6248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249for as_dir in $PATH
6250do
6251 IFS=$as_save_IFS
6252 test -z "$as_dir" && as_dir=.
6253 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006255 ac_cv_prog_ac_ct_AR="$ac_prog"
6256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6257 break 2
6258 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006259done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006260 done
6261IFS=$as_save_IFS
6262
6263fi
6264fi
6265ac_ct_AR=$ac_cv_prog_ac_ct_AR
6266if test -n "$ac_ct_AR"; then
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6268$as_echo "$ac_ct_AR" >&6; }
6269else
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271$as_echo "no" >&6; }
6272fi
6273
6274
6275 test -n "$ac_ct_AR" && break
6276done
6277
6278 if test "x$ac_ct_AR" = x; then
6279 AR="ar"
6280 else
6281 case $cross_compiling:$ac_tool_warned in
6282yes:)
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6285ac_tool_warned=yes ;;
6286esac
6287 AR=$ac_ct_AR
6288 fi
6289fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290
6291
6292# tweak ARFLAGS only if the user didn't set it on the command line
6293
6294if test -z "$ARFLAGS"
6295then
6296 ARFLAGS="rc"
6297fi
6298
doko@ubuntu.com58844492012-06-30 18:25:32 +02006299if test -n "$ac_tool_prefix"; then
6300 for ac_prog in readelf
6301 do
6302 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6303set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305$as_echo_n "checking for $ac_word... " >&6; }
6306if ${ac_cv_prog_READELF+:} false; then :
6307 $as_echo_n "(cached) " >&6
6308else
6309 if test -n "$READELF"; then
6310 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6311else
6312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315 IFS=$as_save_IFS
6316 test -z "$as_dir" && as_dir=.
6317 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006318 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006319 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6321 break 2
6322 fi
6323done
6324 done
6325IFS=$as_save_IFS
6326
6327fi
6328fi
6329READELF=$ac_cv_prog_READELF
6330if test -n "$READELF"; then
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6332$as_echo "$READELF" >&6; }
6333else
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
6336fi
6337
6338
6339 test -n "$READELF" && break
6340 done
6341fi
6342if test -z "$READELF"; then
6343 ac_ct_READELF=$READELF
6344 for ac_prog in readelf
6345do
6346 # Extract the first word of "$ac_prog", so it can be a program name with args.
6347set dummy $ac_prog; ac_word=$2
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6349$as_echo_n "checking for $ac_word... " >&6; }
6350if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6351 $as_echo_n "(cached) " >&6
6352else
6353 if test -n "$ac_ct_READELF"; then
6354 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6355else
6356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6357for as_dir in $PATH
6358do
6359 IFS=$as_save_IFS
6360 test -z "$as_dir" && as_dir=.
6361 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006363 ac_cv_prog_ac_ct_READELF="$ac_prog"
6364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6365 break 2
6366 fi
6367done
6368 done
6369IFS=$as_save_IFS
6370
6371fi
6372fi
6373ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6374if test -n "$ac_ct_READELF"; then
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6376$as_echo "$ac_ct_READELF" >&6; }
6377else
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379$as_echo "no" >&6; }
6380fi
6381
6382
6383 test -n "$ac_ct_READELF" && break
6384done
6385
6386 if test "x$ac_ct_READELF" = x; then
6387 READELF=":"
6388 else
6389 case $cross_compiling:$ac_tool_warned in
6390yes:)
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6392$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6393ac_tool_warned=yes ;;
6394esac
6395 READELF=$ac_ct_READELF
6396 fi
6397fi
6398
6399if test "$cross_compiling" = yes; then
6400 case "$READELF" in
6401 readelf|:)
6402 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6403 ;;
6404 esac
6405fi
6406
6407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409case $MACHDEP in
6410bsdos*|hp*|HP*)
6411 # install -d does not work on BSDI or HP-UX
6412 if test -z "$INSTALL"
6413 then
6414 INSTALL="${srcdir}/install-sh -c"
6415 fi
6416esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417# Find a good install program. We prefer a C program (faster),
6418# so one script is as good as another. But avoid the broken or
6419# incompatible versions:
6420# SysV /etc/install, /usr/sbin/install
6421# SunOS /usr/etc/install
6422# IRIX /sbin/install
6423# AIX /bin/install
6424# AmigaOS /C/install, which installs bootblocks on floppy discs
6425# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6426# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6427# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6428# OS/2's system install, which has a completely different semantic
6429# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006430# Reject install programs that cannot install multiple files.
6431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6432$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006434if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006435 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436else
6437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6438for as_dir in $PATH
6439do
6440 IFS=$as_save_IFS
6441 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006442 # Account for people who put trailing slashes in PATH elements.
6443case $as_dir/ in #((
6444 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006446 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447 /usr/ucb/* ) ;;
6448 *)
6449 # OSF1 and SCO ODT 3.0 have their own names for install.
6450 # Don't use installbsd from OSF since it installs stuff as root
6451 # by default.
6452 for ac_prog in ginstall scoinst install; do
6453 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006454 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455 if test $ac_prog = install &&
6456 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6457 # AIX install. It has an incompatible calling convention.
6458 :
6459 elif test $ac_prog = install &&
6460 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6461 # program-specific install script used by HP pwplus--don't use.
6462 :
6463 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006464 rm -rf conftest.one conftest.two conftest.dir
6465 echo one > conftest.one
6466 echo two > conftest.two
6467 mkdir conftest.dir
6468 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6469 test -s conftest.one && test -s conftest.two &&
6470 test -s conftest.dir/conftest.one &&
6471 test -s conftest.dir/conftest.two
6472 then
6473 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6474 break 3
6475 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476 fi
6477 fi
6478 done
6479 done
6480 ;;
6481esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006482
6483 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006484IFS=$as_save_IFS
6485
Matthias Kloseb9621712010-04-24 17:59:49 +00006486rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487
6488fi
6489 if test "${ac_cv_path_install+set}" = set; then
6490 INSTALL=$ac_cv_path_install
6491 else
6492 # As a last resort, use the slow shell script. Don't cache a
6493 # value for INSTALL within a source directory, because that will
6494 # break other packages using the cache if that directory is
6495 # removed, or if the value is a relative name.
6496 INSTALL=$ac_install_sh
6497 fi
6498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6500$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501
6502# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6503# It thinks the first close brace ends the variable substitution.
6504test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6505
6506test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6507
6508test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6509
Matthias Klose93a0ef12012-03-15 18:08:34 +01006510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6511$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6512if test -z "$MKDIR_P"; then
6513 if ${ac_cv_path_mkdir+:} false; then :
6514 $as_echo_n "(cached) " >&6
6515else
6516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6518do
6519 IFS=$as_save_IFS
6520 test -z "$as_dir" && as_dir=.
6521 for ac_prog in mkdir gmkdir; do
6522 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006523 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006524 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6525 'mkdir (GNU coreutils) '* | \
6526 'mkdir (coreutils) '* | \
6527 'mkdir (fileutils) '4.1*)
6528 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6529 break 3;;
6530 esac
6531 done
6532 done
6533 done
6534IFS=$as_save_IFS
6535
6536fi
6537
6538 test -d ./--version && rmdir ./--version
6539 if test "${ac_cv_path_mkdir+set}" = set; then
6540 MKDIR_P="$ac_cv_path_mkdir -p"
6541 else
6542 # As a last resort, use the slow shell script. Don't cache a
6543 # value for MKDIR_P within a source directory, because that will
6544 # break other packages using the cache if that directory is
6545 # removed, or if the value is a relative name.
6546 MKDIR_P="$ac_install_sh -d"
6547 fi
6548fi
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6550$as_echo "$MKDIR_P" >&6; }
6551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006552
6553# Not every filesystem supports hard links
6554
6555if test -z "$LN" ; then
6556 case $ac_sys_system in
6557 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558 *) LN=ln;;
6559 esac
6560fi
6561
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006562# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006563
6564ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006565
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6568$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006569
6570# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006571if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006572 withval=$with_pydebug;
6573if test "$withval" != no
6574then
6575
Matthias Kloseb9621712010-04-24 17:59:49 +00006576$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577
Matthias Kloseb9621712010-04-24 17:59:49 +00006578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6579$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006580 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006581 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006582else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584fi
6585else
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588fi
6589
6590
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006591# Enable LTO flags
6592
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6594$as_echo_n "checking for --with-lto... " >&6; }
6595
6596# Check whether --with-lto was given.
6597if test "${with_lto+set}" = set; then :
6598 withval=$with_lto;
6599if test "$withval" != no
6600then
6601 Py_LTO='true'
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6603$as_echo "yes" >&6; };
6604else
6605 Py_LTO='false'
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; };
6608fi
6609else
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611$as_echo "no" >&6; }
6612fi
6613
6614if test "$Py_LTO" = 'true' ; then
6615 case $CC in
6616 *clang*)
6617 # Any changes made here should be reflected in the GCC+Darwin case below
6618 LTOFLAGS="-flto"
6619 ;;
6620 *gcc*)
6621 case $ac_sys_system in
6622 Darwin*)
6623 LTOFLAGS="-flto"
6624 ;;
6625 *)
6626 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6627 ;;
6628 esac
6629 ;;
6630 esac
6631fi
6632
Brett Cannon7188a3e2015-09-18 15:13:44 -07006633# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006634
6635
6636
6637
6638
6639
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640# Extract the first word of "llvm-profdata", so it can be a program name with args.
6641set dummy llvm-profdata; ac_word=$2
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6643$as_echo_n "checking for $ac_word... " >&6; }
6644if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6645 $as_echo_n "(cached) " >&6
6646else
6647 if test -n "$LLVM_PROF_FOUND"; then
6648 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6649else
6650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651for as_dir in $PATH
6652do
6653 IFS=$as_save_IFS
6654 test -z "$as_dir" && as_dir=.
6655 for ac_exec_ext in '' $ac_executable_extensions; do
6656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657 ac_cv_prog_LLVM_PROF_FOUND="found"
6658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659 break 2
6660 fi
6661done
6662 done
6663IFS=$as_save_IFS
6664
6665 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6666fi
6667fi
6668LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6669if test -n "$LLVM_PROF_FOUND"; then
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6671$as_echo "$LLVM_PROF_FOUND" >&6; }
6672else
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6674$as_echo "no" >&6; }
6675fi
6676
6677
6678LLVM_PROF_ERR=no
6679case $CC in
6680 *clang*)
6681 # Any changes made here should be reflected in the GCC+Darwin case below
6682 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6683 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6684 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6685 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6686 if test $LLVM_PROF_FOUND = not-found
6687 then
6688 LLVM_PROF_ERR=yes
6689 fi
6690 ;;
6691 *gcc*)
6692 case $ac_sys_system in
6693 Darwin*)
6694 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6695 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6696 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6697 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6698 if test $LLVM_PROF_FOUND = not-found
6699 then
6700 LLVM_PROF_ERR=yes
6701 fi
6702 ;;
6703 *)
6704 PGO_PROF_GEN_FLAG="-fprofile-generate"
6705 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6706 LLVM_PROF_MERGER="true"
6707 LLVM_PROF_FILE=""
6708 ;;
6709 esac
6710 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006711 *icc*)
6712 PGO_PROF_GEN_FLAG="-prof-gen"
6713 PGO_PROF_USE_FLAG="-prof-use"
6714 LLVM_PROF_MERGER="true"
6715 LLVM_PROF_FILE=""
6716 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006717esac
6718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006719# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6720# merged with this chunk of code?
6721
6722# Optimizer/debugger flags
6723# ------------------------
6724# (The following bit of code is complicated enough - please keep things
6725# indented properly. Just pretend you're editing Python code. ;-)
6726
6727# There are two parallel sets of case statements below, one that checks to
6728# see if OPT was set and one that does BASECFLAGS setting based upon
6729# compiler and platform. BASECFLAGS tweaks need to be made even if the
6730# user set OPT.
6731
6732# tweak OPT based on compiler and platform, only if the user didn't set
6733# it on the command line
6734
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006735if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736then
6737 case $GCC in
6738 yes)
6739 if test "$CC" != 'g++' ; then
6740 STRICT_PROTO="-Wstrict-prototypes"
6741 fi
6742 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6743 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6744 WRAP="-fwrapv"
6745 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006746
6747 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006748 case $CC in
6749 *clang*) WRAP="-fwrapv"
6750 ;;
6751 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753 case $ac_cv_prog_cc_g in
6754 yes)
6755 if test "$Py_DEBUG" = 'true' ; then
6756 # Optimization messes up debuggers, so turn it off for
6757 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006758 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6759 OPT="-g -Og -Wall $STRICT_PROTO"
6760 else
6761 OPT="-g -O0 -Wall $STRICT_PROTO"
6762 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763 else
6764 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6765 fi
6766 ;;
6767 *)
6768 OPT="-O3 -Wall $STRICT_PROTO"
6769 ;;
6770 esac
6771 case $ac_sys_system in
6772 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6773 ;;
6774 esac
6775 ;;
6776
6777 *)
6778 OPT="-O"
6779 ;;
6780 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781fi
6782
6783
6784
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786# The -arch flags for universal builds on OSX
6787UNIVERSAL_ARCH_FLAGS=
6788
6789
6790# tweak BASECFLAGS based on compiler and platform
6791case $GCC in
6792yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006793 # Python doesn't violate C99 aliasing rules, but older versions of
6794 # GCC produce warnings for legal Python code. Enable
6795 # -fno-strict-aliasing on versions of GCC that support but produce
6796 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6798$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799 ac_save_cc="$CC"
6800 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006801 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006802 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006807
Matthias Kloseb159a552010-04-25 21:00:44 +00006808
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006809int
6810main ()
6811{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006812
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006813 ;
6814 return 0;
6815}
Matthias Kloseb159a552010-04-25 21:00:44 +00006816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006818if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006819
6820 CC="$ac_save_cc -fstrict-aliasing"
6821 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006823/* end confdefs.h. */
6824
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006825 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006826int
6827main ()
6828{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006829double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006830 ;
6831 return 0;
6832}
Matthias Kloseb159a552010-04-25 21:00:44 +00006833
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006835if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006836
6837 ac_cv_no_strict_aliasing=no
6838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839else
Matthias Kloseb159a552010-04-25 21:00:44 +00006840
6841 ac_cv_no_strict_aliasing=yes
6842
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006843fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006845
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006846else
Matthias Kloseb159a552010-04-25 21:00:44 +00006847
6848 ac_cv_no_strict_aliasing=no
6849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006852fi
6853
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006854 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6857$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006858 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 then
6860 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6861 fi
6862
Zachary Ware5af85642015-12-21 12:09:17 -06006863 # ICC doesn't recognize the option, but only emits a warning
6864 ## XXX does it emit an unused result warning and can it be disabled?
6865 case "$CC" in
6866 *icc*)
6867 ac_cv_disable_unused_result_warning=no
6868 ;;
6869 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6871$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6872 ac_save_cc="$CC"
6873 CC="$CC -Wunused-result -Werror"
6874 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006875 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006876 $as_echo_n "(cached) " >&6
6877else
6878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6879/* end confdefs.h. */
6880
6881
6882int
6883main ()
6884{
6885
6886 ;
6887 return 0;
6888}
6889
6890_ACEOF
6891if ac_fn_c_try_compile "$LINENO"; then :
6892
6893 ac_cv_disable_unused_result_warning=yes
6894
6895else
6896
6897 ac_cv_disable_unused_result_warning=no
6898
6899fi
6900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6901fi
6902
6903 CFLAGS="$save_CFLAGS"
6904 CC="$ac_save_cc"
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6906$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006907 ;;
6908 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006909
6910 if test $ac_cv_disable_unused_result_warning = yes
6911 then
6912 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6913 fi
6914
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6916$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6917 ac_save_cc="$CC"
6918 CC="$CC -Werror=declaration-after-statement"
6919 save_CFLAGS="$CFLAGS"
6920 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6921 $as_echo_n "(cached) " >&6
6922else
6923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6924/* end confdefs.h. */
6925
6926
6927int
6928main ()
6929{
6930
6931 ;
6932 return 0;
6933}
6934
6935_ACEOF
6936if ac_fn_c_try_compile "$LINENO"; then :
6937
6938 ac_cv_declaration_after_statement_warning=yes
6939
6940else
6941
6942 ac_cv_declaration_after_statement_warning=no
6943
6944fi
6945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6946fi
6947
6948 CFLAGS="$save_CFLAGS"
6949 CC="$ac_save_cc"
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6951$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6952
6953 if test $ac_cv_declaration_after_statement_warning = yes
6954 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006955 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006956 fi
6957
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6959$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6960 ac_save_cc="$CC"
6961 CC="$CC -Wsign-compare"
6962 save_CFLAGS="$CFLAGS"
6963 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6964 $as_echo_n "(cached) " >&6
6965else
6966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6967/* end confdefs.h. */
6968
6969
6970int
6971main ()
6972{
6973
6974 ;
6975 return 0;
6976}
6977
6978_ACEOF
6979if ac_fn_c_try_compile "$LINENO"; then :
6980
6981 ac_cv_enable_sign_compare_warning=yes
6982
6983else
6984
6985 ac_cv_enable_sign_compare_warning=no
6986
6987fi
6988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6989fi
6990
6991 CFLAGS="$save_CFLAGS"
6992 CC="$ac_save_cc"
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6994$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6995
6996 if test $ac_cv_enable_sign_compare_warning = yes
6997 then
6998 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6999 fi
7000
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7002$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7003 ac_save_cc="$CC"
7004 CC="$CC -Wunreachable-code"
7005 save_CFLAGS="$CFLAGS"
7006 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7007 $as_echo_n "(cached) " >&6
7008else
7009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7010/* end confdefs.h. */
7011
7012
7013int
7014main ()
7015{
7016
7017 ;
7018 return 0;
7019}
7020
7021_ACEOF
7022if ac_fn_c_try_compile "$LINENO"; then :
7023
7024 ac_cv_enable_unreachable_code_warning=yes
7025
7026else
7027
7028 ac_cv_enable_unreachable_code_warning=no
7029
7030fi
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7032fi
7033
7034 CFLAGS="$save_CFLAGS"
7035 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007036
7037 # Don't enable unreachable code warning in debug mode, since it usually
7038 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007039 # Issue #24324: Unfortunately, the unreachable code warning does not work
7040 # correctly on gcc and has been silently removed from the compiler.
7041 # It is supported on clang but on OS X systems gcc may be an alias
7042 # for clang. Try to determine if the compiler is not really gcc and,
7043 # if so, only then enable the warning.
7044 if test $ac_cv_enable_unreachable_code_warning = yes && \
7045 test "$Py_DEBUG" != "true" && \
7046 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007047 then
7048 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007049 else
7050 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007051 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7053$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007054
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7056 # support. Without this, treatment of subnormals doesn't follow
7057 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007058 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007059 alpha*)
7060 BASECFLAGS="$BASECFLAGS -mieee"
7061 ;;
7062 esac
7063
7064 case $ac_sys_system in
7065 SCO_SV*)
7066 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7067 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007068
7069 # is there any other compiler on Darwin besides gcc?
7070 Darwin*)
7071 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7072 # used to be here, but non-Apple gcc doesn't accept them.
7073 if test "${CC}" = gcc
7074 then
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007076$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007077 case "${UNIVERSALSDK}" in
7078 */MacOSX10.4u.sdk)
7079 # Build using 10.4 SDK, force usage of gcc when the
7080 # compiler is gcc, otherwise the user will get very
7081 # confusing error messages when building on OSX 10.6
7082 CC=gcc-4.0
7083 CPP=cpp-4.0
7084 ;;
7085 esac
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007087$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007088 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007089
Ned Deily87adb6e2013-10-18 21:09:56 -07007090 if test "${enable_universalsdk}"
7091 then
7092 case "$UNIVERSAL_ARCHS" in
7093 32-bit)
7094 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7095 LIPO_32BIT_FLAGS=""
7096 ARCH_RUN_32BIT=""
7097 ;;
7098 64-bit)
7099 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7100 LIPO_32BIT_FLAGS=""
7101 ARCH_RUN_32BIT="true"
7102 ;;
7103 all)
7104 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7105 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7106 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7107 ;;
7108 intel)
7109 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7110 LIPO_32BIT_FLAGS="-extract i386"
7111 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7112 ;;
7113 intel-32)
7114 UNIVERSAL_ARCH_FLAGS="-arch i386"
7115 LIPO_32BIT_FLAGS=""
7116 ARCH_RUN_32BIT=""
7117 ;;
7118 3-way)
7119 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7120 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7121 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7122 ;;
7123 *)
7124 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7125 ;;
7126 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007127
Ned Deily87adb6e2013-10-18 21:09:56 -07007128 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7129 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7130 if test "${UNIVERSALSDK}" != "/"
7131 then
7132 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7133 fi
7134 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007135
Ned Deily87adb6e2013-10-18 21:09:56 -07007136 # Calculate an appropriate deployment target for this build:
7137 # The deployment target value is used explicitly to enable certain
7138 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007139 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007140 # component of the string returned by distutils.get_platform().
7141 #
7142 # Use the value from:
7143 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7144 # 2. the operating system version of the build machine if >= 10.6
7145 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7146 # below to pick either 10.3, 10.4, or 10.5 as the target.
7147 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007148
Ned Deily87adb6e2013-10-18 21:09:56 -07007149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7150$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007151 cur_target_major=`sw_vers -productVersion | \
7152 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7153 cur_target_minor=`sw_vers -productVersion | \
7154 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7155 cur_target="${cur_target_major}.${cur_target_minor}"
7156 if test ${cur_target_major} -eq 10 && \
7157 test ${cur_target_minor} -ge 3 && \
7158 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007159 then
Ned Deily36820b62014-06-25 13:44:22 -07007160 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007161 cur_target=10.3
7162 if test ${enable_universalsdk}
7163 then
7164 case "$UNIVERSAL_ARCHS" in
7165 all|3-way|intel|64-bit)
7166 # These configurations were first supported in 10.5
7167 cur_target='10.5'
7168 ;;
7169 esac
7170 else
7171 if test `/usr/bin/arch` = "i386"
7172 then
7173 # 10.4 was the first release to support Intel archs
7174 cur_target="10.4"
7175 fi
7176 fi
7177 fi
7178 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007179
Ned Deily87adb6e2013-10-18 21:09:56 -07007180 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7181 # environment with a value that is the same as what we'll use
7182 # in the Makefile to ensure that we'll get the same compiler
7183 # environment during configure and build time.
7184 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7185 export MACOSX_DEPLOYMENT_TARGET
7186 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7188$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007189
Ned Deily87adb6e2013-10-18 21:09:56 -07007190 # end of Darwin* tests
7191 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007192 esac
7193 ;;
7194
7195*)
7196 case $ac_sys_system in
7197 OpenUNIX*|UnixWare*)
7198 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7199 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007200 SCO_SV*)
7201 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7202 ;;
7203 esac
7204 ;;
7205esac
7206
Zachary Ware5af85642015-12-21 12:09:17 -06007207# ICC needs -fp-model strict or floats behave badly
7208case "$CC" in
7209*icc*)
7210 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7211 ;;
7212esac
7213
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007214if test "$Py_DEBUG" = 'true'; then
7215 :
7216else
7217 OPT="-DNDEBUG $OPT"
7218fi
7219
7220if test "$ac_arch_flags"
7221then
7222 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7223fi
7224
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007225# On some compilers, pthreads are available without further options
7226# (e.g. MacOS X). On some of these systems, the compiler will not
7227# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7228# So we have to see first whether pthreads are available without
7229# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7231$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007232if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007234else
Matthias Kloseb9621712010-04-24 17:59:49 +00007235 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007236 ac_cv_pthread_is_default=no
7237else
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239/* end confdefs.h. */
7240
Stefan Krah7dba5942012-11-22 22:49:11 +01007241#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242#include <pthread.h>
7243
7244void* routine(void* p){return NULL;}
7245
7246int main(){
7247 pthread_t p;
7248 if(pthread_create(&p,NULL,routine,NULL)!=0)
7249 return 1;
7250 (void)pthread_detach(p);
7251 return 0;
7252}
7253
7254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007255if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007256
7257 ac_cv_pthread_is_default=yes
7258 ac_cv_kthread=no
7259 ac_cv_pthread=no
7260
7261else
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7265 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266fi
7267
7268
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269fi
7270
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7272$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007273
7274
7275if test $ac_cv_pthread_is_default = yes
7276then
7277 ac_cv_kpthread=no
7278else
7279# -Kpthread, if available, provides the right #defines
7280# and linker options to make pthread_create available
7281# Some compilers won't report that they do not support -Kpthread,
7282# so we need to run a program to see whether it really made the
7283# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7285$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007286if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007287 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288else
7289 ac_save_cc="$CC"
7290CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007291if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292 ac_cv_kpthread=no
7293else
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295/* end confdefs.h. */
7296
Stefan Krah7dba5942012-11-22 22:49:11 +01007297#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298#include <pthread.h>
7299
7300void* routine(void* p){return NULL;}
7301
7302int main(){
7303 pthread_t p;
7304 if(pthread_create(&p,NULL,routine,NULL)!=0)
7305 return 1;
7306 (void)pthread_detach(p);
7307 return 0;
7308}
7309
7310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007311if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007312 ac_cv_kpthread=yes
7313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318fi
7319
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320CC="$ac_save_cc"
7321fi
7322
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7324$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007325fi
7326
7327if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7328then
7329# -Kthread, if available, provides the right #defines
7330# and linker options to make pthread_create available
7331# Some compilers won't report that they do not support -Kthread,
7332# so we need to run a program to see whether it really made the
7333# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7335$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007336if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338else
7339 ac_save_cc="$CC"
7340CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007341if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342 ac_cv_kthread=no
7343else
Matthias Kloseb9621712010-04-24 17:59:49 +00007344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345/* end confdefs.h. */
7346
Stefan Krah7dba5942012-11-22 22:49:11 +01007347#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348#include <pthread.h>
7349
7350void* routine(void* p){return NULL;}
7351
7352int main(){
7353 pthread_t p;
7354 if(pthread_create(&p,NULL,routine,NULL)!=0)
7355 return 1;
7356 (void)pthread_detach(p);
7357 return 0;
7358}
7359
7360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007361if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362 ac_cv_kthread=yes
7363else
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7367 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368fi
7369
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370CC="$ac_save_cc"
7371fi
7372
Matthias Kloseb9621712010-04-24 17:59:49 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7374$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375fi
7376
7377if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7378then
7379# -pthread, if available, provides the right #defines
7380# and linker options to make pthread_create available
7381# Some compilers won't report that they do not support -pthread,
7382# so we need to run a program to see whether it really made the
7383# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7385$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007386if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388else
7389 ac_save_cc="$CC"
7390CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007391if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392 ac_cv_pthread=no
7393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395/* end confdefs.h. */
7396
Stefan Krah7dba5942012-11-22 22:49:11 +01007397#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398#include <pthread.h>
7399
7400void* routine(void* p){return NULL;}
7401
7402int main(){
7403 pthread_t p;
7404 if(pthread_create(&p,NULL,routine,NULL)!=0)
7405 return 1;
7406 (void)pthread_detach(p);
7407 return 0;
7408}
7409
7410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007411if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412 ac_cv_pthread=yes
7413else
Matthias Kloseb9621712010-04-24 17:59:49 +00007414 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7417 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418fi
7419
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420CC="$ac_save_cc"
7421fi
7422
Matthias Kloseb9621712010-04-24 17:59:49 +00007423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7424$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425fi
7426
7427# If we have set a CC compiler flag for thread support then
7428# check if it works for CXX, too.
7429ac_cv_cxx_thread=no
7430if test ! -z "$CXX"
7431then
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7433$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434ac_save_cxx="$CXX"
7435
7436if test "$ac_cv_kpthread" = "yes"
7437then
7438 CXX="$CXX -Kpthread"
7439 ac_cv_cxx_thread=yes
7440elif test "$ac_cv_kthread" = "yes"
7441then
7442 CXX="$CXX -Kthread"
7443 ac_cv_cxx_thread=yes
7444elif test "$ac_cv_pthread" = "yes"
7445then
7446 CXX="$CXX -pthread"
7447 ac_cv_cxx_thread=yes
7448fi
7449
7450if test $ac_cv_cxx_thread = yes
7451then
7452 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7453 $CXX -c conftest.$ac_ext 2>&5
7454 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7455 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7456 then
7457 ac_cv_cxx_thread=yes
7458 else
7459 ac_cv_cxx_thread=no
7460 fi
7461 rm -fr conftest*
7462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7464$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465fi
7466CXX="$ac_save_cxx"
7467
7468
7469# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7471$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007472if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476/* end confdefs.h. */
7477#include <stdlib.h>
7478#include <stdarg.h>
7479#include <string.h>
7480#include <float.h>
7481
7482int
7483main ()
7484{
7485
7486 ;
7487 return 0;
7488}
7489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007490if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491 ac_cv_header_stdc=yes
7492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7496
7497if test $ac_cv_header_stdc = yes; then
7498 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500/* end confdefs.h. */
7501#include <string.h>
7502
7503_ACEOF
7504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 $EGREP "memchr" >/dev/null 2>&1; then :
7506
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507else
7508 ac_cv_header_stdc=no
7509fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007510rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511
7512fi
7513
7514if test $ac_cv_header_stdc = yes; then
7515 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517/* end confdefs.h. */
7518#include <stdlib.h>
7519
7520_ACEOF
7521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 $EGREP "free" >/dev/null 2>&1; then :
7523
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524else
7525 ac_cv_header_stdc=no
7526fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007527rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528
7529fi
7530
7531if test $ac_cv_header_stdc = yes; then
7532 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534 :
7535else
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537/* end confdefs.h. */
7538#include <ctype.h>
7539#include <stdlib.h>
7540#if ((' ' & 0x0FF) == 0x020)
7541# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7542# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7543#else
7544# define ISLOWER(c) \
7545 (('a' <= (c) && (c) <= 'i') \
7546 || ('j' <= (c) && (c) <= 'r') \
7547 || ('s' <= (c) && (c) <= 'z'))
7548# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7549#endif
7550
7551#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7552int
7553main ()
7554{
7555 int i;
7556 for (i = 0; i < 256; i++)
7557 if (XOR (islower (i), ISLOWER (i))
7558 || toupper (i) != TOUPPER (i))
7559 return 2;
7560 return 0;
7561}
7562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007563if ac_fn_c_try_run "$LINENO"; then :
7564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565else
Matthias Kloseb9621712010-04-24 17:59:49 +00007566 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570fi
7571
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572fi
7573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7575$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576if test $ac_cv_header_stdc = yes; then
7577
Matthias Kloseb9621712010-04-24 17:59:49 +00007578$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579
7580fi
7581
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007582for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007583fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007584ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007585sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007586unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007587poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007588sys/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 +01007589sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007590sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007591sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007592sys/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 -07007593libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007594bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007595sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007596do :
7597 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7598ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007599if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007601#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602_ACEOF
7603
7604fi
7605
Guido van Rossum627b2d71993-12-24 10:39:16 +00007606done
7607
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007608ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007609for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7612$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007613if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007617/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007618#include <sys/types.h>
7619#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007620
Martin v. Löwis11437992002-04-12 09:54:03 +00007621int
7622main ()
7623{
7624if ((DIR *) 0)
7625return 0;
7626 ;
7627 return 0;
7628}
7629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007631 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007637eval ac_res=\$$as_ac_Header
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7639$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007640if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007642#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007643_ACEOF
7644
7645ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007646fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007648done
7649# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7650if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7652$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007653if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007655else
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660/* Override any GCC internal prototype to avoid an error.
7661 Use char because int might match the return type of a GCC
7662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007663#ifdef __cplusplus
7664extern "C"
7665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007666char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007667int
7668main ()
7669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 ;
7672 return 0;
7673}
7674_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675for ac_lib in '' dir; do
7676 if test -z "$ac_lib"; then
7677 ac_res="none required"
7678 else
7679 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007680 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007683 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007685rm -f core conftest.err conftest.$ac_objext \
7686 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007687 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690done
Victor Stinnere0be4232011-10-25 13:06:09 +02007691if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693else
7694 ac_cv_search_opendir=no
7695fi
7696rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007697LIBS=$ac_func_search_save_LIBS
7698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7700$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007702if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007704
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007705fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007706
Michael W. Hudson54241132001-12-07 15:38:26 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7709$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007710if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007712else
7713 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717/* Override any GCC internal prototype to avoid an error.
7718 Use char because int might match the return type of a GCC
7719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007720#ifdef __cplusplus
7721extern "C"
7722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007723char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007724int
7725main ()
7726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 ;
7729 return 0;
7730}
7731_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732for ac_lib in '' x; do
7733 if test -z "$ac_lib"; then
7734 ac_res="none required"
7735 else
7736 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007737 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742rm -f core conftest.err conftest.$ac_objext \
7743 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007744 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747done
Victor Stinnere0be4232011-10-25 13:06:09 +02007748if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750else
7751 ac_cv_search_opendir=no
7752fi
7753rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007754LIBS=$ac_func_search_save_LIBS
7755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7757$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007759if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007761
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762fi
7763
7764fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007765
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7767$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007768if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007770else
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007772/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007773#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007774int
7775main ()
7776{
7777return makedev(0, 0);
7778 ;
7779 return 0;
7780}
7781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007782if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007783 ac_cv_header_sys_types_h_makedev=yes
7784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007787rm -f core conftest.err conftest.$ac_objext \
7788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007789
7790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7792$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007793
7794if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007795ac_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 +02007796if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007797
Matthias Kloseb9621712010-04-24 17:59:49 +00007798$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007799
7800fi
7801
7802
7803
7804 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 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 +02007806if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007807
Matthias Kloseb9621712010-04-24 17:59:49 +00007808$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007809
7810fi
7811
7812
7813 fi
7814fi
7815
Michael W. Hudson54241132001-12-07 15:38:26 +00007816
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007817# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7818for ac_header in net/if.h
7819do :
7820 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7821#ifdef STDC_HEADERS
7822# include <stdlib.h>
7823# include <stddef.h>
7824#else
7825# ifdef HAVE_STDLIB_H
7826# include <stdlib.h>
7827# endif
7828#endif
7829#ifdef HAVE_SYS_SOCKET_H
7830# include <sys/socket.h>
7831#endif
7832
7833"
Victor Stinnere0be4232011-10-25 13:06:09 +02007834if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007835 cat >>confdefs.h <<_ACEOF
7836#define HAVE_NET_IF_H 1
7837_ACEOF
7838
7839fi
7840
7841done
7842
7843
Martin v. Löwis11017b12006-01-14 18:12:57 +00007844# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007845for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007846do :
7847 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 +00007848#ifdef HAVE_ASM_TYPES_H
7849#include <asm/types.h>
7850#endif
7851#ifdef HAVE_SYS_SOCKET_H
7852#include <sys/socket.h>
7853#endif
7854
Matthias Kloseb9621712010-04-24 17:59:49 +00007855"
Victor Stinnere0be4232011-10-25 13:06:09 +02007856if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007857 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007858#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007859_ACEOF
7860
7861fi
7862
7863done
7864
7865
Charles-François Natali47413c12011-10-06 19:47:44 +02007866# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007867for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007868do :
7869 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7870ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7871#ifdef HAVE_SYS_SOCKET_H
7872#include <sys/socket.h>
7873#endif
7874
7875"
7876if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7877 cat >>confdefs.h <<_ACEOF
7878#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7879_ACEOF
7880
7881fi
7882
7883done
7884
7885
Guido van Rossum627b2d71993-12-24 10:39:16 +00007886# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007887was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7889$as_echo_n "checking for clock_t in time.h... " >&6; }
7890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007891/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007892#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007893
7894_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007897 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007898else
Martin v. Löwis11437992002-04-12 09:54:03 +00007899
7900
Matthias Kloseb9621712010-04-24 17:59:49 +00007901$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007902
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007903
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007905rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7908$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7911$as_echo_n "checking for makedev... " >&6; }
7912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007914
Jesus Cea740f53a2010-04-28 11:35:30 +00007915#if defined(MAJOR_IN_MKDEV)
7916#include <sys/mkdev.h>
7917#elif defined(MAJOR_IN_SYSMACROS)
7918#include <sys/sysmacros.h>
7919#else
7920#include <sys/types.h>
7921#endif
7922
Neal Norwitz11690112002-07-30 01:08:28 +00007923int
7924main ()
7925{
Jesus Cea740f53a2010-04-28 11:35:30 +00007926
7927 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007928 ;
7929 return 0;
7930}
Matthias Kloseb159a552010-04-25 21:00:44 +00007931
Neal Norwitz11690112002-07-30 01:08:28 +00007932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007933if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007934 ac_cv_has_makedev=yes
7935else
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938rm -f core conftest.err conftest.$ac_objext \
7939 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7941$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007942if test "$ac_cv_has_makedev" = "yes"; then
7943
Matthias Kloseb9621712010-04-24 17:59:49 +00007944$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007945
7946fi
7947
Christian Heimes985ecdc2013-11-20 11:46:18 +01007948# byte swapping
7949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7950$as_echo_n "checking for le64toh... " >&6; }
7951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7952/* end confdefs.h. */
7953
7954#ifdef HAVE_ENDIAN_H
7955#include <endian.h>
7956#elif defined(HAVE_SYS_ENDIAN_H)
7957#include <sys/endian.h>
7958#endif
7959
7960int
7961main ()
7962{
7963
7964 le64toh(1)
7965 ;
7966 return 0;
7967}
7968
7969_ACEOF
7970if ac_fn_c_try_link "$LINENO"; then :
7971 ac_cv_has_le64toh=yes
7972else
7973 ac_cv_has_le64toh=no
7974fi
7975rm -f core conftest.err conftest.$ac_objext \
7976 conftest$ac_exeext conftest.$ac_ext
7977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7978$as_echo "$ac_cv_has_le64toh" >&6; }
7979if test "$ac_cv_has_le64toh" = "yes"; then
7980
7981$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7982
7983fi
7984
Martin v. Löwis399a6892002-10-04 10:22:02 +00007985# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7986# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7987# defined, but the compiler does not support pragma redefine_extname,
7988# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7989# structures (such as rlimit64) without declaring them. As a
7990# work-around, disable LFS on such configurations
7991
7992use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7994$as_echo_n "checking Solaris LFS bug... " >&6; }
7995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007996/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007997
7998#define _LARGEFILE_SOURCE 1
7999#define _FILE_OFFSET_BITS 64
8000#include <sys/resource.h>
8001
Martin v. Löwis399a6892002-10-04 10:22:02 +00008002int
8003main ()
8004{
8005struct rlimit foo;
8006 ;
8007 return 0;
8008}
8009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008010if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008011 sol_lfs_bug=no
8012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8017$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008018if test "$sol_lfs_bug" = "yes"; then
8019 use_lfs=no
8020fi
8021
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008022# Don't use largefile support for GNU/Hurd
8023case $ac_sys_system in GNU*)
8024 use_lfs=no
8025esac
8026
Martin v. Löwis399a6892002-10-04 10:22:02 +00008027if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008028# Two defines needed to enable largefile support on various platforms
8029# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008030case $ac_sys_system/$ac_sys_release in
8031AIX*)
8032
8033$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8034
8035 ;;
8036esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008039
8040
Matthias Kloseb9621712010-04-24 17:59:49 +00008041$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008042
Martin v. Löwis399a6892002-10-04 10:22:02 +00008043fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008044
Guido van Rossum84e7b241996-08-19 21:59:00 +00008045# Add some code to confdefs.h so that the test for off_t works on SCO
8046cat >> confdefs.h <<\EOF
8047#if defined(SCO_DS)
8048#undef _OFF_T
8049#endif
8050EOF
8051
Guido van Rossumef2255b2000-03-10 22:30:29 +00008052# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008053ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008054if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008055
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008056else
Martin v. Löwis11437992002-04-12 09:54:03 +00008057
8058cat >>confdefs.h <<_ACEOF
8059#define mode_t int
8060_ACEOF
8061
8062fi
8063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008065if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008067else
Martin v. Löwis11437992002-04-12 09:54:03 +00008068
8069cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008071_ACEOF
8072
8073fi
8074
Matthias Kloseb9621712010-04-24 17:59:49 +00008075ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008076if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008078else
Martin v. Löwis11437992002-04-12 09:54:03 +00008079
8080cat >>confdefs.h <<_ACEOF
8081#define pid_t int
8082_ACEOF
8083
8084fi
8085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008086
Martin v. Löwis11437992002-04-12 09:54:03 +00008087cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008088#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008089_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008092if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008094else
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
8096cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008098_ACEOF
8099
8100fi
8101
Matthias Kloseb9621712010-04-24 17:59:49 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8103$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008104if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008106else
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008108/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008109#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110
8111_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114 ac_cv_type_uid_t=yes
8115else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116 ac_cv_type_uid_t=no
8117fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008118rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8122$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008123if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008124
Matthias Kloseb9621712010-04-24 17:59:49 +00008125$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008126
8127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008129
8130fi
8131
Mark Dickinson983bc162012-12-02 12:11:38 +00008132
8133# There are two separate checks for each of the exact-width integer types we
8134# need. First we check whether the type is available using the usual
8135# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8136# and <stdint.h> where available). We then also use the special type checks of
8137# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8138# directly, #define's uint32_t to be a suitable type.
8139
8140ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8141if test "x$ac_cv_type_uint32_t" = xyes; then :
8142
8143$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8144
8145fi
8146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8148case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008149 no|yes) ;; #(
8150 *)
8151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008153
8154
8155cat >>confdefs.h <<_ACEOF
8156#define uint32_t $ac_cv_c_uint32_t
8157_ACEOF
8158;;
8159 esac
8160
Mark Dickinson983bc162012-12-02 12:11:38 +00008161
8162ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8163if test "x$ac_cv_type_uint64_t" = xyes; then :
8164
8165$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8166
8167fi
8168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8170case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008171 no|yes) ;; #(
8172 *)
8173
Matthias Kloseb9621712010-04-24 17:59:49 +00008174$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008175
8176
8177cat >>confdefs.h <<_ACEOF
8178#define uint64_t $ac_cv_c_uint64_t
8179_ACEOF
8180;;
8181 esac
8182
Mark Dickinson983bc162012-12-02 12:11:38 +00008183
8184ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8185if test "x$ac_cv_type_int32_t" = xyes; then :
8186
8187$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8188
8189fi
8190
Matthias Kloseb9621712010-04-24 17:59:49 +00008191ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8192case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008193 no|yes) ;; #(
8194 *)
8195
8196cat >>confdefs.h <<_ACEOF
8197#define int32_t $ac_cv_c_int32_t
8198_ACEOF
8199;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008200esac
8201
Mark Dickinson983bc162012-12-02 12:11:38 +00008202
8203ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8204if test "x$ac_cv_type_int64_t" = xyes; then :
8205
8206$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8207
8208fi
8209
Matthias Kloseb9621712010-04-24 17:59:49 +00008210ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8211case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008212 no|yes) ;; #(
8213 *)
8214
8215cat >>confdefs.h <<_ACEOF
8216#define int64_t $ac_cv_c_int64_t
8217_ACEOF
8218;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008219esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008220
Mark Dickinson983bc162012-12-02 12:11:38 +00008221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008223if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008226
8227fi
8228
Stefan Krah1919b7e2012-03-21 18:25:23 +01008229ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8230if test "x$ac_cv_type___uint128_t" = xyes; then :
8231
8232$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8233
8234fi
8235
Jack Jansendd19cf82001-12-06 22:36:17 +00008236
Michael W. Hudson54241132001-12-07 15:38:26 +00008237# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008238# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239# The cast to long int works around a bug in the HP C Compiler
8240# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8241# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8242# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8244$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008245if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008247else
Matthias Kloseb9621712010-04-24 17:59:49 +00008248 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 +00008249
Martin v. Löwis11437992002-04-12 09:54:03 +00008250else
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 if test "$ac_cv_type_int" = yes; then
8252 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008254as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008255See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 else
8257 ac_cv_sizeof_int=0
8258 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260
Martin v. Löwis11437992002-04-12 09:54:03 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8263$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264
8265
8266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008269_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270
8271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272# The cast to long int works around a bug in the HP C Compiler
8273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8275# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8277$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008278if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008280else
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 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 +00008282
Martin v. Löwis11437992002-04-12 09:54:03 +00008283else
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 if test "$ac_cv_type_long" = yes; then
8285 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008287as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008288See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289 else
8290 ac_cv_sizeof_long=0
8291 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008293
Martin v. Löwis11437992002-04-12 09:54:03 +00008294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8296$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297
8298
8299
Martin v. Löwis11437992002-04-12 09:54:03 +00008300cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008301#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008303
8304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305# The cast to long int works around a bug in the HP C Compiler
8306# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8307# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8308# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8310$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008311if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008313else
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 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 +00008315
Martin v. Löwis11437992002-04-12 09:54:03 +00008316else
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 if test "$ac_cv_type_void_p" = yes; then
8318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008320as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008321See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322 else
8323 ac_cv_sizeof_void_p=0
8324 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008326
Martin v. Löwis11437992002-04-12 09:54:03 +00008327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8329$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330
8331
8332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008334#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008335_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008336
8337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008338# The cast to long int works around a bug in the HP C Compiler
8339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8341# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8343$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008344if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008346else
Matthias Kloseb9621712010-04-24 17:59:49 +00008347 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 +00008348
Martin v. Löwis11437992002-04-12 09:54:03 +00008349else
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 if test "$ac_cv_type_short" = yes; then
8351 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8352$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008353as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008354See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355 else
8356 ac_cv_sizeof_short=0
8357 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8362$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363
8364
8365
Martin v. Löwis11437992002-04-12 09:54:03 +00008366cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008367#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008368_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008369
8370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371# The cast to long int works around a bug in the HP C Compiler
8372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8374# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8376$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008377if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008379else
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 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 +00008381
Martin v. Löwis11437992002-04-12 09:54:03 +00008382else
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 if test "$ac_cv_type_float" = yes; then
8384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008386as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008387See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388 else
8389 ac_cv_sizeof_float=0
8390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392
Martin v. Löwis11437992002-04-12 09:54:03 +00008393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8395$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396
8397
8398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008400#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008401_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008402
8403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404# The cast to long int works around a bug in the HP C Compiler
8405# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8406# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8407# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8409$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008410if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008412else
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 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 +00008414
Martin v. Löwis11437992002-04-12 09:54:03 +00008415else
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 if test "$ac_cv_type_double" = yes; then
8417 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008419as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008420See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421 else
8422 ac_cv_sizeof_double=0
8423 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8428$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429
8430
8431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008433#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008434_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008435
8436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437# The cast to long int works around a bug in the HP C Compiler
8438# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8439# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8440# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8442$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008443if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008445else
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 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 +00008447
Martin v. Löwis11437992002-04-12 09:54:03 +00008448else
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 if test "$ac_cv_type_fpos_t" = yes; then
8450 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008452as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008453See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454 else
8455 ac_cv_sizeof_fpos_t=0
8456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008458
Martin v. Löwis11437992002-04-12 09:54:03 +00008459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8461$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008462
8463
8464
Martin v. Löwis11437992002-04-12 09:54:03 +00008465cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008466#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008467_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008468
Michael W. Hudson54241132001-12-07 15:38:26 +00008469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470# The cast to long int works around a bug in the HP C Compiler
8471# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8472# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8473# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8475$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008476if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008478else
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 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 +00008480
Martin v. Löwis18e16552006-02-15 17:27:45 +00008481else
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 if test "$ac_cv_type_size_t" = yes; then
8483 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008485as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008486See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 else
8488 ac_cv_sizeof_size_t=0
8489 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491
Martin v. Löwis18e16552006-02-15 17:27:45 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8494$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495
8496
8497
Martin v. Löwis18e16552006-02-15 17:27:45 +00008498cat >>confdefs.h <<_ACEOF
8499#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8500_ACEOF
8501
8502
Christian Heimes400adb02008-02-01 08:12:03 +00008503# The cast to long int works around a bug in the HP C Compiler
8504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8506# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8508$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008509if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008511else
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 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 +00008513
Christian Heimes400adb02008-02-01 08:12:03 +00008514else
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 if test "$ac_cv_type_pid_t" = yes; then
8516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008518as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008519See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008520 else
8521 ac_cv_sizeof_pid_t=0
8522 fi
8523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524
Christian Heimes400adb02008-02-01 08:12:03 +00008525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8527$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008528
8529
8530
8531cat >>confdefs.h <<_ACEOF
8532#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8533_ACEOF
8534
8535
Michael W. Hudson54241132001-12-07 15:38:26 +00008536
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8538$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008539have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008541/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543int
8544main ()
8545{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008546long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ;
8548 return 0;
8549}
8550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008552
8553
Matthias Kloseb9621712010-04-24 17:59:49 +00008554$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008556 have_long_long=yes
8557
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8561$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008562if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563# The cast to long int works around a bug in the HP C Compiler
8564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8566# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8568$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008569if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008571else
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 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 +00008573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 if test "$ac_cv_type_long_long" = yes; then
8576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008578as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008579See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580 else
8581 ac_cv_sizeof_long_long=0
8582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8587$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588
8589
8590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008592#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008593_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008594
Michael W. Hudson54241132001-12-07 15:38:26 +00008595
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008596fi
8597
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8599$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008600have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008602/* end confdefs.h. */
8603
8604int
8605main ()
8606{
8607long double x; x = (long double)0;
8608 ;
8609 return 0;
8610}
8611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008612if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008613
8614
Matthias Kloseb9621712010-04-24 17:59:49 +00008615$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008616
8617 have_long_double=yes
8618
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008619fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8622$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008623if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008624# The cast to long int works around a bug in the HP C Compiler
8625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8627# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8629$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008630if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 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 +00008634
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008635else
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 if test "$ac_cv_type_long_double" = yes; then
8637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008639as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008640See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008641 else
8642 ac_cv_sizeof_long_double=0
8643 fi
8644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8648$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008649
8650
8651
8652cat >>confdefs.h <<_ACEOF
8653#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8654_ACEOF
8655
8656
8657fi
8658
8659
Matthias Kloseb9621712010-04-24 17:59:49 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8661$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008662have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008664/* end confdefs.h. */
8665
8666int
8667main ()
8668{
8669_Bool x; x = (_Bool)0;
8670 ;
8671 return 0;
8672}
8673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008674if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008675
8676
Matthias Kloseb9621712010-04-24 17:59:49 +00008677$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008678
8679 have_c99_bool=yes
8680
Thomas Woutersb2137042007-02-01 18:02:27 +00008681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8684$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008685if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686# The cast to long int works around a bug in the HP C Compiler
8687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8691$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008692if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 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 +00008696
Thomas Woutersb2137042007-02-01 18:02:27 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 if test "$ac_cv_type__Bool" = yes; then
8699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008701as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008702See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703 else
8704 ac_cv_sizeof__Bool=0
8705 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707
Thomas Woutersb2137042007-02-01 18:02:27 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8710$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711
8712
8713
Thomas Woutersb2137042007-02-01 18:02:27 +00008714cat >>confdefs.h <<_ACEOF
8715#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8716_ACEOF
8717
8718
8719fi
8720
Matthias Kloseb9621712010-04-24 17:59:49 +00008721ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008722 #include <stdint.h>
8723 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008724 #ifdef HAVE_INTTYPES_H
8725 #include <inttypes.h>
8726 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008727"
Victor Stinnere0be4232011-10-25 13:06:09 +02008728if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008729
8730cat >>confdefs.h <<_ACEOF
8731#define HAVE_UINTPTR_T 1
8732_ACEOF
8733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734# The cast to long int works around a bug in the HP C Compiler
8735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8739$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008740if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008742else
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 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 +00008744
Martin v. Löwis11437992002-04-12 09:54:03 +00008745else
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 if test "$ac_cv_type_uintptr_t" = yes; then
8747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008749as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008750See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008751 else
8752 ac_cv_sizeof_uintptr_t=0
8753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8758$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759
8760
8761
Martin v. Löwis11437992002-04-12 09:54:03 +00008762cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008763#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008764_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008765
Michael W. Hudson54241132001-12-07 15:38:26 +00008766
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008767fi
8768
Thomas Wouters89f507f2006-12-13 04:49:30 +00008769
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008770# The cast to long int works around a bug in the HP C Compiler
8771# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8772# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8773# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8775$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008776if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008778else
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780#ifdef HAVE_SYS_TYPES_H
8781#include <sys/types.h>
8782#endif
8783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008785
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008786else
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 if test "$ac_cv_type_off_t" = yes; then
8788 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8789$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008790as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008791See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008792 else
8793 ac_cv_sizeof_off_t=0
8794 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8799$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008800
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008801
8802
Martin v. Löwis11437992002-04-12 09:54:03 +00008803cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008804#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008805_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008806
Michael W. Hudson54241132001-12-07 15:38:26 +00008807
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008808
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8810$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008811if test "$have_long_long" = yes
8812then
8813if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008814 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008817
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8819$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008820else
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008823fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008824else
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008827fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008828
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829# The cast to long int works around a bug in the HP C Compiler
8830# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8831# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8832# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8834$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008835if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837else
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839#ifdef HAVE_SYS_TYPES_H
8840#include <sys/types.h>
8841#endif
8842#ifdef HAVE_TIME_H
8843#include <time.h>
8844#endif
8845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 if test "$ac_cv_type_time_t" = yes; then
8850 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008852as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008853See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854 else
8855 ac_cv_sizeof_time_t=0
8856 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8861$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008862
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863
8864
Martin v. Löwis11437992002-04-12 09:54:03 +00008865cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008866#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008867_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008868
Michael W. Hudson54241132001-12-07 15:38:26 +00008869
8870
Trent Mick635f6fb2000-08-23 21:33:05 +00008871# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008872ac_save_cc="$CC"
8873if test "$ac_cv_kpthread" = "yes"
8874then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008875elif test "$ac_cv_kthread" = "yes"
8876then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008877elif test "$ac_cv_pthread" = "yes"
8878then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008879fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880
Matthias Kloseb9621712010-04-24 17:59:49 +00008881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8882$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008883have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008885/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
8887 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008888int
8889main ()
8890{
Guido van Rossum12580492000-09-24 16:47:19 +00008891pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ;
8893 return 0;
8894}
Matthias Kloseb159a552010-04-25 21:00:44 +00008895
Martin v. Löwis11437992002-04-12 09:54:03 +00008896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008897if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008898 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8902$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008903if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008905# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8906# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8907# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8909$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008910if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008912else
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914#ifdef HAVE_PTHREAD_H
8915#include <pthread.h>
8916#endif
8917
Matthias Kloseb9621712010-04-24 17:59:49 +00008918"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008919
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008920else
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 if test "$ac_cv_type_pthread_t" = yes; then
8922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008924as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008925See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926 else
8927 ac_cv_sizeof_pthread_t=0
8928 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008930
Trent Mick635f6fb2000-08-23 21:33:05 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8933$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008934
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008935
8936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008938#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008939_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008940
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008941
Trent Mick635f6fb2000-08-23 21:33:05 +00008942fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008943CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008944
Michael W. Hudson54241132001-12-07 15:38:26 +00008945
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008946case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008947 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008948 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8949 ;;
8950 Darwin/*)
8951 OTHER_LIBTOOL_OPT=""
8952 ;;
8953esac
8954
8955
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008956
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008957case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008958 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008959 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8960 if test "${enable_universalsdk}"; then
8961 :
8962 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008963 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008964 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008965 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008966 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008967 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008968 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008969 if test ${gcc_version} '<' 4.0
8970 then
8971 LIBTOOL_CRUFT="-lcc_dynamic"
8972 else
8973 LIBTOOL_CRUFT=""
8974 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008976 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008977else
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008979/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008980
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008981 #include <unistd.h>
8982 int main(int argc, char*argv[])
8983 {
8984 if (sizeof(long) == 4) {
8985 return 0;
8986 } else {
8987 return 1;
8988 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008989 }
8990
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008992if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008993 ac_osx_32bit=yes
8994else
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008999fi
9000
9001
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009002 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009003 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009004 i386)
9005 MACOSX_DEFAULT_ARCH="i386"
9006 ;;
9007 ppc)
9008 MACOSX_DEFAULT_ARCH="ppc"
9009 ;;
9010 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009011 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009012 ;;
9013 esac
9014 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009015 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009016 i386)
9017 MACOSX_DEFAULT_ARCH="x86_64"
9018 ;;
9019 ppc)
9020 MACOSX_DEFAULT_ARCH="ppc64"
9021 ;;
9022 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009023 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009024 ;;
9025 esac
9026
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009027 fi
9028
9029 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009030 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009031 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009032esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9034$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009035if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009036then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009037 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009039 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009040
Matthias Kloseb9621712010-04-24 17:59:49 +00009041$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009042
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9044$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009045 if test $enable_shared = "yes"
9046 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009047 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 +00009048 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009049else
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9051$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009052fi
9053
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9055$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009056case $ac_sys_system/$ac_sys_release in
9057 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9062$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009063 ;;
9064 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9066$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009067 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009068esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009069
Guido van Rossum0a516c91994-09-12 10:58:40 +00009070# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009071
Michael W. Hudson54241132001-12-07 15:38:26 +00009072
9073
9074
9075
Benjamin Peterson99f03762010-04-11 22:15:28 +00009076
Thomas Wouters477c8d52006-05-27 19:21:47 +00009077
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009078# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9079# -- usually .so, .sl on HP-UX, .dll on Cygwin
9080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9081$as_echo_n "checking the extension of shared libraries... " >&6; }
9082if test -z "$SHLIB_SUFFIX"; then
9083 case $ac_sys_system in
9084 hp*|HP*)
9085 case `uname -m` in
9086 ia64) SHLIB_SUFFIX=.so;;
9087 *) SHLIB_SUFFIX=.sl;;
9088 esac
9089 ;;
9090 CYGWIN*) SHLIB_SUFFIX=.dll;;
9091 *) SHLIB_SUFFIX=.so;;
9092 esac
9093fi
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9095$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009096
Guido van Rossum0a516c91994-09-12 10:58:40 +00009097# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009098# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099# (Shared libraries in this instance are shared modules to be loaded into
9100# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9102$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009103if test -z "$LDSHARED"
9104then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009105 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009106 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009107 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009108 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009109 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009110 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009111 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009113 if test "$GCC" = "yes" ; then
9114 LDSHARED='$(CC) -shared'
9115 LDCXXSHARED='$(CXX) -shared'
9116 else
9117 LDSHARED='$(CC) -G'
9118 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009119 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009120 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009121 if test "$GCC" = "yes" ; then
9122 LDSHARED='$(CC) -shared'
9123 LDCXXSHARED='$(CXX) -shared'
9124 else
9125 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009126 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009127 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009128 LDSHARED='$(CC) -bundle'
9129 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009130 if test "$enable_framework" ; then
9131 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009132 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9133 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009134 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009135 else
9136 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009137 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009138 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009139 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009140 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009141 LDSHARED='$(CC) -bundle'
9142 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009143 if test "$enable_framework" ; then
9144 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009145 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9146 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009147 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009148 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009149 # No framework, use the Python app as bundle-loader
9150 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009151 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009152 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009153 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009154 Darwin/*)
9155 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9156 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009157
Ned Deily36820b62014-06-25 13:44:22 -07009158 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9159 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9160 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9161 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9162 if test ${dep_target_major} -eq 10 && \
9163 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009164 then
Ned Deily36820b62014-06-25 13:44:22 -07009165 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009166 LDSHARED='$(CC) -bundle'
9167 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009168 if test "$enable_framework" ; then
9169 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009170 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9171 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009172 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009173 else
9174 # No framework, use the Python app as bundle-loader
9175 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9176 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009177 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009178 fi
Ned Deily36820b62014-06-25 13:44:22 -07009179 else
9180 # building for OS X 10.3 and later
9181 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9182 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9183 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009184 fi
9185 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009186 Linux*|GNU*|QNX*)
9187 LDSHARED='$(CC) -shared'
9188 LDCXXSHARED='$(CXX) -shared';;
9189 BSD/OS*/4*)
9190 LDSHARED="gcc -shared"
9191 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009192 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009193 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009194 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009195 LDSHARED='$(CC) -shared'
9196 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009197 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009198 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009199 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009200 OpenBSD*)
9201 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9202 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009203 LDSHARED='$(CC) -shared $(CCSHARED)'
9204 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009205 else
9206 case `uname -r` in
9207 [01].* | 2.[0-7] | 2.[0-7].*)
9208 LDSHARED="ld -Bshareable ${LDFLAGS}"
9209 ;;
9210 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009211 LDSHARED='$(CC) -shared $(CCSHARED)'
9212 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009213 ;;
9214 esac
9215 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009216 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009217 LDSHARED='$(CC) -shared'
9218 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009219 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009220 if test "$GCC" = "yes" ; then
9221 LDSHARED='$(CC) -shared'
9222 LDCXXSHARED='$(CXX) -shared'
9223 else
9224 LDSHARED='$(CC) -G'
9225 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009226 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 SCO_SV*)
9228 LDSHARED='$(CC) -Wl,-G,-Bexport'
9229 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9230 CYGWIN*)
9231 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9232 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009233 *) LDSHARED="ld";;
9234 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9237$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009238LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009239BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009241# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9243$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009244if test -z "$CCSHARED"
9245then
Guido van Rossum07397971997-04-29 21:49:50 +00009246 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009247 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009248 then CCSHARED="-fPIC";
9249 elif test `uname -p` = sparc;
9250 then CCSHARED="-xcode=pic32";
9251 else CCSHARED="-Kpic";
9252 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009253 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009254 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009255 else CCSHARED="+z";
9256 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009257 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009258 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009259 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009260 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009261 if test "$GCC" = "yes"
9262 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009263 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009264 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009265 SCO_SV*)
9266 if test "$GCC" = "yes"
9267 then CCSHARED="-fPIC"
9268 else CCSHARED="-Kpic -belf"
9269 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009270 IRIX*/6*) case $CC in
9271 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009272 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009273 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009274 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9277$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009279# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9281$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009282if test -z "$LINKFORSHARED"
9283then
Guido van Rossum07397971997-04-29 21:49:50 +00009284 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009285 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009286 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009287 LINKFORSHARED="-Wl,-E -Wl,+s";;
9288# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009289 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009290 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009291 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009293 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009294
9295 # Issue #18075: the default maximum stack size (8MBytes) is too
9296 # small for the default recursion limit. Increase the stack size
9297 # to ensure that tests don't crash
9298 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9299
Jack Jansene578a632001-08-15 01:27:14 +00009300 if test "$enable_framework"
9301 then
Jack Jansenda49e192005-01-07 13:08:22 +00009302 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009303 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009304 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009305 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009306 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009307 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009308 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009309 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9310 then
9311 LINKFORSHARED="-Wl,--export-dynamic"
9312 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009313 SunOS/5*) case $CC in
9314 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009315 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009316 then
9317 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009318 fi;;
9319 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009320 CYGWIN*)
9321 if test $enable_shared = "no"
9322 then
9323 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9324 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009325 QNX*)
9326 # -Wl,-E causes the symbols to be added to the dynamic
9327 # symbol table so that they can be found when a module
9328 # is loaded. -N 2048K causes the stack size to be set
9329 # to 2048 kilobytes so that the stack doesn't overflow
9330 # when running test_compile.py.
9331 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9335$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336
Michael W. Hudson54241132001-12-07 15:38:26 +00009337
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009338
Matthias Kloseb9621712010-04-24 17:59:49 +00009339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9340$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009341if test ! "$LIBRARY" = "$LDLIBRARY"
9342then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009343 case $ac_sys_system in
9344 CYGWIN*)
9345 # Cygwin needs CCSHARED when building extension DLLs
9346 # but not when building the interpreter DLL.
9347 CFLAGSFORSHARED='';;
9348 *)
9349 CFLAGSFORSHARED='$(CCSHARED)'
9350 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9353$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009354
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009355# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9356# library (with --enable-shared).
9357# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009358# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9359# if it is not required, since it creates a dependency of the shared library
9360# to LIBS. This, in turn, means that applications linking the shared libpython
9361# don't need to link LIBS explicitly. The default should be only changed
9362# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9365$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009366case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009367 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009368 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009369esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9371$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009372
9373
Guido van Rossum627b2d71993-12-24 10:39:16 +00009374# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9376$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009377if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009378 $as_echo_n "(cached) " >&6
9379else
9380 ac_check_lib_save_LIBS=$LIBS
9381LIBS="-lsendfile $LIBS"
9382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9383/* end confdefs.h. */
9384
9385/* Override any GCC internal prototype to avoid an error.
9386 Use char because int might match the return type of a GCC
9387 builtin and then its argument prototype would still apply. */
9388#ifdef __cplusplus
9389extern "C"
9390#endif
9391char sendfile ();
9392int
9393main ()
9394{
9395return sendfile ();
9396 ;
9397 return 0;
9398}
9399_ACEOF
9400if ac_fn_c_try_link "$LINENO"; then :
9401 ac_cv_lib_sendfile_sendfile=yes
9402else
9403 ac_cv_lib_sendfile_sendfile=no
9404fi
9405rm -f core conftest.err conftest.$ac_objext \
9406 conftest$ac_exeext conftest.$ac_ext
9407LIBS=$ac_check_lib_save_LIBS
9408fi
9409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9410$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009411if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009412 cat >>confdefs.h <<_ACEOF
9413#define HAVE_LIBSENDFILE 1
9414_ACEOF
9415
9416 LIBS="-lsendfile $LIBS"
9417
9418fi
9419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9421$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009422if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009423 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009424else
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009426LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430/* Override any GCC internal prototype to avoid an error.
9431 Use char because int might match the return type of a GCC
9432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009433#ifdef __cplusplus
9434extern "C"
9435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009436char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009437int
9438main ()
9439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009440return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009447else
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009450rm -f core conftest.err conftest.$ac_objext \
9451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009452LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9455$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009456if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 cat >>confdefs.h <<_ACEOF
9458#define HAVE_LIBDL 1
9459_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009460
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009461 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009463fi
9464 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9466$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009467if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +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="-ldld $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 shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009482int
9483main ()
9484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485return shl_load ();
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_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009492else
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +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 Rossum627b2d71993-12-24 10:39:16 +00009498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9500$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009501if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 cat >>confdefs.h <<_ACEOF
9503#define HAVE_LIBDLD 1
9504_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009505
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009506 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508fi
9509 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009510
Georg Brandlb1441c72009-01-03 22:33:39 +00009511# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009512if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9514$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009515if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009516 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009517else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009518 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522/* Override any GCC internal prototype to avoid an error.
9523 Use char because int might match the return type of a GCC
9524 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525#ifdef __cplusplus
9526extern "C"
9527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009528char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009529int
9530main ()
9531{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 ;
9534 return 0;
9535}
9536_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537for ac_lib in '' pthread rt posix4; do
9538 if test -z "$ac_lib"; then
9539 ac_res="none required"
9540 else
9541 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009542 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009545 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009547rm -f core conftest.err conftest.$ac_objext \
9548 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009549 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552done
Victor Stinnere0be4232011-10-25 13:06:09 +02009553if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555else
9556 ac_cv_search_sem_init=no
9557fi
9558rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009559LIBS=$ac_func_search_save_LIBS
9560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9562$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009564if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009566
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009567fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009568 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009569 # posix4 on Solaris 2.6
9570 # pthread (first!) on Linux
9571fi
9572
Martin v. Löwis19d17342003-06-14 21:03:05 +00009573# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9575$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009576if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009578else
9579 ac_check_lib_save_LIBS=$LIBS
9580LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009582/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584/* Override any GCC internal prototype to avoid an error.
9585 Use char because int might match the return type of a GCC
9586 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009587#ifdef __cplusplus
9588extern "C"
9589#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009590char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009591int
9592main ()
9593{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009595 ;
9596 return 0;
9597}
9598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009599if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009600 ac_cv_lib_intl_textdomain=yes
9601else
Matthias Kloseb9621712010-04-24 17:59:49 +00009602 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009604rm -f core conftest.err conftest.$ac_objext \
9605 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009606LIBS=$ac_check_lib_save_LIBS
9607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9609$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009610if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009611
Matthias Kloseb9621712010-04-24 17:59:49 +00009612$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009613
Brett Cannonc6d936e2009-06-07 20:09:53 +00009614 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009615fi
9616
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009617
9618# checks for system dependent C++ extensions support
9619case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9621$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009623/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009624
Georg Brandl59e87bd2011-02-15 19:48:59 +00009625 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009626int
9627main ()
9628{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009629loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 ;
9631 return 0;
9632}
Matthias Kloseb159a552010-04-25 21:00:44 +00009633
Martin v. Löwis11437992002-04-12 09:54:03 +00009634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009635if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009636
Matthias Kloseb159a552010-04-25 21:00:44 +00009637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009639
Matthias Kloseb159a552010-04-25 21:00:44 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009641$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009642
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009643else
Matthias Kloseb159a552010-04-25 21:00:44 +00009644
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009646$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009647
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009649rm -f core conftest.err conftest.$ac_objext \
9650 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009651 *) ;;
9652esac
9653
Christian Heimes985ecdc2013-11-20 11:46:18 +01009654# check for systems that require aligned memory access
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9656$as_echo_n "checking aligned memory access is required... " >&6; }
9657if test "$cross_compiling" = yes; then :
9658 aligned_required=yes
9659else
9660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9661/* end confdefs.h. */
9662
9663int main()
9664{
9665 char s[16];
9666 int i, *p1, *p2;
9667 for (i=0; i < 16; i++)
9668 s[i] = i;
9669 p1 = (int*)(s+1);
9670 p2 = (int*)(s+2);
9671 if (*p1 == *p2)
9672 return 1;
9673 return 0;
9674}
9675
9676_ACEOF
9677if ac_fn_c_try_run "$LINENO"; then :
9678 aligned_required=no
9679else
9680 aligned_required=yes
9681fi
9682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9683 conftest.$ac_objext conftest.beam conftest.$ac_ext
9684fi
9685
9686
9687if test "$aligned_required" = yes ; then
9688
9689$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9690
9691fi
9692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9693$as_echo "$aligned_required" >&6; }
9694
9695
9696# str, bytes and memoryview hash algorithm
9697
9698
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9700$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9701
9702# Check whether --with-hash_algorithm was given.
9703if test "${with_hash_algorithm+set}" = set; then :
9704 withval=$with_hash_algorithm;
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9706$as_echo "$withval" >&6; }
9707case "$withval" in
9708 siphash24)
9709 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9710
9711 ;;
9712 fnv)
9713 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9714
9715 ;;
9716 *)
9717 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9718 ;;
9719esac
9720
9721else
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9723$as_echo "default" >&6; }
9724fi
9725
9726
Charles-François Natalid30b0222014-05-08 23:08:51 +01009727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9728$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9729
9730# Check whether --with-address_sanitizer was given.
9731if test "${with_address_sanitizer+set}" = set; then :
9732 withval=$with_address_sanitizer;
9733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9734$as_echo "$withval" >&6; }
9735BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9736LDFLAGS="-fsanitize=address $LDFLAGS"
9737
9738else
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
9741fi
9742
9743
Guido van Rossum70c7f481998-03-26 18:44:10 +00009744# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9746$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009747if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009749else
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009751LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009755/* Override any GCC internal prototype to avoid an error.
9756 Use char because int might match the return type of a GCC
9757 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009758#ifdef __cplusplus
9759extern "C"
9760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009761char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009762int
9763main ()
9764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ;
9767 return 0;
9768}
9769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009772else
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009775rm -f core conftest.err conftest.$ac_objext \
9776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009777LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9780$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009781if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009782 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009783fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009784 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9786$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009787if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009789else
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009791LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009795/* Override any GCC internal prototype to avoid an error.
9796 Use char because int might match the return type of a GCC
9797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798#ifdef __cplusplus
9799extern "C"
9800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009801char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009802int
9803main ()
9804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009806 ;
9807 return 0;
9808}
9809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009812else
Matthias Kloseb9621712010-04-24 17:59:49 +00009813 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009815rm -f core conftest.err conftest.$ac_objext \
9816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009817LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9820$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009821if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009822 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009823fi
9824 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009825
Matthias Kloseb9621712010-04-24 17:59:49 +00009826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9827$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009830if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9833$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009834LIBS="$withval $LIBS"
9835
9836else
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9838$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839fi
9840
Guido van Rossum7f43da71994-08-01 12:15:30 +00009841
Victor Stinner8291b5e2015-03-20 16:03:14 +01009842
9843
9844
9845
9846
9847
9848
9849if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9850 if test -n "$ac_tool_prefix"; then
9851 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9852set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9854$as_echo_n "checking for $ac_word... " >&6; }
9855if ${ac_cv_path_PKG_CONFIG+:} false; then :
9856 $as_echo_n "(cached) " >&6
9857else
9858 case $PKG_CONFIG in
9859 [\\/]* | ?:[\\/]*)
9860 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9861 ;;
9862 *)
9863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9864for as_dir in $PATH
9865do
9866 IFS=$as_save_IFS
9867 test -z "$as_dir" && as_dir=.
9868 for ac_exec_ext in '' $ac_executable_extensions; do
9869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9870 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9872 break 2
9873 fi
9874done
9875 done
9876IFS=$as_save_IFS
9877
9878 ;;
9879esac
9880fi
9881PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9882if test -n "$PKG_CONFIG"; then
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9884$as_echo "$PKG_CONFIG" >&6; }
9885else
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9887$as_echo "no" >&6; }
9888fi
9889
9890
9891fi
9892if test -z "$ac_cv_path_PKG_CONFIG"; then
9893 ac_pt_PKG_CONFIG=$PKG_CONFIG
9894 # Extract the first word of "pkg-config", so it can be a program name with args.
9895set dummy pkg-config; ac_word=$2
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9897$as_echo_n "checking for $ac_word... " >&6; }
9898if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9899 $as_echo_n "(cached) " >&6
9900else
9901 case $ac_pt_PKG_CONFIG in
9902 [\\/]* | ?:[\\/]*)
9903 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9904 ;;
9905 *)
9906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907for as_dir in $PATH
9908do
9909 IFS=$as_save_IFS
9910 test -z "$as_dir" && as_dir=.
9911 for ac_exec_ext in '' $ac_executable_extensions; do
9912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9913 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9915 break 2
9916 fi
9917done
9918 done
9919IFS=$as_save_IFS
9920
9921 ;;
9922esac
9923fi
9924ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9925if test -n "$ac_pt_PKG_CONFIG"; then
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9927$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9928else
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930$as_echo "no" >&6; }
9931fi
9932
9933 if test "x$ac_pt_PKG_CONFIG" = x; then
9934 PKG_CONFIG=""
9935 else
9936 case $cross_compiling:$ac_tool_warned in
9937yes:)
9938{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9939$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9940ac_tool_warned=yes ;;
9941esac
9942 PKG_CONFIG=$ac_pt_PKG_CONFIG
9943 fi
9944else
9945 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9946fi
9947
9948fi
9949if test -n "$PKG_CONFIG"; then
9950 _pkg_min_version=0.9.0
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9952$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9953 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9955$as_echo "yes" >&6; }
9956 else
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9958$as_echo "no" >&6; }
9959 PKG_CONFIG=""
9960 fi
9961fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009962
9963# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9965$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009966
9967# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009968if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009969 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009970else
9971 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009972fi
9973
9974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9976$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009977
9978# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9980$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009981
9982# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009983if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009984 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009985else
9986 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009987fi
9988
9989
9990if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009991 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9992else
9993 LIBFFI_INCLUDEDIR=""
9994fi
9995
9996
Matthias Kloseb9621712010-04-24 17:59:49 +00009997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9998$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009999
Stefan Krah60187b52012-03-23 19:06:27 +010010000# Check for use of the system libmpdec library
10001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10002$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10003
10004# Check whether --with-system_libmpdec was given.
10005if test "${with_system_libmpdec+set}" = set; then :
10006 withval=$with_system_libmpdec;
10007else
10008 with_system_libmpdec="no"
10009fi
10010
10011
10012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10013$as_echo "$with_system_libmpdec" >&6; }
10014
Benjamin Peterson076ed002010-10-31 17:11:02 +000010015# Check for support for loadable sqlite extensions
10016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10017$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10018# Check whether --enable-loadable-sqlite-extensions was given.
10019if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10020 enableval=$enable_loadable_sqlite_extensions;
10021else
10022 enable_loadable_sqlite_extensions="no"
10023fi
10024
10025
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10027$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10028
Ned Deilyd819b932013-09-06 01:07:05 -070010029# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10030
10031
10032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10033$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10034
10035# Check whether --with-tcltk-includes was given.
10036if test "${with_tcltk_includes+set}" = set; then :
10037 withval=$with_tcltk_includes;
10038else
10039 with_tcltk_includes="default"
10040fi
10041
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10043$as_echo "$with_tcltk_includes" >&6; }
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10045$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10046
10047# Check whether --with-tcltk-libs was given.
10048if test "${with_tcltk_libs+set}" = set; then :
10049 withval=$with_tcltk_libs;
10050else
10051 with_tcltk_libs="default"
10052fi
10053
10054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10055$as_echo "$with_tcltk_libs" >&6; }
10056if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10057then
10058 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10059 then
10060 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10061 fi
10062 TCLTK_INCLUDES=""
10063 TCLTK_LIBS=""
10064else
10065 TCLTK_INCLUDES="$with_tcltk_includes"
10066 TCLTK_LIBS="$with_tcltk_libs"
10067fi
10068
Matthias Klose55708cc2009-04-30 08:06:49 +000010069# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10071$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010072
10073# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010074if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010075 withval=$with_dbmliborder;
10076if test x$with_dbmliborder = xyes
10077then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010078as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010079else
10080 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10081 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10082 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010083 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010084 fi
10085 done
10086fi
10087fi
10088
Matthias Kloseb9621712010-04-24 17:59:49 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10090$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010091
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010092# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010093
10094
Matthias Kloseb9621712010-04-24 17:59:49 +000010095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10096$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010099if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 withval=$with_signal_module;
10101fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010102
10103
10104if test -z "$with_signal_module"
10105then with_signal_module="yes"
10106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10108$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010109
10110if test "${with_signal_module}" = "yes"; then
10111 USE_SIGNAL_MODULE=""
10112 SIGNAL_OBJS=""
10113else
10114 USE_SIGNAL_MODULE="#"
10115 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10116fi
10117
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010118# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010119
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010120USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122
Martin v. Löwis11437992002-04-12 09:54:03 +000010123
10124# Templates for things AC_DEFINEd more than once.
10125# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010126
10127
Martin v. Löwis11437992002-04-12 09:54:03 +000010128
Matthias Kloseb9621712010-04-24 17:59:49 +000010129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10130$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010133if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134 withval=$with_threads;
10135fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010136
10137
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010138# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010141if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142 withval=$with_thread; with_threads=$with_thread
10143fi
10144
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010145
10146if test -z "$with_threads"
10147then with_threads="yes"
10148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10150$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010151
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010152
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010153if test "$with_threads" = "no"
10154then
10155 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010156elif test "$ac_cv_pthread_is_default" = yes
10157then
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010159
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010160 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010162
10163 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010165elif test "$ac_cv_kpthread" = "yes"
10166then
10167 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010168 if test "$ac_cv_cxx_thread" = "yes"; then
10169 CXX="$CXX -Kpthread"
10170 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010172
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010173 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010174 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010175elif test "$ac_cv_kthread" = "yes"
10176then
10177 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010178 if test "$ac_cv_cxx_thread" = "yes"; then
10179 CXX="$CXX -Kthread"
10180 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010182
10183 posix_threads=yes
10184 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010185elif test "$ac_cv_pthread" = "yes"
10186then
10187 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010188 if test "$ac_cv_cxx_thread" = "yes"; then
10189 CXX="$CXX -pthread"
10190 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010192
10193 posix_threads=yes
10194 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010195else
10196 if test ! -z "$with_threads" -a -d "$with_threads"
10197 then LDFLAGS="$LDFLAGS -L$with_threads"
10198 fi
10199 if test ! -z "$withval" -a -d "$withval"
10200 then LDFLAGS="$LDFLAGS -L$withval"
10201 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010202
10203 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010204 # define _POSIX_THREADS in unistd.h. Some apparently don't
10205 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10207$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010209/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010210
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010211#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010212#ifdef _POSIX_THREADS
10213yes
10214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010215
10216_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010219 unistd_defines_pthreads=yes
10220else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010221 unistd_defines_pthreads=no
10222fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010223rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10226$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010227
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010229
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010230 # Just looking for pthread_create in libpthread is not enough:
10231 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10232 # So we really have to include pthread.h, and then link.
10233 _libs=$LIBS
10234 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10236$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010239
10240#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010241#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010242
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010243void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010244int
10245main ()
10246{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010247
10248pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ;
10250 return 0;
10251}
10252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010253if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010254
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10256$as_echo "yes" >&6; }
10257 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010258
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010259 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010260 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010261else
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010263 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010265if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010267
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010268 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010269 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010270else
Guido van Rossumad678af1998-10-02 14:42:15 +000010271
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10273$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010274if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010276else
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010278LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282/* Override any GCC internal prototype to avoid an error.
10283 Use char because int might match the return type of a GCC
10284 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010285#ifdef __cplusplus
10286extern "C"
10287#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010288char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010289int
10290main ()
10291{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 ;
10294 return 0;
10295}
10296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010297if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010299else
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010302rm -f core conftest.err conftest.$ac_objext \
10303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010304LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10307$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010308if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010310
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010311 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010312 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010313 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010314else
Greg Steinadf63d62000-07-05 10:38:09 +000010315
Matthias Kloseb9621712010-04-24 17:59:49 +000010316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10317$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010318if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010320else
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010322LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326/* Override any GCC internal prototype to avoid an error.
10327 Use char because int might match the return type of a GCC
10328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010329#ifdef __cplusplus
10330extern "C"
10331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010332char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010333int
10334main ()
10335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 ;
10338 return 0;
10339}
10340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010341if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010343else
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010346rm -f core conftest.err conftest.$ac_objext \
10347 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010348LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10351$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010352if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010355 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010356 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010357 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010358else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10361$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010362if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010364else
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010366LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370/* Override any GCC internal prototype to avoid an error.
10371 Use char because int might match the return type of a GCC
10372 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010373#ifdef __cplusplus
10374extern "C"
10375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010376char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010377int
10378main ()
10379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 ;
10382 return 0;
10383}
10384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010385if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010387else
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010390rm -f core conftest.err conftest.$ac_objext \
10391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010392LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10395$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010396if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010398
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010399 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010400 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010401 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010402else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010403
Matthias Kloseb9621712010-04-24 17:59:49 +000010404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10405$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010406if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010407 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010408else
Martin v. Löwis11437992002-04-12 09:54:03 +000010409 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010410LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414/* Override any GCC internal prototype to avoid an error.
10415 Use char because int might match the return type of a GCC
10416 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010417#ifdef __cplusplus
10418extern "C"
10419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010420char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010421int
10422main ()
10423{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010424return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ;
10426 return 0;
10427}
10428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010429if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010431else
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010434rm -f core conftest.err conftest.$ac_objext \
10435 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010436LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10439$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010440if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010442
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010443 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010444 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010445 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010447
Martin v. Löwis130fb172001-07-19 11:00:41 +000010448 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010449fi
10450
Guido van Rossum627b2d71993-12-24 10:39:16 +000010451
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010452fi
10453
Guido van Rossum0be3e491997-05-22 20:33:33 +000010454fi
10455
Guido van Rossum49545951997-12-02 19:28:29 +000010456fi
10457
Guido van Rossumb93a8621998-05-07 13:27:32 +000010458fi
10459
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010461rm -f core conftest.err conftest.$ac_objext \
10462 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010463
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10465$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010466if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010468else
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010470LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474/* Override any GCC internal prototype to avoid an error.
10475 Use char because int might match the return type of a GCC
10476 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010477#ifdef __cplusplus
10478extern "C"
10479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010480char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010481int
10482main ()
10483{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010491else
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010494rm -f core conftest.err conftest.$ac_objext \
10495 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010496LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10499$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010500if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010502
Martin v. Löwis130fb172001-07-19 11:00:41 +000010503 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010504 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010505 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010506fi
10507
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010508
Neal Norwitza978ab02002-11-02 16:58:05 +000010509 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10511$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010512if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010514else
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010516LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520/* Override any GCC internal prototype to avoid an error.
10521 Use char because int might match the return type of a GCC
10522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010523#ifdef __cplusplus
10524extern "C"
10525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010526char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010527int
10528main ()
10529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010531 ;
10532 return 0;
10533}
10534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010537else
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010540rm -f core conftest.err conftest.$ac_objext \
10541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010542LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10545$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010546if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010548
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010549 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010550 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010551 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010552fi
10553
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010554 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010555fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010556
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010557if test "$posix_threads" = "yes"; then
10558 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010559
Matthias Kloseb9621712010-04-24 17:59:49 +000010560$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561
10562 fi
10563
10564 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10565 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010566 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010567$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010568
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010569 ;;
10570 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010571$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572
10573 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010574 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010575$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010576
10577 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010578 esac
10579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10581$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010582 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584else
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010586 ac_cv_pthread_system_supported=no
10587else
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010589/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010590
10591 #include <stdio.h>
10592 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593 void *foo(void *parm) {
10594 return NULL;
10595 }
10596 main() {
10597 pthread_attr_t attr;
10598 pthread_t id;
10599 if (pthread_attr_init(&attr)) exit(-1);
10600 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10601 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10602 exit(0);
10603 }
10604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010606 ac_cv_pthread_system_supported=yes
10607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010612fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614
Guido van Rossum627b2d71993-12-24 10:39:16 +000010615fi
10616
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10618$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010619 if test "$ac_cv_pthread_system_supported" = "yes"; then
10620
Matthias Kloseb9621712010-04-24 17:59:49 +000010621$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010622
10623 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 for ac_func in pthread_sigmask
10625do :
10626 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010627if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010630_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010631 case $ac_sys_system in
10632 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010635
10636 ;;
10637 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010638fi
10639done
10640
Christian Heimesf77b4b22013-08-21 13:26:05 +020010641 for ac_func in pthread_atfork
10642do :
10643 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10644if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10645 cat >>confdefs.h <<_ACEOF
10646#define HAVE_PTHREAD_ATFORK 1
10647_ACEOF
10648
10649fi
10650done
10651
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652fi
10653
10654
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10658$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010660if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010662 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10664$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010665 ipv6=no
10666 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10668$as_echo "yes" >&6; }
10669 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010670
10671 ipv6=yes
10672 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010674else
Martin v. Löwis11437992002-04-12 09:54:03 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010677/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678 /* AF_INET6 available check */
10679#include <sys/types.h>
10680#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010681int
10682main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010683{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010684int domain = AF_INET6;
10685 ;
10686 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687}
Martin v. Löwis11437992002-04-12 09:54:03 +000010688_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010689if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10692$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695else
Matthias Kloseb159a552010-04-25 21:00:44 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010699 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010700
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010701fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010704if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10706$as_echo_n "checking if RFC2553 API is available... " >&6; }
10707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010708/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010709
10710 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010711#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010712int
10713main ()
10714{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010715struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010716 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ;
10718 return 0;
10719}
Matthias Kloseb159a552010-04-25 21:00:44 +000010720
Martin v. Löwis11437992002-04-12 09:54:03 +000010721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010723
10724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010725$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010726 ipv6=yes
10727
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010728else
Matthias Kloseb159a552010-04-25 21:00:44 +000010729
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010731$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010732 ipv6=no
10733
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010736fi
10737
10738if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010740
10741fi
10742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743fi
10744
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745
10746ipv6type=unknown
10747ipv6lib=none
10748ipv6trylibc=no
10749
10750if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10752$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010753 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10754 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755 case $i in
10756 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010758/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010759
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760#include <netinet/in.h>
10761#ifdef IPV6_INRIA_VERSION
10762yes
10763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010764_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010767 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010769rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770
10771 ;;
10772 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010774/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776#include <netinet/in.h>
10777#ifdef __KAME__
10778yes
10779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010780_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783 ipv6type=$i;
10784 ipv6lib=inet6
10785 ipv6libdir=/usr/local/v6/lib
10786 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010788rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789
10790 ;;
10791 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010793/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795#include <features.h>
10796#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10797yes
10798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010799_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802 ipv6type=$i;
10803 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010805rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806
10807 ;;
10808 linux-inet6)
10809 if test -d /usr/inet6; then
10810 ipv6type=$i
10811 ipv6lib=inet6
10812 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010813 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814 fi
10815 ;;
10816 solaris)
10817 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010818 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819 ipv6type=$i
10820 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821 fi
10822 fi
10823 ;;
10824 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010826/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828#include <sys/param.h>
10829#ifdef _TOSHIBA_INET6
10830yes
10831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010832_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835 ipv6type=$i;
10836 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010837 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010839rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840
10841 ;;
10842 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010844/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846#include </usr/local/v6/include/sys/v6config.h>
10847#ifdef __V6D__
10848yes
10849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010850_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853 ipv6type=$i;
10854 ipv6lib=v6;
10855 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010856 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010858rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859
10860 ;;
10861 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010863/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865#include <sys/param.h>
10866#ifdef _ZETA_MINAMI_INET6
10867yes
10868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010869_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872 ipv6type=$i;
10873 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010874 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010876rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877
10878 ;;
10879 esac
10880 if test "$ipv6type" != "unknown"; then
10881 break
10882 fi
10883 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10885$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886fi
10887
10888if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10889 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10890 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10891 echo "using lib$ipv6lib"
10892 else
10893 if test $ipv6trylibc = "yes"; then
10894 echo "using libc"
10895 else
10896 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10897 echo "You need to fetch lib$ipv6lib.a from appropriate"
10898 echo 'ipv6 kit and compile beforehand.'
10899 exit 1
10900 fi
10901 fi
10902fi
10903
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10905$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10907/* end confdefs.h. */
10908 /* CAN_RAW_FD_FRAMES available check */
10909#include <linux/can/raw.h>
10910int
10911main ()
10912{
10913int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10914 ;
10915 return 0;
10916}
10917_ACEOF
10918if ac_fn_c_try_compile "$LINENO"; then :
10919
10920
10921$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10922
10923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10924$as_echo "yes" >&6; }
10925
10926else
10927
10928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929$as_echo "no" >&6; }
10930
10931fi
10932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10933
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10935$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010937/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010938
10939 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010940int
10941main ()
10942{
10943FSIORefNum fRef = 0
10944 ;
10945 return 0;
10946}
Matthias Kloseb159a552010-04-25 21:00:44 +000010947
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010949if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010950
Matthias Kloseb159a552010-04-25 21:00:44 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010953
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10955$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010956
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010957else
Matthias Kloseb159a552010-04-25 21:00:44 +000010958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10960$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010961
10962fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10964
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010965# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10967$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010970if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010971 withval=$with_doc_strings;
10972fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010973
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010974
10975if test -z "$with_doc_strings"
10976then with_doc_strings="yes"
10977fi
10978if test "$with_doc_strings" != "no"
10979then
10980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010982
10983fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10985$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010986
Antoine Pitrou042b1282010-08-13 21:15:58 +000010987# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10989$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010992if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010994if test "$withval" != no
10995then
10996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11000$as_echo "yes" >&6; }
11001else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011003fi
11004else
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11006$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007fi
11008
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011009
11010# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11012$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011015if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016 withval=$with_pymalloc;
11017fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011018
Neil Schemenauera35c6882001-02-27 04:45:05 +000011019
Neil Schemenauer16c22972002-03-22 15:34:49 +000011020if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011021then
11022 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011023fi
11024if test "$with_pymalloc" != "no"
11025then
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011028
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011029 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11032$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011033
Benjamin Peterson05159c42009-12-03 03:01:27 +000011034# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11036$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011037
11038# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011039if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011040 withval=$with_valgrind;
11041else
11042 with_valgrind=no
11043fi
11044
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11046$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011047if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 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 +020011049if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011052
11053else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011054 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011055
11056fi
11057
11058
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011059 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011060fi
11061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011062# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011063
Guido van Rossum98935bf2001-09-05 19:13:16 +000011064DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011065
Guido van Rossume97ee181999-12-20 21:27:22 +000011066# the dlopen() function means we might want to use dynload_shlib.o. some
11067# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011068for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011069do :
11070 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011071if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011073#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011074_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011075
Guido van Rossume97ee181999-12-20 21:27:22 +000011076fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011077done
Guido van Rossume97ee181999-12-20 21:27:22 +000011078
Michael W. Hudson54241132001-12-07 15:38:26 +000011079
Guido van Rossume97ee181999-12-20 21:27:22 +000011080# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11081# loading of modules.
11082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11084$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011085if test -z "$DYNLOADFILE"
11086then
11087 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011088 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11089 if test "$ac_cv_func_dlopen" = yes
11090 then DYNLOADFILE="dynload_shlib.o"
11091 else DYNLOADFILE="dynload_aix.o"
11092 fi
11093 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011094 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011095 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11096 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011097 *)
11098 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11099 # out any dynamic loading
11100 if test "$ac_cv_func_dlopen" = yes
11101 then DYNLOADFILE="dynload_shlib.o"
11102 else DYNLOADFILE="dynload_stub.o"
11103 fi
11104 ;;
11105 esac
11106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11108$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011109if test "$DYNLOADFILE" != "dynload_stub.o"
11110then
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
Matthias Kloseb9621712010-04-24 17:59:49 +000011112$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011113
11114fi
11115
Neil Schemenauer4e425612001-06-19 15:44:15 +000011116# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11117
Michael W. Hudson54241132001-12-07 15:38:26 +000011118
Matthias Kloseb9621712010-04-24 17:59:49 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11120$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011121if test -z "$MACHDEP_OBJS"
11122then
Jack Jansene578a632001-08-15 01:27:14 +000011123 MACHDEP_OBJS=$extra_machdep_objs
11124else
11125 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011126fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011127if test -z "$MACHDEP_OBJS"; then
11128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11129$as_echo "none" >&6; }
11130else
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11132$as_echo "$MACHDEP_OBJS" >&6; }
11133fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011134
Guido van Rossum627b2d71993-12-24 10:39:16 +000011135# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011136for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011137 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011138 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011139 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011140 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011141 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011142 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011143 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11144 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011145 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011146 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011147 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011148 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011149 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011150 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011151 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11152 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011153 sigaction sigaltstack siginterrupt sigpending sigrelse \
11154 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011155 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011156 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011157 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011158do :
11159 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11160ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011161if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011163#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011164_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011165
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011166fi
11167done
11168
Michael W. Hudson54241132001-12-07 15:38:26 +000011169
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011170ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11171 #include <dirent.h>
11172"
11173if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11174
11175$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11176
11177fi
11178
11179
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011180# For some functions, having a definition is not sufficient, since
11181# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11183$as_echo_n "checking for chroot... " >&6; }
11184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011185/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011186#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011187int
11188main ()
11189{
11190void *x=chroot
11191 ;
11192 return 0;
11193}
11194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011196
Matthias Kloseb9621712010-04-24 17:59:49 +000011197$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011198
Matthias Kloseb159a552010-04-25 21:00:44 +000011199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011200$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011201else
Matthias Kloseb9621712010-04-24 17:59:49 +000011202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11203$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011204
11205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11208$as_echo_n "checking for link... " >&6; }
11209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011210/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011212int
11213main ()
11214{
11215void *x=link
11216 ;
11217 return 0;
11218}
11219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011220if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011221
Matthias Kloseb9621712010-04-24 17:59:49 +000011222$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011223
Matthias Kloseb159a552010-04-25 21:00:44 +000011224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011225$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011226else
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11228$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011229
11230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11233$as_echo_n "checking for symlink... " >&6; }
11234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011235/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011236#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011237int
11238main ()
11239{
11240void *x=symlink
11241 ;
11242 return 0;
11243}
11244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011245if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011248
Matthias Kloseb159a552010-04-25 21:00:44 +000011249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011250$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011251else
Matthias Kloseb9621712010-04-24 17:59:49 +000011252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11253$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011254
11255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11258$as_echo_n "checking for fchdir... " >&6; }
11259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011260/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011261#include <unistd.h>
11262int
11263main ()
11264{
11265void *x=fchdir
11266 ;
11267 return 0;
11268}
11269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011270if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011271
Matthias Kloseb9621712010-04-24 17:59:49 +000011272$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011273
Matthias Kloseb159a552010-04-25 21:00:44 +000011274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011275$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011276else
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011279
11280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11283$as_echo_n "checking for fsync... " >&6; }
11284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011285/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011286#include <unistd.h>
11287int
11288main ()
11289{
11290void *x=fsync
11291 ;
11292 return 0;
11293}
11294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011298
Matthias Kloseb159a552010-04-25 21:00:44 +000011299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011300$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011301else
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011304
11305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11308$as_echo_n "checking for fdatasync... " >&6; }
11309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011311#include <unistd.h>
11312int
11313main ()
11314{
11315void *x=fdatasync
11316 ;
11317 return 0;
11318}
11319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011323
Matthias Kloseb159a552010-04-25 21:00:44 +000011324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011325$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011326else
Matthias Kloseb9621712010-04-24 17:59:49 +000011327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11328$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011329
11330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11333$as_echo_n "checking for epoll... " >&6; }
11334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011335/* end confdefs.h. */
11336#include <sys/epoll.h>
11337int
11338main ()
11339{
11340void *x=epoll_create
11341 ;
11342 return 0;
11343}
11344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346
Matthias Kloseb9621712010-04-24 17:59:49 +000011347$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011348
Matthias Kloseb159a552010-04-25 21:00:44 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011350$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011351else
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11353$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011354
11355fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11358$as_echo_n "checking for epoll_create1... " >&6; }
11359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11360/* end confdefs.h. */
11361#include <sys/epoll.h>
11362int
11363main ()
11364{
11365void *x=epoll_create1
11366 ;
11367 return 0;
11368}
11369_ACEOF
11370if ac_fn_c_try_compile "$LINENO"; then :
11371
11372$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11373
11374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11375$as_echo "yes" >&6; }
11376else
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379
11380fi
11381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11383$as_echo_n "checking for kqueue... " >&6; }
11384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011385/* end confdefs.h. */
11386
11387#include <sys/types.h>
11388#include <sys/event.h>
11389
11390int
11391main ()
11392{
11393int x=kqueue()
11394 ;
11395 return 0;
11396}
11397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011398if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011399
Matthias Kloseb9621712010-04-24 17:59:49 +000011400$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011401
Matthias Kloseb159a552010-04-25 21:00:44 +000011402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011403$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011404else
Matthias Kloseb9621712010-04-24 17:59:49 +000011405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11406$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011407
11408fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11411$as_echo_n "checking for prlimit... " >&6; }
11412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11413/* end confdefs.h. */
11414
11415#include <sys/time.h>
11416#include <sys/resource.h>
11417
11418int
11419main ()
11420{
11421void *x=prlimit
11422 ;
11423 return 0;
11424}
11425_ACEOF
11426if ac_fn_c_try_compile "$LINENO"; then :
11427
11428$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11429
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11431$as_echo "yes" >&6; }
11432else
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
11435
11436fi
11437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11438
Martin v. Löwisd5843682002-11-21 20:41:28 +000011439# On some systems (eg. FreeBSD 5), we would find a definition of the
11440# functions ctermid_r, setgroups in the library, but no prototype
11441# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11442# address to avoid compiler warnings and potential miscompilations
11443# because of the missing prototypes.
11444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11446$as_echo_n "checking for ctermid_r... " >&6; }
11447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011448/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011449
Martin v. Löwisd5843682002-11-21 20:41:28 +000011450#include <stdio.h>
11451
Martin v. Löwisd5843682002-11-21 20:41:28 +000011452int
11453main ()
11454{
11455void* p = ctermid_r
11456 ;
11457 return 0;
11458}
11459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011463
Matthias Kloseb159a552010-04-25 21:00:44 +000011464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011465$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011466else
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11468$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011469
11470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11472
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11474$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011475if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011476 $as_echo_n "(cached) " >&6
11477else
11478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011479/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011480#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011481int
11482main ()
11483{
11484void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011485
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011486 ;
11487 return 0;
11488}
11489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011490if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011491 ac_cv_flock_decl=yes
11492else
11493 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011494
11495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011497
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011498fi
11499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11500$as_echo "$ac_cv_flock_decl" >&6; }
11501if test "x${ac_cv_flock_decl}" = xyes; then
11502 for ac_func in flock
11503do :
11504 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011505if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011506 cat >>confdefs.h <<_ACEOF
11507#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011508_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011509
Antoine Pitroua3000072010-09-07 14:52:42 +000011510else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011512$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011513if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011514 $as_echo_n "(cached) " >&6
11515else
11516 ac_check_lib_save_LIBS=$LIBS
11517LIBS="-lbsd $LIBS"
11518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11519/* end confdefs.h. */
11520
11521/* Override any GCC internal prototype to avoid an error.
11522 Use char because int might match the return type of a GCC
11523 builtin and then its argument prototype would still apply. */
11524#ifdef __cplusplus
11525extern "C"
11526#endif
11527char flock ();
11528int
11529main ()
11530{
11531return flock ();
11532 ;
11533 return 0;
11534}
11535_ACEOF
11536if ac_fn_c_try_link "$LINENO"; then :
11537 ac_cv_lib_bsd_flock=yes
11538else
11539 ac_cv_lib_bsd_flock=no
11540fi
11541rm -f core conftest.err conftest.$ac_objext \
11542 conftest$ac_exeext conftest.$ac_ext
11543LIBS=$ac_check_lib_save_LIBS
11544fi
11545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11546$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011547if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011548 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011549
11550
11551$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11552
11553
11554fi
11555
11556
11557fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011558done
11559
Antoine Pitroua3000072010-09-07 14:52:42 +000011560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11563$as_echo_n "checking for getpagesize... " >&6; }
11564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011565/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011566
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011567#include <unistd.h>
11568
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011569int
11570main ()
11571{
11572void* p = getpagesize
11573 ;
11574 return 0;
11575}
11576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011580
Matthias Kloseb159a552010-04-25 21:00:44 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011582$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011583else
Matthias Kloseb9621712010-04-24 17:59:49 +000011584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11585$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011586
11587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011589
Victor Stinner984890f2011-11-24 13:53:38 +010011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11591$as_echo_n "checking for broken unsetenv... " >&6; }
11592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593/* end confdefs.h. */
11594
11595#include <stdlib.h>
11596
11597int
11598main ()
11599{
11600int res = unsetenv("DUMMY")
11601 ;
11602 return 0;
11603}
11604_ACEOF
11605if ac_fn_c_try_compile "$LINENO"; then :
11606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11607$as_echo "no" >&6; }
11608else
11609
11610$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11611
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11613$as_echo "yes" >&6; }
11614
11615fi
11616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11617
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011618for ac_prog in true
11619do
11620 # Extract the first word of "$ac_prog", so it can be a program name with args.
11621set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11623$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011624if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011626else
11627 if test -n "$TRUE"; then
11628 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11629else
11630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11631for as_dir in $PATH
11632do
11633 IFS=$as_save_IFS
11634 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011637 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 $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 +000011639 break 2
11640 fi
11641done
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011644
11645fi
11646fi
11647TRUE=$ac_cv_prog_TRUE
11648if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11650$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011651else
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11653$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011654fi
11655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011657 test -n "$TRUE" && break
11658done
11659test -n "$TRUE" || TRUE="/bin/true"
11660
11661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11663$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011664if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011666else
11667 ac_check_lib_save_LIBS=$LIBS
11668LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011670/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011672/* Override any GCC internal prototype to avoid an error.
11673 Use char because int might match the return type of a GCC
11674 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011675#ifdef __cplusplus
11676extern "C"
11677#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011678char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011679int
11680main ()
11681{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011682return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011683 ;
11684 return 0;
11685}
11686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011687if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011688 ac_cv_lib_c_inet_aton=yes
11689else
Matthias Kloseb9621712010-04-24 17:59:49 +000011690 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011692rm -f core conftest.err conftest.$ac_objext \
11693 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011694LIBS=$ac_check_lib_save_LIBS
11695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11697$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011698if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011699 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011700else
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11702$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011703if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011705else
11706 ac_check_lib_save_LIBS=$LIBS
11707LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011709/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011711/* Override any GCC internal prototype to avoid an error.
11712 Use char because int might match the return type of a GCC
11713 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011714#ifdef __cplusplus
11715extern "C"
11716#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011717char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011718int
11719main ()
11720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011721return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011722 ;
11723 return 0;
11724}
11725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011726if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011727 ac_cv_lib_resolv_inet_aton=yes
11728else
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011731rm -f core conftest.err conftest.$ac_objext \
11732 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011733LIBS=$ac_check_lib_save_LIBS
11734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11736$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011737if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011738 cat >>confdefs.h <<_ACEOF
11739#define HAVE_LIBRESOLV 1
11740_ACEOF
11741
11742 LIBS="-lresolv $LIBS"
11743
11744fi
11745
11746
11747fi
11748
11749
Christian Heimesd0764e22007-12-04 15:00:33 +000011750# On Tru64, chflags seems to be present, but calling it will
11751# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11753$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011754if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011756else
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011758 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011761/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011762
Christian Heimesd0764e22007-12-04 15:00:33 +000011763#include <sys/stat.h>
11764#include <unistd.h>
11765int main(int argc, char*argv[])
11766{
11767 if(chflags(argv[0], 0) != 0)
11768 return 1;
11769 return 0;
11770}
Ned Deily3eb67d52011-06-28 00:00:28 -070011771
Christian Heimesd0764e22007-12-04 15:00:33 +000011772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011773if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011774 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011775else
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011780fi
11781
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011782
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11785$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011786if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011788if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011789 ac_cv_have_chflags="yes"
11790else
11791 ac_cv_have_chflags="no"
11792fi
11793
11794fi
11795if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011798
11799fi
11800
Matthias Kloseb9621712010-04-24 17:59:49 +000011801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11802$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011803if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011807 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011810/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011811
Christian Heimesd0764e22007-12-04 15:00:33 +000011812#include <sys/stat.h>
11813#include <unistd.h>
11814int main(int argc, char*argv[])
11815{
11816 if(lchflags(argv[0], 0) != 0)
11817 return 1;
11818 return 0;
11819}
Ned Deily3eb67d52011-06-28 00:00:28 -070011820
Christian Heimesd0764e22007-12-04 15:00:33 +000011821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011822if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011823 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011829fi
11830
11831
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11834$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011835if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011837if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011838 ac_cv_have_lchflags="yes"
11839else
11840 ac_cv_have_lchflags="no"
11841fi
11842
11843fi
11844if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011845
Matthias Kloseb9621712010-04-24 17:59:49 +000011846$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011847
11848fi
11849
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011850case $ac_sys_system/$ac_sys_release in
11851Darwin/*)
11852 _CUR_CFLAGS="${CFLAGS}"
11853 _CUR_LDFLAGS="${LDFLAGS}"
11854 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11855 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11856 ;;
11857esac
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11860$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011861if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011863else
11864 ac_check_lib_save_LIBS=$LIBS
11865LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011867/* end confdefs.h. */
11868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011869/* Override any GCC internal prototype to avoid an error.
11870 Use char because int might match the return type of a GCC
11871 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011872#ifdef __cplusplus
11873extern "C"
11874#endif
11875char inflateCopy ();
11876int
11877main ()
11878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011879return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011880 ;
11881 return 0;
11882}
11883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011885 ac_cv_lib_z_inflateCopy=yes
11886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889rm -f core conftest.err conftest.$ac_objext \
11890 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011891LIBS=$ac_check_lib_save_LIBS
11892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11894$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011898
11899fi
11900
11901
11902case $ac_sys_system/$ac_sys_release in
11903Darwin/*)
11904 CFLAGS="${_CUR_CFLAGS}"
11905 LDFLAGS="${_CUR_LDFLAGS}"
11906 ;;
11907esac
11908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11910$as_echo_n "checking for hstrerror... " >&6; }
11911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011912/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011913
Martin v. Löwise9416172003-05-03 10:12:45 +000011914#include <netdb.h>
11915
Martin v. Löwise9416172003-05-03 10:12:45 +000011916int
11917main ()
11918{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011919void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011927
Matthias Kloseb159a552010-04-25 21:00:44 +000011928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011929$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011930else
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011933
11934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011935rm -f core conftest.err conftest.$ac_objext \
11936 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11939$as_echo_n "checking for inet_aton... " >&6; }
11940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011941/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011942
Martin v. Löwis86d66262006-02-17 08:40:11 +000011943#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011944#include <sys/socket.h>
11945#include <netinet/in.h>
11946#include <arpa/inet.h>
11947
Martin v. Löwise9416172003-05-03 10:12:45 +000011948int
11949main ()
11950{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011951void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011952 ;
11953 return 0;
11954}
11955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011959
Matthias Kloseb159a552010-04-25 21:00:44 +000011960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011961$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11964$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011965
11966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011967rm -f core conftest.err conftest.$ac_objext \
11968 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011969
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11971$as_echo_n "checking for inet_pton... " >&6; }
11972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011973/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011974
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011975#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011976#include <sys/socket.h>
11977#include <netinet/in.h>
11978#include <arpa/inet.h>
11979
Martin v. Löwise9416172003-05-03 10:12:45 +000011980int
11981main ()
11982{
11983void* p = inet_pton
11984 ;
11985 return 0;
11986}
11987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011991
Matthias Kloseb159a552010-04-25 21:00:44 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011993$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011997
11998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012000
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012001# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12003$as_echo_n "checking for setgroups... " >&6; }
12004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012005/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012006
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012007#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012008#ifdef HAVE_GRP_H
12009#include <grp.h>
12010#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012011
Martin v. Löwisd5843682002-11-21 20:41:28 +000012012int
12013main ()
12014{
12015void* p = setgroups
12016 ;
12017 return 0;
12018}
12019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012023
Matthias Kloseb159a552010-04-25 21:00:44 +000012024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012025$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012026else
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12028$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012029
12030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012032
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012033# check for openpty and forkpty
12034
12035for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012036do :
12037 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012038if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012039 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012040#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012041_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012042
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012043else
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12045$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012048else
Martin v. Löwis11437992002-04-12 09:54:03 +000012049 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012050LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054/* Override any GCC internal prototype to avoid an error.
12055 Use char because int might match the return type of a GCC
12056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012057#ifdef __cplusplus
12058extern "C"
12059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012060char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012061int
12062main ()
12063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012065 ;
12066 return 0;
12067}
12068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012069if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012070 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012074rm -f core conftest.err conftest.$ac_objext \
12075 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012076LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12079$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012080if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012082 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12085$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012088else
12089 ac_check_lib_save_LIBS=$LIBS
12090LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012092/* end confdefs.h. */
12093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094/* Override any GCC internal prototype to avoid an error.
12095 Use char because int might match the return type of a GCC
12096 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012097#ifdef __cplusplus
12098extern "C"
12099#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012100char openpty ();
12101int
12102main ()
12103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012110 ac_cv_lib_bsd_openpty=yes
12111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012114rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012116LIBS=$ac_check_lib_save_LIBS
12117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12119$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012122 LIBS="$LIBS -lbsd"
12123fi
12124
12125
12126fi
12127
Fred Drake8cef4cf2000-06-28 16:40:38 +000012128
12129fi
12130done
12131
12132for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012133do :
12134 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012135if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012136 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012137#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012138_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012139
Fred Drake8cef4cf2000-06-28 16:40:38 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12142$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012143if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012145else
Martin v. Löwis11437992002-04-12 09:54:03 +000012146 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012147LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151/* Override any GCC internal prototype to avoid an error.
12152 Use char because int might match the return type of a GCC
12153 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012154#ifdef __cplusplus
12155extern "C"
12156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012157char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012158int
12159main ()
12160{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012161return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 ;
12163 return 0;
12164}
12165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012166if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012168else
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012171rm -f core conftest.err conftest.$ac_objext \
12172 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012173LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12176$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012177if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012179 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12182$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012183if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012185else
12186 ac_check_lib_save_LIBS=$LIBS
12187LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012189/* end confdefs.h. */
12190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012191/* Override any GCC internal prototype to avoid an error.
12192 Use char because int might match the return type of a GCC
12193 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012194#ifdef __cplusplus
12195extern "C"
12196#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012197char forkpty ();
12198int
12199main ()
12200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012202 ;
12203 return 0;
12204}
12205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012207 ac_cv_lib_bsd_forkpty=yes
12208else
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012211rm -f core conftest.err conftest.$ac_objext \
12212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012213LIBS=$ac_check_lib_save_LIBS
12214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12216$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012217if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012219 LIBS="$LIBS -lbsd"
12220fi
12221
12222
12223fi
12224
Fred Drake8cef4cf2000-06-28 16:40:38 +000012225
12226fi
12227done
12228
Jack Jansendd19cf82001-12-06 22:36:17 +000012229
Christian Heimesb186d002008-03-18 15:15:01 +000012230# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012231for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012232do :
12233 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012235 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012236#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012237_ACEOF
12238
12239fi
12240done
12241
12242
Michael W. Hudson54241132001-12-07 15:38:26 +000012243# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012244for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012245do :
12246 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12247ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012248if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012249 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012250#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012251_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012252
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012253fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012254done
12255
Michael W. Hudson54241132001-12-07 15:38:26 +000012256
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012257ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012258if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012259 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012260
Martin v. Löwis1142de32002-03-29 16:28:31 +000012261else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012263 *" dup2.$ac_objext "* ) ;;
12264 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012266esac
12267
Martin v. Löwis1142de32002-03-29 16:28:31 +000012268fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012269
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012270ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012271if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012272 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12273
12274else
12275 case " $LIBOBJS " in
12276 *" strdup.$ac_objext "* ) ;;
12277 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12278 ;;
12279esac
12280
12281fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012282
12283
12284for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012285do :
12286 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012287if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012288 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012289#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012292/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012293#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012294int
12295main ()
12296{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012297getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 ;
12299 return 0;
12300}
12301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012303
Matthias Kloseb9621712010-04-24 17:59:49 +000012304$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012305
Guido van Rossum627b2d71993-12-24 10:39:16 +000012306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012308
Guido van Rossum627b2d71993-12-24 10:39:16 +000012309fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012310done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012311
Jack Jansen150753c2003-03-29 22:07:47 +000012312for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012313do :
12314 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012315if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012316 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012320/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012321#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012322int
12323main ()
12324{
12325setpgrp(0,0);
12326 ;
12327 return 0;
12328}
12329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012331
Matthias Kloseb9621712010-04-24 17:59:49 +000012332$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012333
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012336
12337fi
12338done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012339
Thomas Wouters3a584202000-08-05 23:28:51 +000012340for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012341do :
12342 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012343if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012345#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012348/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012349#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012350int
12351main ()
12352{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012353gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ;
12355 return 0;
12356}
12357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358if ac_fn_c_try_compile "$LINENO"; then :
12359
Guido van Rossum627b2d71993-12-24 10:39:16 +000012360else
Skip Montanaro6dead952003-09-25 14:50:04 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
Guido van Rossum627b2d71993-12-24 10:39:16 +000012365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012368fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012369done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012370
Michael W. Hudson54241132001-12-07 15:38:26 +000012371
Victor Stinnere0be4232011-10-25 13:06:09 +020012372for ac_func in clock_gettime
12373do :
12374 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12375if test "x$ac_cv_func_clock_gettime" = xyes; then :
12376 cat >>confdefs.h <<_ACEOF
12377#define HAVE_CLOCK_GETTIME 1
12378_ACEOF
12379
12380else
12381
12382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12383$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12384if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12385 $as_echo_n "(cached) " >&6
12386else
12387 ac_check_lib_save_LIBS=$LIBS
12388LIBS="-lrt $LIBS"
12389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12390/* end confdefs.h. */
12391
12392/* Override any GCC internal prototype to avoid an error.
12393 Use char because int might match the return type of a GCC
12394 builtin and then its argument prototype would still apply. */
12395#ifdef __cplusplus
12396extern "C"
12397#endif
12398char clock_gettime ();
12399int
12400main ()
12401{
12402return clock_gettime ();
12403 ;
12404 return 0;
12405}
12406_ACEOF
12407if ac_fn_c_try_link "$LINENO"; then :
12408 ac_cv_lib_rt_clock_gettime=yes
12409else
12410 ac_cv_lib_rt_clock_gettime=no
12411fi
12412rm -f core conftest.err conftest.$ac_objext \
12413 conftest$ac_exeext conftest.$ac_ext
12414LIBS=$ac_check_lib_save_LIBS
12415fi
12416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12417$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12418if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12419
Victor Stinner7efb8332014-08-29 15:41:08 +020012420 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012421 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12422
12423
12424$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12425
12426
12427fi
12428
12429
12430fi
12431done
12432
12433
12434for ac_func in clock_getres
12435do :
12436 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12437if test "x$ac_cv_func_clock_getres" = xyes; then :
12438 cat >>confdefs.h <<_ACEOF
12439#define HAVE_CLOCK_GETRES 1
12440_ACEOF
12441
12442else
12443
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12445$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12446if ${ac_cv_lib_rt_clock_getres+:} false; then :
12447 $as_echo_n "(cached) " >&6
12448else
12449 ac_check_lib_save_LIBS=$LIBS
12450LIBS="-lrt $LIBS"
12451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12452/* end confdefs.h. */
12453
12454/* Override any GCC internal prototype to avoid an error.
12455 Use char because int might match the return type of a GCC
12456 builtin and then its argument prototype would still apply. */
12457#ifdef __cplusplus
12458extern "C"
12459#endif
12460char clock_getres ();
12461int
12462main ()
12463{
12464return clock_getres ();
12465 ;
12466 return 0;
12467}
12468_ACEOF
12469if ac_fn_c_try_link "$LINENO"; then :
12470 ac_cv_lib_rt_clock_getres=yes
12471else
12472 ac_cv_lib_rt_clock_getres=no
12473fi
12474rm -f core conftest.err conftest.$ac_objext \
12475 conftest$ac_exeext conftest.$ac_ext
12476LIBS=$ac_check_lib_save_LIBS
12477fi
12478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12479$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12480if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12481
12482 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12483
12484
12485fi
12486
12487
12488fi
12489done
12490
12491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12493$as_echo_n "checking for major... " >&6; }
12494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012495/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012496
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012497#if defined(MAJOR_IN_MKDEV)
12498#include <sys/mkdev.h>
12499#elif defined(MAJOR_IN_SYSMACROS)
12500#include <sys/sysmacros.h>
12501#else
12502#include <sys/types.h>
12503#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012504
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012505int
12506main ()
12507{
12508
12509 makedev(major(0),minor(0));
12510
12511 ;
12512 return 0;
12513}
12514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012516
12517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012519
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12521$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012522
12523else
Skip Montanaro6dead952003-09-25 14:50:04 +000012524
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12526$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012527
12528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012529rm -f core conftest.err conftest.$ac_objext \
12530 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012531
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012532# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012533# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12535$as_echo_n "checking for getaddrinfo... " >&6; }
12536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012537/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012538
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012539#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012540#include <sys/socket.h>
12541#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012542#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012543
Martin v. Löwis11437992002-04-12 09:54:03 +000012544int
12545main ()
12546{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012547getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 ;
12549 return 0;
12550}
12551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012552if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012553 have_getaddrinfo=yes
12554else
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012557rm -f core conftest.err conftest.$ac_objext \
12558 conftest$ac_exeext conftest.$ac_ext
12559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12560$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012561if test $have_getaddrinfo = yes
12562then
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12564$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012565 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012567else
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012569
12570if test "${enable_ipv6+set}" = set; then
12571 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12572else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012573 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012574fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012578
Stefan Krah19c21392012-11-22 23:47:32 +010012579#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012580#include <sys/types.h>
12581#include <netdb.h>
12582#include <string.h>
12583#include <sys/socket.h>
12584#include <netinet/in.h>
12585
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012586int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012587{
12588 int passive, gaierr, inet4 = 0, inet6 = 0;
12589 struct addrinfo hints, *ai, *aitop;
12590 char straddr[INET6_ADDRSTRLEN], strport[16];
12591
12592 for (passive = 0; passive <= 1; passive++) {
12593 memset(&hints, 0, sizeof(hints));
12594 hints.ai_family = AF_UNSPEC;
12595 hints.ai_flags = passive ? AI_PASSIVE : 0;
12596 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012597 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012598 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12599 (void)gai_strerror(gaierr);
12600 goto bad;
12601 }
12602 for (ai = aitop; ai; ai = ai->ai_next) {
12603 if (ai->ai_addr == NULL ||
12604 ai->ai_addrlen == 0 ||
12605 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12606 straddr, sizeof(straddr), strport, sizeof(strport),
12607 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12608 goto bad;
12609 }
12610 switch (ai->ai_family) {
12611 case AF_INET:
12612 if (strcmp(strport, "54321") != 0) {
12613 goto bad;
12614 }
12615 if (passive) {
12616 if (strcmp(straddr, "0.0.0.0") != 0) {
12617 goto bad;
12618 }
12619 } else {
12620 if (strcmp(straddr, "127.0.0.1") != 0) {
12621 goto bad;
12622 }
12623 }
12624 inet4++;
12625 break;
12626 case AF_INET6:
12627 if (strcmp(strport, "54321") != 0) {
12628 goto bad;
12629 }
12630 if (passive) {
12631 if (strcmp(straddr, "::") != 0) {
12632 goto bad;
12633 }
12634 } else {
12635 if (strcmp(straddr, "::1") != 0) {
12636 goto bad;
12637 }
12638 }
12639 inet6++;
12640 break;
12641 case AF_UNSPEC:
12642 goto bad;
12643 break;
12644 default:
12645 /* another family support? */
12646 break;
12647 }
12648 }
12649 }
12650
12651 if (!(inet4 == 0 || inet4 == 2))
12652 goto bad;
12653 if (!(inet6 == 0 || inet6 == 2))
12654 goto bad;
12655
12656 if (aitop)
12657 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012658 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012659
12660 bad:
12661 if (aitop)
12662 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012663 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012664}
12665
Martin v. Löwis11437992002-04-12 09:54:03 +000012666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012667if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012668 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012669else
Matthias Kloseb9621712010-04-24 17:59:49 +000012670 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012676fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012677
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12681$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12682
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012683if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012684then
12685 if test $ipv6 = yes
12686 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012687 echo 'Fatal: You must get working getaddrinfo() function.'
12688 echo ' or you can specify "--disable-ipv6"'.
12689 exit 1
12690 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012691else
Martin v. Löwis11437992002-04-12 09:54:03 +000012692
Matthias Kloseb9621712010-04-24 17:59:49 +000012693$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012694
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012695fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012696
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012697for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012698do :
12699 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012700if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012702#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012703_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012704
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012705fi
12706done
12707
Michael W. Hudson54241132001-12-07 15:38:26 +000012708
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12711$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012712if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714else
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012716/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012717#include <sys/types.h>
12718#include <sys/time.h>
12719#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Martin v. Löwis11437992002-04-12 09:54:03 +000012721int
12722main ()
12723{
12724if ((struct tm *) 0)
12725return 0;
12726 ;
12727 return 0;
12728}
12729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012730if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012731 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012732else
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12738$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012739if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012742
12743fi
12744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12746$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012747if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749else
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012751/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012752#include <sys/types.h>
12753#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012754
Martin v. Löwis11437992002-04-12 09:54:03 +000012755int
12756main ()
12757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758struct tm tm;
12759 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 ;
12762 return 0;
12763}
12764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012765if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012766 ac_cv_struct_tm=time.h
12767else
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12773$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012774if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Matthias Kloseb9621712010-04-24 17:59:49 +000012776$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012777
12778fi
12779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780ac_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 +000012781#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783"
Victor Stinnere0be4232011-10-25 13:06:09 +020012784if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012785
12786cat >>confdefs.h <<_ACEOF
12787#define HAVE_STRUCT_TM_TM_ZONE 1
12788_ACEOF
12789
12790
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012792
Martin v. Löwis11437992002-04-12 09:54:03 +000012793if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12794
Matthias Kloseb9621712010-04-24 17:59:49 +000012795$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012796
12797else
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12799"
Victor Stinnere0be4232011-10-25 13:06:09 +020012800if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802else
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012804fi
12805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012807#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808_ACEOF
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12811$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012812if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814else
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012816/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012817#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012818#if !HAVE_DECL_TZNAME
12819extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822int
12823main ()
12824{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 ;
12827 return 0;
12828}
12829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012831 ac_cv_var_tzname=yes
12832else
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012835rm -f core conftest.err conftest.$ac_objext \
12836 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12839$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012840 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012843
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012844 fi
12845fi
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847ac_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 +020012848if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
12850cat >>confdefs.h <<_ACEOF
12851#define HAVE_STRUCT_STAT_ST_RDEV 1
12852_ACEOF
12853
12854
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012855fi
12856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857ac_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 +020012858if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012859
Martin v. Löwis11437992002-04-12 09:54:03 +000012860cat >>confdefs.h <<_ACEOF
12861#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12862_ACEOF
12863
12864
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012865fi
12866
Matthias Kloseb9621712010-04-24 17:59:49 +000012867ac_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 +020012868if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012869
12870cat >>confdefs.h <<_ACEOF
12871#define HAVE_STRUCT_STAT_ST_FLAGS 1
12872_ACEOF
12873
12874
12875fi
12876
Matthias Kloseb9621712010-04-24 17:59:49 +000012877ac_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 +020012878if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012879
12880cat >>confdefs.h <<_ACEOF
12881#define HAVE_STRUCT_STAT_ST_GEN 1
12882_ACEOF
12883
12884
12885fi
12886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887ac_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 +020012888if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012889
12890cat >>confdefs.h <<_ACEOF
12891#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12892_ACEOF
12893
12894
12895fi
12896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897ac_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 +020012898if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012899
Martin v. Löwis11437992002-04-12 09:54:03 +000012900cat >>confdefs.h <<_ACEOF
12901#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12902_ACEOF
12903
12904
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012905fi
12906
Stefan Krah267b6392016-04-26 01:09:18 +020012907ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12908 #include <sys/types.h>
12909 #include <pwd.h>
12910
12911"
12912if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12913
12914cat >>confdefs.h <<_ACEOF
12915#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12916_ACEOF
12917
12918
12919fi
12920ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12921 #include <sys/types.h>
12922 #include <pwd.h>
12923
12924"
12925if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12926
12927cat >>confdefs.h <<_ACEOF
12928#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12929_ACEOF
12930
12931
12932fi
12933
Michael W. Hudson54241132001-12-07 15:38:26 +000012934
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12936$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012937if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012939else
Matthias Kloseb159a552010-04-25 21:00:44 +000012940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012942/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012943#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012944int
12945main ()
12946{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012947return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 ;
12949 return 0;
12950}
12951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012952if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953 ac_cv_header_time_altzone=yes
12954else
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 ac_cv_header_time_altzone=no
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 Kloseb159a552010-04-25 21:00:44 +000012958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959fi
12960
Matthias Kloseb9621712010-04-24 17:59:49 +000012961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12962$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012964
Matthias Kloseb9621712010-04-24 17:59:49 +000012965$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966
12967fi
12968
Guido van Rossumda88dad1995-01-26 00:46:29 +000012969was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12971$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012973/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012974
12975#include <sys/types.h>
12976#include <sys/select.h>
12977#include <sys/time.h>
12978
Martin v. Löwis11437992002-04-12 09:54:03 +000012979int
12980main ()
12981{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012982;
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 ;
12984 return 0;
12985}
12986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012992 was_it_defined=yes
12993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12997$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13000$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013001if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013005/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013006#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013007int
13008main ()
13009{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013010struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ;
13012 return 0;
13013}
13014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013015if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013016 ac_cv_struct_addrinfo=yes
13017else
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13021fi
13022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13024$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013025if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013028
13029fi
13030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13032$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013033if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013035else
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013037/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013038
13039# include <sys/types.h>
13040# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013041int
13042main ()
13043{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013044struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ;
13046 return 0;
13047}
13048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013049if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013050 ac_cv_struct_sockaddr_storage=yes
13051else
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 ac_cv_struct_sockaddr_storage=no
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
13055fi
13056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13058$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013059if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013062
13063fi
13064
Guido van Rossum627b2d71993-12-24 10:39:16 +000013065# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13068$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013069if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013074$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013075int
13076main ()
13077{
13078static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013079test_array [0] = 0;
13080return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013081
13082 ;
13083 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013084}
Martin v. Löwis11437992002-04-12 09:54:03 +000013085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013086if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013087 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013088else
Matthias Kloseb9621712010-04-24 17:59:49 +000013089 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13094$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013095if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013097
13098fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13101$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013102if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013106/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013107
Martin v. Löwis11437992002-04-12 09:54:03 +000013108int
13109main ()
13110{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013111
Martin v. Löwis11437992002-04-12 09:54:03 +000013112#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013113 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013115 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117 char const *const *pcpcc;
13118 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 /* NEC SVR4.0.2 mips cc rejects this. */
13120 struct point {int x, y;};
13121 static struct point const zero = {0,0};
13122 /* AIX XL C 1.02.0.0 rejects this.
13123 It does not let you subtract one const X* pointer from another in
13124 an arm of an if-expression whose if-part is not a constant
13125 expression */
13126 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013129 ++pcpcc;
13130 ppc = (char**) pcpcc;
13131 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013132 { /* SCO 3.2v4 cc rejects this sort of thing. */
13133 char tx;
13134 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013136
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 }
13140 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13141 int x[] = {25, 17};
13142 const int *foo = &x[0];
13143 ++foo;
13144 }
13145 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13146 typedef const int *iptr;
13147 iptr p = 0;
13148 ++p;
13149 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013150 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013152 struct s { int j; const int *ap[3]; } bx;
13153 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 }
13155 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13156 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013157 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013159 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013160#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013161
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 ;
13163 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013164}
Martin v. Löwis11437992002-04-12 09:54:03 +000013165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013166if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013167 ac_cv_c_const=yes
13168else
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13174$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013175if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013176
Matthias Kloseb9621712010-04-24 17:59:49 +000013177$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013178
13179fi
13180
Michael W. Hudson54241132001-12-07 15:38:26 +000013181
Guido van Rossumda88dad1995-01-26 00:46:29 +000013182works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13184$as_echo_n "checking for working volatile... " >&6; }
13185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013186/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013187
Martin v. Löwis11437992002-04-12 09:54:03 +000013188int
13189main ()
13190{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013191volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013192 ;
13193 return 0;
13194}
13195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013196if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013197 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013198else
Skip Montanaro6dead952003-09-25 14:50:04 +000013199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013201
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013202
Guido van Rossum627b2d71993-12-24 10:39:16 +000013203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13206$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013207
Guido van Rossumda88dad1995-01-26 00:46:29 +000013208works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13210$as_echo_n "checking for working signed char... " >&6; }
13211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013212/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013213
Martin v. Löwis11437992002-04-12 09:54:03 +000013214int
13215main ()
13216{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013217signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 ;
13219 return 0;
13220}
13221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013222if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013223 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013224else
Skip Montanaro6dead952003-09-25 14:50:04 +000013225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013227
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013228
Guido van Rossum7f43da71994-08-01 12:15:30 +000013229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13232$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013233
Guido van Rossumda88dad1995-01-26 00:46:29 +000013234have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13236$as_echo_n "checking for prototypes... " >&6; }
13237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013238/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013239int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013240int
13241main ()
13242{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 ;
13245 return 0;
13246}
13247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013248if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
Matthias Kloseb9621712010-04-24 17:59:49 +000013250$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
Matthias Kloseb159a552010-04-25 21:00:44 +000013252 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13256$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013257
Guido van Rossumda88dad1995-01-26 00:46:29 +000013258works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13260$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013262/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013263
13264#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013265int foo(int x, ...) {
13266 va_list va;
13267 va_start(va, x);
13268 va_arg(va, int);
13269 va_arg(va, char *);
13270 va_arg(va, double);
13271 return 0;
13272}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013273
Martin v. Löwis11437992002-04-12 09:54:03 +000013274int
13275main ()
13276{
Guido van Rossum90eea071996-08-30 20:58:57 +000013277return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013278 ;
13279 return 0;
13280}
13281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013283
13284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013287 works=yes
13288
Guido van Rossum627b2d71993-12-24 10:39:16 +000013289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13292$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293
Martin v. Löwisd6320502004-08-12 13:45:08 +000013294# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13296$as_echo_n "checking for socketpair... " >&6; }
13297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013298/* end confdefs.h. */
13299
13300#include <sys/types.h>
13301#include <sys/socket.h>
13302
13303int
13304main ()
13305{
13306void *x=socketpair
13307 ;
13308 return 0;
13309}
13310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013314
Matthias Kloseb159a552010-04-25 21:00:44 +000013315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013316$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13319$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013320
13321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013323
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13326$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013328/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013329#include <sys/types.h>
13330#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013331int
13332main ()
13333{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013334struct sockaddr x;
13335x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013336 ;
13337 return 0;
13338}
13339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013340if ac_fn_c_try_compile "$LINENO"; then :
13341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13342$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013343
Matthias Kloseb9621712010-04-24 17:59:49 +000013344$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013345
13346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13348$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013349
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013352
Guido van Rossumda88dad1995-01-26 00:46:29 +000013353va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13355$as_echo_n "checking whether va_list is an array... " >&6; }
13356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013357/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358
13359#ifdef HAVE_STDARG_PROTOTYPES
13360#include <stdarg.h>
13361#else
13362#include <varargs.h>
13363#endif
13364
Martin v. Löwis11437992002-04-12 09:54:03 +000013365int
13366main ()
13367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 ;
13370 return 0;
13371}
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
13374
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375else
Skip Montanaro6dead952003-09-25 14:50:04 +000013376
Martin v. Löwis11437992002-04-12 09:54:03 +000013377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Guido van Rossumda88dad1995-01-26 00:46:29 +000013380 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13385$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013386
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013387# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
13389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013391if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13396$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013397 OLD_CFLAGS=$CFLAGS
13398 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013400/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013401
13402# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404int
13405main ()
13406{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013407
13408 char *name;
13409 struct hostent *he, *res;
13410 char buffer[2048];
13411 int buflen = 2048;
13412 int h_errnop;
13413
13414 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
13416 ;
13417 return 0;
13418}
13419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013423
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13428$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013430else
Skip Montanaro6dead952003-09-25 14:50:04 +000013431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13433$as_echo "no" >&6; }
13434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13435$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013438
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013439# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441int
13442main ()
13443{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013444
13445 char *name;
13446 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013447 char buffer[2048];
13448 int buflen = 2048;
13449 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013450
Matthias Kloseb159a552010-04-25 21:00:44 +000013451 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013452
13453 ;
13454 return 0;
13455}
13456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461
Matthias Kloseb159a552010-04-25 21:00:44 +000013462$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13465$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013466
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013467else
Skip Montanaro6dead952003-09-25 14:50:04 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13470$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13472$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13474/* end confdefs.h. */
13475
13476# include <netdb.h>
13477
13478int
13479main ()
13480{
13481
13482 char *name;
13483 struct hostent *he;
13484 struct hostent_data data;
13485
13486 (void) gethostbyname_r(name, he, &data);
13487
13488 ;
13489 return 0;
13490}
13491_ACEOF
13492if ac_fn_c_try_compile "$LINENO"; then :
13493
13494 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13495
13496
13497$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13498
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13500$as_echo "yes" >&6; }
13501
13502else
13503
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13505$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013512
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013515 CFLAGS=$OLD_CFLAGS
13516
13517else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 for ac_func in gethostbyname
13520do :
13521 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013522if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013524#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013525_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013527fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013528done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013529
Michael W. Hudson54241132001-12-07 15:38:26 +000013530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013531fi
13532
Michael W. Hudson54241132001-12-07 15:38:26 +000013533
13534
13535
13536
13537
13538
Guido van Rossum627b2d71993-12-24 10:39:16 +000013539# checks for system services
13540# (none yet)
13541
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013543ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013544if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013545
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13548$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013549if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013551else
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013553LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013557/* Override any GCC internal prototype to avoid an error.
13558 Use char because int might match the return type of a GCC
13559 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013560#ifdef __cplusplus
13561extern "C"
13562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013563char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013564int
13565main ()
13566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013568 ;
13569 return 0;
13570}
13571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013572if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013577rm -f core conftest.err conftest.$ac_objext \
13578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013579LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13582$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013583if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 cat >>confdefs.h <<_ACEOF
13585#define HAVE_LIBIEEE 1
13586_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013587
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013588 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013589
Guido van Rossum627b2d71993-12-24 10:39:16 +000013590fi
13591
Michael W. Hudson54241132001-12-07 15:38:26 +000013592
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013593fi
13594
Michael W. Hudson54241132001-12-07 15:38:26 +000013595
Guido van Rossum7f253911997-05-09 02:42:48 +000013596# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13598$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013600# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013601if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013602 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013603if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013604then
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13609$as_echo "yes" >&6; }
13610else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13611$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013612fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13615$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616fi
13617
Guido van Rossum7f253911997-05-09 02:42:48 +000013618
Guido van Rossum7f43da71994-08-01 12:15:30 +000013619# check for --with-libm=...
13620
Guido van Rossum563e7081996-09-10 18:20:48 +000013621case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013622Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013623*) LIBM=-lm
13624esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13626$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013629if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013631if test "$withval" = no
13632then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13634$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013635elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013636then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13638$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013639else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013640fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13643$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013644fi
13645
Guido van Rossum7f43da71994-08-01 12:15:30 +000013646
13647# check for --with-libc=...
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13650$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013652# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013653if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013655if test "$withval" = no
13656then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13658$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013659elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013660then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13662$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013663else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013664fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13667$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668fi
13669
Guido van Rossum7f43da71994-08-01 12:15:30 +000013670
Stefan Krah1919b7e2012-03-21 18:25:23 +010013671# **************************************
13672# * Check for gcc x64 inline assembler *
13673# **************************************
13674
13675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13676$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13678/* end confdefs.h. */
13679
13680int
13681main ()
13682{
13683
13684 __asm__ __volatile__ ("movq %rcx, %rax");
13685
13686 ;
13687 return 0;
13688}
13689_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013690if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013691 have_gcc_asm_for_x64=yes
13692else
13693 have_gcc_asm_for_x64=no
13694fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013695rm -f core conftest.err conftest.$ac_objext \
13696 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13698$as_echo "$have_gcc_asm_for_x64" >&6; }
13699if test "$have_gcc_asm_for_x64" = yes
13700then
13701
13702$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13703
13704fi
13705
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013706# **************************************************
13707# * Check for various properties of floating point *
13708# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13711$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013712if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013714else
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013717 ac_cv_little_endian_double=no
13718else
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013720/* end confdefs.h. */
13721
13722#include <string.h>
13723int main() {
13724 double x = 9006104071832581.0;
13725 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13726 return 0;
13727 else
13728 return 1;
13729}
13730
13731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013732if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013733 ac_cv_little_endian_double=yes
13734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013739fi
13740
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013741fi
13742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13744$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013745if test "$ac_cv_little_endian_double" = yes
13746then
13747
Matthias Kloseb9621712010-04-24 17:59:49 +000013748$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013749
13750fi
13751
Matthias Kloseb9621712010-04-24 17:59:49 +000013752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13753$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013754if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013756else
13757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013759 ac_cv_big_endian_double=no
13760else
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013762/* end confdefs.h. */
13763
13764#include <string.h>
13765int main() {
13766 double x = 9006104071832581.0;
13767 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13768 return 0;
13769 else
13770 return 1;
13771}
13772
13773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013774if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013775 ac_cv_big_endian_double=yes
13776else
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013781fi
13782
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013783fi
13784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13786$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013787if test "$ac_cv_big_endian_double" = yes
13788then
13789
Matthias Kloseb9621712010-04-24 17:59:49 +000013790$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013791
13792fi
13793
13794# Some ARM platforms use a mixed-endian representation for doubles.
13795# While Python doesn't currently have full support for these platforms
13796# (see e.g., issue 1762561), we can at least make sure that float <-> string
13797# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13799$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013800if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013802else
13803
Matthias Kloseb9621712010-04-24 17:59:49 +000013804if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013805 ac_cv_mixed_endian_double=no
13806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013808/* end confdefs.h. */
13809
13810#include <string.h>
13811int main() {
13812 double x = 9006104071832581.0;
13813 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13814 return 0;
13815 else
13816 return 1;
13817}
13818
13819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013820if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821 ac_cv_mixed_endian_double=yes
13822else
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13826 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013827fi
13828
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829fi
13830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13832$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013833if test "$ac_cv_mixed_endian_double" = yes
13834then
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013837
13838fi
13839
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013840# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013841# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013842# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013843# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013844# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013845# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013846
13847# This inline assembler syntax may also work for suncc and icc,
13848# so we try it on all platforms.
13849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13851$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013853/* end confdefs.h. */
13854
13855int
13856main ()
13857{
13858
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013859 unsigned short cw;
13860 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13861 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013862
13863 ;
13864 return 0;
13865}
13866_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013867if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013868 have_gcc_asm_for_x87=yes
13869else
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013871fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013872rm -f core conftest.err conftest.$ac_objext \
13873 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13875$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013876if test "$have_gcc_asm_for_x87" = yes
13877then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013880
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013881fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013882
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13884$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13886/* end confdefs.h. */
13887
13888int
13889main ()
13890{
13891
13892 unsigned int fpcr;
13893 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13894 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13895
13896 ;
13897 return 0;
13898}
13899_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013900if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013901 have_gcc_asm_for_mc68881=yes
13902else
13903 have_gcc_asm_for_mc68881=no
13904fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013905rm -f core conftest.err conftest.$ac_objext \
13906 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13908$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13909if test "$have_gcc_asm_for_mc68881" = yes
13910then
13911
13912$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13913
13914fi
13915
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013916# Detect whether system arithmetic is subject to x87-style double
13917# rounding issues. The result of this test has little meaning on non
13918# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13919# mode is round-to-nearest and double rounding issues are present, and
13920# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13922$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013923# $BASECFLAGS may affect the result
13924ac_save_cc="$CC"
13925CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013926if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013927 ac_cv_x87_double_rounding=no
13928else
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013930/* end confdefs.h. */
13931
13932#include <stdlib.h>
13933#include <math.h>
13934int main() {
13935 volatile double x, y, z;
13936 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13937 x = 0.99999999999999989; /* 1-2**-53 */
13938 y = 1./x;
13939 if (y != 1.)
13940 exit(0);
13941 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13942 x = 1e16;
13943 y = 2.99999;
13944 z = x + y;
13945 if (z != 1e16+4.)
13946 exit(0);
13947 /* both tests show evidence of double rounding */
13948 exit(1);
13949}
13950
13951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013952if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013953 ac_cv_x87_double_rounding=no
13954else
Matthias Kloseb9621712010-04-24 17:59:49 +000013955 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13958 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013959fi
13960
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013961CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13963$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013964if test "$ac_cv_x87_double_rounding" = yes
13965then
13966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013968
13969fi
13970
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971# ************************************
13972# * Check for mathematical functions *
13973# ************************************
13974
13975LIBS_SAVE=$LIBS
13976LIBS="$LIBS $LIBM"
13977
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013978for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13979do :
13980 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13981ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013982if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013983 cat >>confdefs.h <<_ACEOF
13984#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13985_ACEOF
13986
13987fi
13988done
13989
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013990for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013991do :
13992 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13993ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013994if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013995 cat >>confdefs.h <<_ACEOF
13996#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13997_ACEOF
13998
13999fi
14000done
14001
14002ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14003"
Victor Stinnere0be4232011-10-25 13:06:09 +020014004if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014005 ac_have_decl=1
14006else
14007 ac_have_decl=0
14008fi
14009
14010cat >>confdefs.h <<_ACEOF
14011#define HAVE_DECL_ISINF $ac_have_decl
14012_ACEOF
14013ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14014"
Victor Stinnere0be4232011-10-25 13:06:09 +020014015if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014016 ac_have_decl=1
14017else
14018 ac_have_decl=0
14019fi
14020
14021cat >>confdefs.h <<_ACEOF
14022#define HAVE_DECL_ISNAN $ac_have_decl
14023_ACEOF
14024ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14025"
Victor Stinnere0be4232011-10-25 13:06:09 +020014026if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014027 ac_have_decl=1
14028else
14029 ac_have_decl=0
14030fi
14031
14032cat >>confdefs.h <<_ACEOF
14033#define HAVE_DECL_ISFINITE $ac_have_decl
14034_ACEOF
14035
14036
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014037# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14038# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14040$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014041if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014043else
14044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014046 ac_cv_tanh_preserves_zero_sign=no
14047else
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014049/* end confdefs.h. */
14050
14051#include <math.h>
14052#include <stdlib.h>
14053int main() {
14054 /* return 0 if either negative zeros don't exist
14055 on this platform or if negative zeros exist
14056 and tanh(-0.) == -0. */
14057 if (atan2(0., -1.) == atan2(-0., -1.) ||
14058 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14059 else exit(1);
14060}
14061
14062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014063if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014064 ac_cv_tanh_preserves_zero_sign=yes
14065else
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14069 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014070fi
14071
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014072fi
14073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14075$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014076if test "$ac_cv_tanh_preserves_zero_sign" = yes
14077then
14078
Matthias Kloseb9621712010-04-24 17:59:49 +000014079$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014080
14081fi
14082
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014083if test "$ac_cv_func_log1p" = yes
14084then
14085 # On some versions of AIX, log1p(-0.) returns 0. instead of
14086 # -0. See issue #9920.
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14088$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014089 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014090 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014091else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014092
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014093 if test "$cross_compiling" = yes; then :
14094 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014095else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14097/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014098
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014099 #include <math.h>
14100 #include <stdlib.h>
14101 int main() {
14102 /* Fail if the signs of log1p(-0.) and -0. can be
14103 distinguished. */
14104 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14105 return 0;
14106 else
14107 return 1;
14108 }
14109
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014110_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014111if ac_fn_c_try_run "$LINENO"; then :
14112 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014113else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014114 ac_cv_log1p_drops_zero_sign=yes
14115fi
14116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14117 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014118fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014119
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014120fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014121
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14123$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14124fi
14125if test "$ac_cv_log1p_drops_zero_sign" = yes
14126then
14127
14128$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14129
14130fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014131
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014132LIBS=$LIBS_SAVE
14133
Mark Dickinsona614f042009-11-28 12:48:43 +000014134# For multiprocessing module, check that sem_open
14135# actually works. For FreeBSD versions <= 7.2,
14136# the kernel module that provides POSIX semaphores
14137# isn't loaded by default, so an attempt to call
14138# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14140$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014141if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014143else
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014145 ac_cv_posix_semaphores_enabled=yes
14146else
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014148/* end confdefs.h. */
14149
14150#include <unistd.h>
14151#include <fcntl.h>
14152#include <stdio.h>
14153#include <semaphore.h>
14154#include <sys/stat.h>
14155
14156int main(void) {
14157 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14158 if (a == SEM_FAILED) {
14159 perror("sem_open");
14160 return 1;
14161 }
14162 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014163 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014164 return 0;
14165}
14166
14167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014168if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014169 ac_cv_posix_semaphores_enabled=yes
14170else
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014175fi
14176
14177
Mark Dickinsona614f042009-11-28 12:48:43 +000014178fi
14179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14181$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014182if test $ac_cv_posix_semaphores_enabled = no
14183then
14184
Matthias Kloseb9621712010-04-24 17:59:49 +000014185$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014186
14187fi
14188
Mark Dickinson10683072009-04-18 21:18:19 +000014189# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14191$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014192if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014196 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014197else
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014199/* end confdefs.h. */
14200
14201#include <unistd.h>
14202#include <fcntl.h>
14203#include <stdio.h>
14204#include <semaphore.h>
14205#include <sys/stat.h>
14206
14207int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014208 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014209 int count;
14210 int res;
14211 if(a==SEM_FAILED){
14212 perror("sem_open");
14213 return 1;
14214
14215 }
14216 res = sem_getvalue(a, &count);
14217 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014218 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014219 return res==-1 ? 1 : 0;
14220}
14221
Mark Dickinson10683072009-04-18 21:18:19 +000014222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014223if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014224 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014225else
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14229 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014230fi
14231
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014232
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014233fi
14234
Matthias Kloseb9621712010-04-24 17:59:49 +000014235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14236$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014237if test $ac_cv_broken_sem_getvalue = yes
14238then
14239
Matthias Kloseb9621712010-04-24 17:59:49 +000014240$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014241
14242fi
14243
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014244ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14245"
14246if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14247 ac_have_decl=1
14248else
14249 ac_have_decl=0
14250fi
14251
14252cat >>confdefs.h <<_ACEOF
14253#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14254_ACEOF
14255ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14256"
14257if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14258 ac_have_decl=1
14259else
14260 ac_have_decl=0
14261fi
14262
14263cat >>confdefs.h <<_ACEOF
14264#define HAVE_DECL_RTLD_NOW $ac_have_decl
14265_ACEOF
14266ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14267"
14268if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14269 ac_have_decl=1
14270else
14271 ac_have_decl=0
14272fi
14273
14274cat >>confdefs.h <<_ACEOF
14275#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14276_ACEOF
14277ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14278"
14279if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14280 ac_have_decl=1
14281else
14282 ac_have_decl=0
14283fi
14284
14285cat >>confdefs.h <<_ACEOF
14286#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14287_ACEOF
14288ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14289"
14290if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14291 ac_have_decl=1
14292else
14293 ac_have_decl=0
14294fi
14295
14296cat >>confdefs.h <<_ACEOF
14297#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14298_ACEOF
14299ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14300"
14301if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14302 ac_have_decl=1
14303else
14304 ac_have_decl=0
14305fi
14306
14307cat >>confdefs.h <<_ACEOF
14308#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14309_ACEOF
14310ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14311"
14312if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14313 ac_have_decl=1
14314else
14315 ac_have_decl=0
14316fi
14317
14318cat >>confdefs.h <<_ACEOF
14319#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14320_ACEOF
14321
14322
Mark Dickinsonbd792642009-03-18 20:06:12 +000014323# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14325$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014326# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014327if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014328 enableval=$enable_big_digits; case $enable_big_digits in
14329yes)
14330 enable_big_digits=30 ;;
14331no)
14332 enable_big_digits=15 ;;
1433315|30)
14334 ;;
14335*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014336 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 +000014337esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14339$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014340
14341cat >>confdefs.h <<_ACEOF
14342#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14343_ACEOF
14344
14345
14346else
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14348$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014349fi
14350
14351
Guido van Rossumef2255b2000-03-10 22:30:29 +000014352# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014353ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014354if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
14356
Matthias Kloseb9621712010-04-24 17:59:49 +000014357$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014359 wchar_h="yes"
14360
Guido van Rossumef2255b2000-03-10 22:30:29 +000014361else
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014363
14364fi
14365
Michael W. Hudson54241132001-12-07 15:38:26 +000014366
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014368# determine wchar_t size
14369if test "$wchar_h" = yes
14370then
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14374# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14376$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014377if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014379else
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14381"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Martin v. Löwis11437992002-04-12 09:54:03 +000014383else
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 if test "$ac_cv_type_wchar_t" = yes; then
14385 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014387as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014388See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389 else
14390 ac_cv_sizeof_wchar_t=0
14391 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014393
Martin v. Löwis11437992002-04-12 09:54:03 +000014394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14396$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397
14398
14399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014401#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014402_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014403
Michael W. Hudson54241132001-12-07 15:38:26 +000014404
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014405fi
14406
Matthias Kloseb9621712010-04-24 17:59:49 +000014407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14408$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014409have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014411/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014412
14413#include <tcl.h>
14414#if TCL_UTF_MAX != 6
14415# error "NOT UCS4_TCL"
14416#endif
14417int
14418main ()
14419{
14420
14421 ;
14422 return 0;
14423}
14424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014426
14427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014429
14430 have_ucs4_tcl=yes
14431
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14435$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014436
Skip Montanaro6dead952003-09-25 14:50:04 +000014437# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014438if test "$wchar_h" = yes
14439then
14440 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14442$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014443 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014445else
14446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014448 ac_cv_wchar_t_signed=yes
14449else
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014451/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014452
14453 #include <wchar.h>
14454 int main()
14455 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014456 /* Success: exit code 0 */
14457 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014458 }
14459
14460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014461if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014462 ac_cv_wchar_t_signed=yes
14463else
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14467 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014468fi
14469
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014470fi
14471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14473$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474fi
14475
Georg Brandl52d168a2008-01-07 18:10:24 +000014476# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014477if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014478 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014479then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014480 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014483
Georg Brandl52d168a2008-01-07 18:10:24 +000014484else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014485 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014486fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14488$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014489
14490# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14492$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014493if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014495else
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 ac_cv_c_bigendian=unknown
14497 # See if we're dealing with a universal compiler.
14498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14499/* end confdefs.h. */
14500#ifndef __APPLE_CC__
14501 not a universal capable compiler
14502 #endif
14503 typedef int dummy;
14504
Skip Montanaro6dead952003-09-25 14:50:04 +000014505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014506if ac_fn_c_try_compile "$LINENO"; then :
14507
14508 # Check for potential -arch flags. It is not universal unless
14509 # there are at least two -arch flags with different values.
14510 ac_arch=
14511 ac_prev=
14512 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14513 if test -n "$ac_prev"; then
14514 case $ac_word in
14515 i?86 | x86_64 | ppc | ppc64)
14516 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14517 ac_arch=$ac_word
14518 else
14519 ac_cv_c_bigendian=universal
14520 break
14521 fi
14522 ;;
14523 esac
14524 ac_prev=
14525 elif test "x$ac_word" = "x-arch"; then
14526 ac_prev=arch
14527 fi
14528 done
14529fi
14530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14531 if test $ac_cv_c_bigendian = unknown; then
14532 # See if sys/param.h defines the BYTE_ORDER macro.
14533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014534/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014535#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014537
Martin v. Löwis11437992002-04-12 09:54:03 +000014538int
14539main ()
14540{
Matthias Kloseb9621712010-04-24 17:59:49 +000014541#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14542 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14543 && LITTLE_ENDIAN)
14544 bogus endian macros
14545 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014546
14547 ;
14548 return 0;
14549}
14550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014551if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014552 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014554/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014555#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014557
Martin v. Löwis11437992002-04-12 09:54:03 +000014558int
14559main ()
14560{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014561#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 not big endian
14563 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014564
14565 ;
14566 return 0;
14567}
14568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014569if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014570 ac_cv_c_bigendian=yes
14571else
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014575fi
14576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14577 fi
14578 if test $ac_cv_c_bigendian = unknown; then
14579 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014581/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014582#include <limits.h>
14583
Martin v. Löwis11437992002-04-12 09:54:03 +000014584int
14585main ()
14586{
Matthias Kloseb9621712010-04-24 17:59:49 +000014587#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14588 bogus endian macros
14589 #endif
14590
Martin v. Löwis11437992002-04-12 09:54:03 +000014591 ;
14592 return 0;
14593}
14594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014595if ac_fn_c_try_compile "$LINENO"; then :
14596 # It does; now see whether it defined to _BIG_ENDIAN or not.
14597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14598/* end confdefs.h. */
14599#include <limits.h>
14600
14601int
14602main ()
14603{
14604#ifndef _BIG_ENDIAN
14605 not big endian
14606 #endif
14607
14608 ;
14609 return 0;
14610}
14611_ACEOF
14612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014614else
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14618fi
14619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14620 fi
14621 if test $ac_cv_c_bigendian = unknown; then
14622 # Compile a test program.
14623 if test "$cross_compiling" = yes; then :
14624 # Try to guess by grepping values from an object file.
14625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14626/* end confdefs.h. */
14627short int ascii_mm[] =
14628 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14629 short int ascii_ii[] =
14630 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14631 int use_ascii (int i) {
14632 return ascii_mm[i] + ascii_ii[i];
14633 }
14634 short int ebcdic_ii[] =
14635 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14636 short int ebcdic_mm[] =
14637 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14638 int use_ebcdic (int i) {
14639 return ebcdic_mm[i] + ebcdic_ii[i];
14640 }
14641 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643int
14644main ()
14645{
14646return use_ascii (foo) == use_ebcdic (foo);
14647 ;
14648 return 0;
14649}
14650_ACEOF
14651if ac_fn_c_try_compile "$LINENO"; then :
14652 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14653 ac_cv_c_bigendian=yes
14654 fi
14655 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14656 if test "$ac_cv_c_bigendian" = unknown; then
14657 ac_cv_c_bigendian=no
14658 else
14659 # finding both strings is unlikely to happen, but who knows?
14660 ac_cv_c_bigendian=unknown
14661 fi
14662 fi
14663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014665else
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014667/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014669int
14670main ()
14671{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 /* Are we little or big endian? From Harbison&Steele. */
14674 union
14675 {
14676 long int l;
14677 char c[sizeof (long int)];
14678 } u;
14679 u.l = 1;
14680 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014681
14682 ;
14683 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014684}
Martin v. Löwis11437992002-04-12 09:54:03 +000014685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014686if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014687 ac_cv_c_bigendian=no
14688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14698$as_echo "$ac_cv_c_bigendian" >&6; }
14699 case $ac_cv_c_bigendian in #(
14700 yes)
14701 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14702;; #(
14703 no)
14704 ;; #(
14705 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014708
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 ;; #(
14710 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014711 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014712 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014714
Michael W. Hudson54241132001-12-07 15:38:26 +000014715
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014716# ABI version string for Python extension modules. This appears between the
14717# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14718# from the following attributes which affect the ABI of this Python build (in
14719# this order):
14720#
14721# * The Python implementation (always 'cpython-' for us)
14722# * The major and minor version numbers
14723# * --with-pydebug (adds a 'd')
14724# * --with-pymalloc (adds a 'm')
14725# * --with-wide-unicode (adds a 'u')
14726#
14727# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014728# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14729# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014730
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14732$as_echo_n "checking ABIFLAGS... " >&6; }
14733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14734$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14736$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014737SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14739$as_echo "$SOABI" >&6; }
14740
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014741
14742case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014743 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014744 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14745 *)
14746 EXT_SUFFIX=${SHLIB_SUFFIX};;
14747esac
14748
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14750$as_echo_n "checking LDVERSION... " >&6; }
14751LDVERSION='$(VERSION)$(ABIFLAGS)'
14752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14753$as_echo "$LDVERSION" >&6; }
14754
doko@python.org87421192013-01-26 11:39:31 +010014755
doko@ubuntu.com55532312016-06-14 08:55:19 +020014756if test x$PLATFORM_TRIPLET = x; then
14757 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14758else
14759 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14760fi
doko@python.org87421192013-01-26 11:39:31 +010014761
14762
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014763# Check whether right shifting a negative integer extends the sign bit
14764# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14766$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014767if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014769else
Martin v. Löwis11437992002-04-12 09:54:03 +000014770
Matthias Kloseb9621712010-04-24 17:59:49 +000014771if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014772 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014773else
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014775/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014776
14777int main()
14778{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014779 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014780}
14781
Martin v. Löwis11437992002-04-12 09:54:03 +000014782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014783if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014784 ac_cv_rshift_extends_sign=yes
14785else
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014790fi
14791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014792fi
14793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14795$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014796if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014797then
Martin v. Löwis11437992002-04-12 09:54:03 +000014798
Matthias Kloseb9621712010-04-24 17:59:49 +000014799$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014800
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014801fi
14802
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014803# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14805$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014806if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014808else
Martin v. Löwis11437992002-04-12 09:54:03 +000014809
Matthias Kloseb9621712010-04-24 17:59:49 +000014810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014811/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014812#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014813int
14814main ()
14815{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014816
14817 FILE *f = fopen("/dev/null", "r");
14818 flockfile(f);
14819 getc_unlocked(f);
14820 funlockfile(f);
14821
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 ;
14823 return 0;
14824}
14825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014826if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014827 ac_cv_have_getc_unlocked=yes
14828else
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 ac_cv_have_getc_unlocked=no
14830fi
14831rm -f core conftest.err conftest.$ac_objext \
14832 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14836$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014837if test "$ac_cv_have_getc_unlocked" = yes
14838then
Martin v. Löwis11437992002-04-12 09:54:03 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014841
14842fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014843
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014844# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014845# save the value of LIBS so we don't actually link Python with readline
14846LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014847
Gregory P. Smith18820942008-09-07 06:24:49 +000014848# On some systems we need to link readline to a termcap compatible
14849# library. NOTE: Keep the precedence of listed libraries synchronised
14850# with setup.py.
14851py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14853$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014854for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014855 if test -z "$py_libtermcap"; then
14856 READLINE_LIBS="-lreadline"
14857 else
14858 READLINE_LIBS="-lreadline -l$py_libtermcap"
14859 fi
14860 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014862/* end confdefs.h. */
14863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864/* Override any GCC internal prototype to avoid an error.
14865 Use char because int might match the return type of a GCC
14866 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014867#ifdef __cplusplus
14868extern "C"
14869#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014870char readline ();
14871int
14872main ()
14873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014875 ;
14876 return 0;
14877}
14878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014879if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014880 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014882rm -f core conftest.err conftest.$ac_objext \
14883 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014884 if test $py_cv_lib_readline = yes; then
14885 break
14886 fi
14887done
14888# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14889#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014890if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14892$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014893else
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14895$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014896
Matthias Kloseb9621712010-04-24 17:59:49 +000014897$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014898
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014899fi
14900
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014901# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14903$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014904if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014906else
14907 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014908LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014910/* end confdefs.h. */
14911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912/* Override any GCC internal prototype to avoid an error.
14913 Use char because int might match the return type of a GCC
14914 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014915#ifdef __cplusplus
14916extern "C"
14917#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014918char rl_callback_handler_install ();
14919int
14920main ()
14921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014923 ;
14924 return 0;
14925}
14926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014927if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014928 ac_cv_lib_readline_rl_callback_handler_install=yes
14929else
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014932rm -f core conftest.err conftest.$ac_objext \
14933 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014934LIBS=$ac_check_lib_save_LIBS
14935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14937$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014938if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014939
Matthias Kloseb9621712010-04-24 17:59:49 +000014940$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941
14942fi
14943
14944
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014945# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014947/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014948#include <readline/readline.h>
14949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014950if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014951 have_readline=yes
14952else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014953 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014954
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014955fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014956rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014957if test $have_readline = yes
14958then
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014960/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014961#include <readline/readline.h>
14962
14963_ACEOF
14964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014966
Matthias Kloseb9621712010-04-24 17:59:49 +000014967$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014968
14969fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014970rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014973/* end confdefs.h. */
14974#include <readline/readline.h>
14975
14976_ACEOF
14977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014981
14982fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014983rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014984
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014985fi
14986
Martin v. Löwis0daad592001-09-30 21:09:59 +000014987# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14989$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014990if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014992else
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014994LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998/* Override any GCC internal prototype to avoid an error.
14999 Use char because int might match the return type of a GCC
15000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015001#ifdef __cplusplus
15002extern "C"
15003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015004char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015005int
15006main ()
15007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 ;
15010 return 0;
15011}
15012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015015else
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015018rm -f core conftest.err conftest.$ac_objext \
15019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015020LIBS=$ac_check_lib_save_LIBS
15021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15023$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015024if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015025
Matthias Kloseb9621712010-04-24 17:59:49 +000015026$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015027
Martin v. Löwis0daad592001-09-30 21:09:59 +000015028fi
15029
Michael W. Hudson54241132001-12-07 15:38:26 +000015030
Thomas Wouters89d996e2007-09-08 17:39:28 +000015031# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15033$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015034if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015035 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015036else
15037 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015038LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015040/* end confdefs.h. */
15041
15042/* Override any GCC internal prototype to avoid an error.
15043 Use char because int might match the return type of a GCC
15044 builtin and then its argument prototype would still apply. */
15045#ifdef __cplusplus
15046extern "C"
15047#endif
15048char rl_completion_display_matches_hook ();
15049int
15050main ()
15051{
15052return rl_completion_display_matches_hook ();
15053 ;
15054 return 0;
15055}
15056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015057if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015058 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15059else
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015062rm -f core conftest.err conftest.$ac_objext \
15063 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015064LIBS=$ac_check_lib_save_LIBS
15065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15067$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015068if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015069
Matthias Kloseb9621712010-04-24 17:59:49 +000015070$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015071
15072fi
15073
15074
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015075# also in 4.0, but not in editline
15076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15077$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15078if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15079 $as_echo_n "(cached) " >&6
15080else
15081 ac_check_lib_save_LIBS=$LIBS
15082LIBS="-lreadline $READLINE_LIBS $LIBS"
15083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084/* end confdefs.h. */
15085
15086/* Override any GCC internal prototype to avoid an error.
15087 Use char because int might match the return type of a GCC
15088 builtin and then its argument prototype would still apply. */
15089#ifdef __cplusplus
15090extern "C"
15091#endif
15092char rl_resize_terminal ();
15093int
15094main ()
15095{
15096return rl_resize_terminal ();
15097 ;
15098 return 0;
15099}
15100_ACEOF
15101if ac_fn_c_try_link "$LINENO"; then :
15102 ac_cv_lib_readline_rl_resize_terminal=yes
15103else
15104 ac_cv_lib_readline_rl_resize_terminal=no
15105fi
15106rm -f core conftest.err conftest.$ac_objext \
15107 conftest$ac_exeext conftest.$ac_ext
15108LIBS=$ac_check_lib_save_LIBS
15109fi
15110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15111$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15112if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15113
15114$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15115
15116fi
15117
15118
Martin v. Löwis0daad592001-09-30 21:09:59 +000015119# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15121$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015122if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015124else
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015126LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130/* Override any GCC internal prototype to avoid an error.
15131 Use char because int might match the return type of a GCC
15132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015133#ifdef __cplusplus
15134extern "C"
15135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015136char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015137int
15138main ()
15139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 ;
15142 return 0;
15143}
15144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015147else
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015150rm -f core conftest.err conftest.$ac_objext \
15151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015152LIBS=$ac_check_lib_save_LIBS
15153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15155$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015156if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015157
Matthias Kloseb9621712010-04-24 17:59:49 +000015158$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015159
Guido van Rossum353ae582001-07-10 16:45:32 +000015160fi
15161
Jack Jansendd19cf82001-12-06 22:36:17 +000015162
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015163# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015165/* end confdefs.h. */
15166#include <readline/readline.h>
15167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015169 have_readline=yes
15170else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015172
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015173fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015174rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015175if test $have_readline = yes
15176then
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015178/* end confdefs.h. */
15179#include <readline/readline.h>
15180
15181_ACEOF
15182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015184
Matthias Kloseb9621712010-04-24 17:59:49 +000015185$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015186
15187fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015188rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189
15190fi
15191
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15193$as_echo_n "checking for append_history in -lreadline... " >&6; }
15194if ${ac_cv_lib_readline_append_history+:} false; then :
15195 $as_echo_n "(cached) " >&6
15196else
15197 ac_check_lib_save_LIBS=$LIBS
15198LIBS="-lreadline $READLINE_LIBS $LIBS"
15199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15200/* end confdefs.h. */
15201
15202/* Override any GCC internal prototype to avoid an error.
15203 Use char because int might match the return type of a GCC
15204 builtin and then its argument prototype would still apply. */
15205#ifdef __cplusplus
15206extern "C"
15207#endif
15208char append_history ();
15209int
15210main ()
15211{
15212return append_history ();
15213 ;
15214 return 0;
15215}
15216_ACEOF
15217if ac_fn_c_try_link "$LINENO"; then :
15218 ac_cv_lib_readline_append_history=yes
15219else
15220 ac_cv_lib_readline_append_history=no
15221fi
15222rm -f core conftest.err conftest.$ac_objext \
15223 conftest$ac_exeext conftest.$ac_ext
15224LIBS=$ac_check_lib_save_LIBS
15225fi
15226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15227$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15228if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15229
15230$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15231
15232fi
15233
15234
Martin v. Löwis82bca632006-02-10 20:49:30 +000015235# End of readline checks: restore LIBS
15236LIBS=$LIBS_no_readline
15237
Matthias Kloseb9621712010-04-24 17:59:49 +000015238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15239$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015240if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015242else
Martin v. Löwis11437992002-04-12 09:54:03 +000015243
Matthias Kloseb9621712010-04-24 17:59:49 +000015244if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015245 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015246else
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015248/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015249
15250int main()
15251{
15252 int val1 = nice(1);
15253 if (val1 != -1 && val1 == nice(2))
15254 exit(0);
15255 exit(1);
15256}
15257
Martin v. Löwis11437992002-04-12 09:54:03 +000015258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015259if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015260 ac_cv_broken_nice=yes
15261else
Matthias Kloseb9621712010-04-24 17:59:49 +000015262 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15265 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015266fi
15267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268fi
15269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15271$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015272if test "$ac_cv_broken_nice" = yes
15273then
Martin v. Löwis11437992002-04-12 09:54:03 +000015274
Matthias Kloseb9621712010-04-24 17:59:49 +000015275$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015276
15277fi
15278
Matthias Kloseb9621712010-04-24 17:59:49 +000015279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15280$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015281if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015283else
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015285 ac_cv_broken_poll=no
15286else
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015288/* end confdefs.h. */
15289
15290#include <poll.h>
15291
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015292int main()
15293{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015294 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015295 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015296
15297 close (42);
15298
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015299 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015300 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015301 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015302 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015303 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015304 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015305 return 1;
15306}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015307
15308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015309if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015310 ac_cv_broken_poll=yes
15311else
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015318fi
15319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15321$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015322if test "$ac_cv_broken_poll" = yes
15323then
15324
Matthias Kloseb9621712010-04-24 17:59:49 +000015325$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015326
15327fi
15328
Brett Cannon43802422005-02-10 20:48:03 +000015329# 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 +000015330# (which is not required by ISO C or UNIX spec) and/or if we support
15331# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015332ac_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 +000015333#include <$ac_cv_struct_tm>
15334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335"
Victor Stinnere0be4232011-10-25 13:06:09 +020015336if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015337
15338cat >>confdefs.h <<_ACEOF
15339#define HAVE_STRUCT_TM_TM_ZONE 1
15340_ACEOF
15341
15342
15343fi
15344
15345if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015348
15349else
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15351"
Victor Stinnere0be4232011-10-25 13:06:09 +020015352if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354else
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356fi
15357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015359#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360_ACEOF
15361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15363$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015364if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366else
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015368/* end confdefs.h. */
15369#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370#if !HAVE_DECL_TZNAME
15371extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015372#endif
15373
15374int
15375main ()
15376{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015377return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015378 ;
15379 return 0;
15380}
15381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015382if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015383 ac_cv_var_tzname=yes
15384else
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015387rm -f core conftest.err conftest.$ac_objext \
15388 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15391$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015392 if test $ac_cv_var_tzname = yes; then
15393
Matthias Kloseb9621712010-04-24 17:59:49 +000015394$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015395
15396 fi
15397fi
15398
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015399
Martin v. Löwis1d459062005-03-14 21:23:33 +000015400# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15402$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015403if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015404 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015405else
15406
Matthias Kloseb9621712010-04-24 17:59:49 +000015407if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015408 ac_cv_working_tzset=no
15409else
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015411/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015412
15413#include <stdlib.h>
15414#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015415#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015416
15417#if HAVE_TZNAME
15418extern char *tzname[];
15419#endif
15420
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015421int main()
15422{
Brett Cannon18367812003-09-19 00:59:16 +000015423 /* Note that we need to ensure that not only does tzset(3)
15424 do 'something' with localtime, but it works as documented
15425 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015426 This includes making sure that tzname is set properly if
15427 tm->tm_zone does not exist since it is the alternative way
15428 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015429
15430 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015431 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015432 */
15433
Martin v. Löwis1d459062005-03-14 21:23:33 +000015434 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015435 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15436
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015437 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015438 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015439 if (localtime(&groundhogday)->tm_hour != 0)
15440 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015441#if HAVE_TZNAME
15442 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15443 if (strcmp(tzname[0], "UTC") ||
15444 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15445 exit(1);
15446#endif
Brett Cannon18367812003-09-19 00:59:16 +000015447
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015448 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015449 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015450 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015451 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015452#if HAVE_TZNAME
15453 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15454 exit(1);
15455#endif
Brett Cannon18367812003-09-19 00:59:16 +000015456
15457 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15458 tzset();
15459 if (localtime(&groundhogday)->tm_hour != 11)
15460 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015461#if HAVE_TZNAME
15462 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15463 exit(1);
15464#endif
15465
15466#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015467 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15468 exit(1);
15469 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15470 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015471#endif
Brett Cannon18367812003-09-19 00:59:16 +000015472
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015473 exit(0);
15474}
15475
15476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015477if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015478 ac_cv_working_tzset=yes
15479else
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15483 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015484fi
15485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486fi
15487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15489$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015490if test "$ac_cv_working_tzset" = yes
15491then
15492
Matthias Kloseb9621712010-04-24 17:59:49 +000015493$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015494
15495fi
15496
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015497# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15499$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015500if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015502else
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015504/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015505#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015506int
15507main ()
15508{
15509
15510struct stat st;
15511st.st_mtim.tv_nsec = 1;
15512
15513 ;
15514 return 0;
15515}
15516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015518 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015519else
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15523fi
15524
Matthias Kloseb9621712010-04-24 17:59:49 +000015525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15526$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015527if test "$ac_cv_stat_tv_nsec" = yes
15528then
15529
Matthias Kloseb9621712010-04-24 17:59:49 +000015530$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015531
15532fi
15533
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015534# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15536$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015537if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015539else
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015541/* end confdefs.h. */
15542#include <sys/stat.h>
15543int
15544main ()
15545{
15546
15547struct stat st;
15548st.st_mtimespec.tv_nsec = 1;
15549
15550 ;
15551 return 0;
15552}
15553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015555 ac_cv_stat_tv_nsec2=yes
15556else
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15560fi
15561
Matthias Kloseb9621712010-04-24 17:59:49 +000015562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15563$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015564if test "$ac_cv_stat_tv_nsec2" = yes
15565then
15566
Matthias Kloseb9621712010-04-24 17:59:49 +000015567$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015568
15569fi
15570
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015571# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015572ac_save_cppflags="$CPPFLAGS"
15573CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015574
15575for ac_header in curses.h ncurses.h
15576do :
15577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15578ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15579if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15580 cat >>confdefs.h <<_ACEOF
15581#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15582_ACEOF
15583
15584fi
15585
15586done
15587
15588
15589# On Solaris, term.h requires curses.h
15590for ac_header in term.h
15591do :
15592 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15593#ifdef HAVE_CURSES_H
15594#include <curses.h>
15595#endif
15596
15597"
15598if test "x$ac_cv_header_term_h" = xyes; then :
15599 cat >>confdefs.h <<_ACEOF
15600#define HAVE_TERM_H 1
15601_ACEOF
15602
15603fi
15604
15605done
15606
15607
Jack Jansen666b1e72001-10-31 12:11:48 +000015608# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15610$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015611if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015613else
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015615/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015616#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015617int
15618main ()
15619{
Jack Jansen666b1e72001-10-31 12:11:48 +000015620
15621 int rtn;
15622 rtn = mvwdelch(0,0,0);
15623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 ;
15625 return 0;
15626}
15627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015628if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015629 ac_cv_mvwdelch_is_expression=yes
15630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15634fi
15635
Matthias Kloseb9621712010-04-24 17:59:49 +000015636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15637$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015638
15639if test "$ac_cv_mvwdelch_is_expression" = yes
15640then
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015643
15644fi
15645
Matthias Kloseb9621712010-04-24 17:59:49 +000015646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15647$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015648if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015649 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015650else
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015652/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015653#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015654int
15655main ()
15656{
Jack Jansen666b1e72001-10-31 12:11:48 +000015657
15658 WINDOW *w;
15659 w->_flags = 0;
15660
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 ;
15662 return 0;
15663}
15664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015665if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015666 ac_cv_window_has_flags=yes
15667else
Matthias Kloseb9621712010-04-24 17:59:49 +000015668 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15671fi
15672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15674$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015675
Jack Jansen666b1e72001-10-31 12:11:48 +000015676
15677if test "$ac_cv_window_has_flags" = yes
15678then
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015681
15682fi
15683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15685$as_echo_n "checking for is_term_resized... " >&6; }
15686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015687/* end confdefs.h. */
15688#include <curses.h>
15689int
15690main ()
15691{
15692void *x=is_term_resized
15693 ;
15694 return 0;
15695}
15696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015700
Matthias Kloseb159a552010-04-25 21:00:44 +000015701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015702$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015703else
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15705$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015706
15707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15711$as_echo_n "checking for resize_term... " >&6; }
15712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015713/* end confdefs.h. */
15714#include <curses.h>
15715int
15716main ()
15717{
15718void *x=resize_term
15719 ;
15720 return 0;
15721}
15722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015723if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015724
Matthias Kloseb9621712010-04-24 17:59:49 +000015725$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015726
Matthias Kloseb159a552010-04-25 21:00:44 +000015727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015728$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015729else
Matthias Kloseb9621712010-04-24 17:59:49 +000015730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15731$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015732
15733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15737$as_echo_n "checking for resizeterm... " >&6; }
15738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015739/* end confdefs.h. */
15740#include <curses.h>
15741int
15742main ()
15743{
15744void *x=resizeterm
15745 ;
15746 return 0;
15747}
15748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015749if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015750
Matthias Kloseb9621712010-04-24 17:59:49 +000015751$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015752
Matthias Kloseb159a552010-04-25 21:00:44 +000015753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015754$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015755else
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15757$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015758
15759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015761# last curses configure check
15762CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15765$as_echo "$as_me: checking for device files" >&6;}
15766
15767if test "x$cross_compiling" = xyes; then
15768 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15770$as_echo_n "checking for /dev/ptmx... " >&6; }
15771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15772$as_echo "not set" >&6; }
15773 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15774 fi
15775 if test "${ac_cv_file__dev_ptc+set}" != set; then
15776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15777$as_echo_n "checking for /dev/ptc... " >&6; }
15778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15779$as_echo "not set" >&6; }
15780 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15781 fi
15782fi
15783
Matthias Kloseb9621712010-04-24 17:59:49 +000015784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15785$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015786if ${ac_cv_file__dev_ptmx+:} false; then :
15787 $as_echo_n "(cached) " >&6
15788else
15789 test "$cross_compiling" = yes &&
15790 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15791if test -r "/dev/ptmx"; then
15792 ac_cv_file__dev_ptmx=yes
15793else
15794 ac_cv_file__dev_ptmx=no
15795fi
15796fi
15797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15798$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15799if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015800
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015801fi
15802
15803if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015804
Matthias Kloseb9621712010-04-24 17:59:49 +000015805$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015806
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15809$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015810if ${ac_cv_file__dev_ptc+:} false; then :
15811 $as_echo_n "(cached) " >&6
15812else
15813 test "$cross_compiling" = yes &&
15814 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15815if test -r "/dev/ptc"; then
15816 ac_cv_file__dev_ptc=yes
15817else
15818 ac_cv_file__dev_ptc=no
15819fi
15820fi
15821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15822$as_echo "$ac_cv_file__dev_ptc" >&6; }
15823if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015824
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015825fi
15826
15827if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015830
Neal Norwitz865400f2003-03-21 01:42:58 +000015831fi
15832
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015833if test "$have_long_long" = yes
15834then
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15836$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015837 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015839else
Matthias Kloseb9621712010-04-24 17:59:49 +000015840 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015841 ac_cv_have_long_long_format="cross -- assuming no"
15842 if test x$GCC = xyes; then
15843 save_CFLAGS=$CFLAGS
15844 CFLAGS="$CFLAGS -Werror -Wformat"
15845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15846/* end confdefs.h. */
15847
15848 #include <stdio.h>
15849 #include <stddef.h>
15850
15851int
15852main ()
15853{
15854
15855 char *buffer;
15856 sprintf(buffer, "%lld", (long long)123);
15857 sprintf(buffer, "%lld", (long long)-123);
15858 sprintf(buffer, "%llu", (unsigned long long)123);
15859
15860 ;
15861 return 0;
15862}
15863_ACEOF
15864if ac_fn_c_try_compile "$LINENO"; then :
15865 ac_cv_have_long_long_format=yes
15866
15867fi
15868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15869 CFLAGS=$save_CFLAGS
15870 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015871else
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015873/* end confdefs.h. */
15874
15875 #include <stdio.h>
15876 #include <stddef.h>
15877 #include <string.h>
15878
15879 #ifdef HAVE_SYS_TYPES_H
15880 #include <sys/types.h>
15881 #endif
15882
15883 int main()
15884 {
15885 char buffer[256];
15886
15887 if (sprintf(buffer, "%lld", (long long)123) < 0)
15888 return 1;
15889 if (strcmp(buffer, "123"))
15890 return 1;
15891
15892 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15893 return 1;
15894 if (strcmp(buffer, "-123"))
15895 return 1;
15896
15897 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15898 return 1;
15899 if (strcmp(buffer, "123"))
15900 return 1;
15901
15902 return 0;
15903 }
15904
15905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015906if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015907 ac_cv_have_long_long_format=yes
15908else
Matthias Kloseb9621712010-04-24 17:59:49 +000015909 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015913fi
15914
15915
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015916fi
15917
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15919$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015920fi
15921
Mark Dickinson89d7d412009-12-31 20:50:59 +000015922if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015923then
15924
Matthias Kloseb9621712010-04-24 17:59:49 +000015925$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015926
15927fi
15928
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015929if test $ac_sys_system = Darwin
15930then
15931 LIBS="$LIBS -framework CoreFoundation"
15932fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015933
Matthias Kloseb9621712010-04-24 17:59:49 +000015934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15935$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015936if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015937 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015938else
Matthias Kloseb9621712010-04-24 17:59:49 +000015939 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015940 ac_cv_have_size_t_format="cross -- assuming yes"
15941
Thomas Wouters477c8d52006-05-27 19:21:47 +000015942else
Matthias Kloseb9621712010-04-24 17:59:49 +000015943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015944/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015945
Thomas Wouters477c8d52006-05-27 19:21:47 +000015946#include <stdio.h>
15947#include <stddef.h>
15948#include <string.h>
15949
Christian Heimes2c181612007-12-17 20:04:13 +000015950#ifdef HAVE_SYS_TYPES_H
15951#include <sys/types.h>
15952#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015953
15954#ifdef HAVE_SSIZE_T
15955typedef ssize_t Py_ssize_t;
15956#elif SIZEOF_VOID_P == SIZEOF_LONG
15957typedef long Py_ssize_t;
15958#else
15959typedef int Py_ssize_t;
15960#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015961
Christian Heimes2c181612007-12-17 20:04:13 +000015962int main()
15963{
15964 char buffer[256];
15965
Thomas Wouters477c8d52006-05-27 19:21:47 +000015966 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15967 return 1;
15968
Thomas Wouters89f507f2006-12-13 04:49:30 +000015969 if (strcmp(buffer, "123"))
15970 return 1;
15971
15972 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15973 return 1;
15974
15975 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015976 return 1;
15977
15978 return 0;
15979}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015980
Thomas Wouters477c8d52006-05-27 19:21:47 +000015981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015982if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015983 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015984else
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015989fi
15990
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15993$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015994if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015995
Matthias Kloseb9621712010-04-24 17:59:49 +000015996$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015997
15998fi
15999
Matthias Kloseb9621712010-04-24 17:59:49 +000016000ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016001#ifdef HAVE_SYS_TYPES_H
16002#include <sys/types.h>
16003#endif
16004#ifdef HAVE_SYS_SOCKET_H
16005#include <sys/socket.h>
16006#endif
16007
Matthias Kloseb9621712010-04-24 17:59:49 +000016008"
Victor Stinnere0be4232011-10-25 13:06:09 +020016009if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016010
Martin v. Löwis11437992002-04-12 09:54:03 +000016011else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016012
Matthias Kloseb9621712010-04-24 17:59:49 +000016013$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016014
16015fi
16016
Michael W. Hudson54241132001-12-07 15:38:26 +000016017
Matthias Kloseb9621712010-04-24 17:59:49 +000016018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16019$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016020if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016022else
Matthias Kloseb9621712010-04-24 17:59:49 +000016023 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016024 ac_cv_broken_mbstowcs=no
16025else
Matthias Kloseb9621712010-04-24 17:59:49 +000016026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016027/* end confdefs.h. */
16028
Stefan Krah19c21392012-11-22 23:47:32 +010016029#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016030#include<stdlib.h>
16031int main() {
16032 size_t len = -1;
16033 const char *str = "text";
16034 len = mbstowcs(NULL, str, 0);
16035 return (len != 4);
16036}
16037
16038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016039if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016040 ac_cv_broken_mbstowcs=no
16041else
Matthias Kloseb9621712010-04-24 17:59:49 +000016042 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016046fi
16047
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016048fi
16049
Matthias Kloseb9621712010-04-24 17:59:49 +000016050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16051$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016052if test "$ac_cv_broken_mbstowcs" = yes
16053then
16054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016056
16057fi
16058
Antoine Pitroub52ec782009-01-25 16:34:23 +000016059# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16061$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016062
16063# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016064if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016065 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016066if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016067then
16068
Matthias Kloseb9621712010-04-24 17:59:49 +000016069$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016070
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16072$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016073fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016074if test "$withval" = no
16075then
16076
16077$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16078
Matthias Kloseb9621712010-04-24 17:59:49 +000016079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16080$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016081fi
16082
Antoine Pitrou042b1282010-08-13 21:15:58 +000016083else
16084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16085$as_echo "no value specified" >&6; }
16086fi
16087
Antoine Pitroub52ec782009-01-25 16:34:23 +000016088
Matthias Kloseb17289e2012-03-15 19:51:34 +010016089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16090$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16091if ${ac_cv_computed_gotos+:} false; then :
16092 $as_echo_n "(cached) " >&6
16093else
16094 if test "$cross_compiling" = yes; then :
16095 if test "${with_computed_gotos+set}" = set; then
16096 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16097 else
16098 ac_cv_computed_gotos=no
16099 fi
16100else
16101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102/* end confdefs.h. */
16103
16104int main(int argc, char **argv)
16105{
16106 static void *targets[1] = { &&LABEL1 };
16107 goto LABEL2;
16108LABEL1:
16109 return 0;
16110LABEL2:
16111 goto *targets[0];
16112 return 1;
16113}
16114
16115_ACEOF
16116if ac_fn_c_try_run "$LINENO"; then :
16117 ac_cv_computed_gotos=yes
16118else
16119 ac_cv_computed_gotos=no
16120fi
16121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16122 conftest.$ac_objext conftest.beam conftest.$ac_ext
16123fi
16124
16125fi
16126
16127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16128$as_echo "$ac_cv_computed_gotos" >&6; }
16129case "$ac_cv_computed_gotos" in yes*)
16130
16131$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16132
16133esac
16134
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016135case $ac_sys_system in
16136AIX*)
16137
16138$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16139 ;;
16140esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016141
Michael W. Hudson54241132001-12-07 15:38:26 +000016142
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016143
16144
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016145for h in `(cd $srcdir;echo Python/thread_*.h)`
16146do
16147 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16148done
16149
Michael W. Hudson54241132001-12-07 15:38:26 +000016150
Ned Deily0db50cf2014-07-25 12:41:31 -070016151SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16153$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016154for dir in $SRCDIRS; do
16155 if test ! -d $dir; then
16156 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016157 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016158done
Matthias Kloseb9621712010-04-24 17:59:49 +000016159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16160$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016161
Stefan Krah1919b7e2012-03-21 18:25:23 +010016162# Availability of -O2:
16163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16164$as_echo_n "checking for -O2... " >&6; }
16165saved_cflags="$CFLAGS"
16166CFLAGS="-O2"
16167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16168/* end confdefs.h. */
16169
16170int
16171main ()
16172{
16173
16174
16175 ;
16176 return 0;
16177}
16178_ACEOF
16179if ac_fn_c_try_compile "$LINENO"; then :
16180 have_O2=yes
16181else
16182 have_O2=no
16183fi
16184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16186$as_echo "$have_O2" >&6; }
16187CFLAGS="$saved_cflags"
16188
16189# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16190# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16192$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16193saved_cflags="$CFLAGS"
16194CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16195if test "$have_O2" = no; then
16196 CFLAGS=""
16197fi
16198if test "$cross_compiling" = yes; then :
16199 have_glibc_memmove_bug=undefined
16200else
16201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16202/* end confdefs.h. */
16203
16204#include <stdio.h>
16205#include <stdlib.h>
16206#include <string.h>
16207void foo(void *p, void *q) { memmove(p, q, 19); }
16208int main() {
16209 char a[32] = "123456789000000000";
16210 foo(&a[9], a);
16211 if (strcmp(a, "123456789123456789000000000") != 0)
16212 return 1;
16213 foo(a, &a[9]);
16214 if (strcmp(a, "123456789000000000") != 0)
16215 return 1;
16216 return 0;
16217}
16218
16219_ACEOF
16220if ac_fn_c_try_run "$LINENO"; then :
16221 have_glibc_memmove_bug=no
16222else
16223 have_glibc_memmove_bug=yes
16224fi
16225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16226 conftest.$ac_objext conftest.beam conftest.$ac_ext
16227fi
16228
16229CFLAGS="$saved_cflags"
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16231$as_echo "$have_glibc_memmove_bug" >&6; }
16232if test "$have_glibc_memmove_bug" = yes; then
16233
16234$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16235
16236fi
16237
16238if test "$have_gcc_asm_for_x87" = yes; then
16239 # Some versions of gcc miscompile inline asm:
16240 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16241 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16242 case $CC in
16243 *gcc*)
16244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16245$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16246 saved_cflags="$CFLAGS"
16247 CFLAGS="-O2"
16248 if test "$cross_compiling" = yes; then :
16249 have_ipa_pure_const_bug=undefined
16250else
16251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16252/* end confdefs.h. */
16253
16254 __attribute__((noinline)) int
16255 foo(int *p) {
16256 int r;
16257 asm ( "movl \$6, (%1)\n\t"
16258 "xorl %0, %0\n\t"
16259 : "=r" (r) : "r" (p) : "memory"
16260 );
16261 return r;
16262 }
16263 int main() {
16264 int p = 8;
16265 if ((foo(&p) ? : p) != 6)
16266 return 1;
16267 return 0;
16268 }
16269
16270_ACEOF
16271if ac_fn_c_try_run "$LINENO"; then :
16272 have_ipa_pure_const_bug=no
16273else
16274 have_ipa_pure_const_bug=yes
16275fi
16276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16277 conftest.$ac_objext conftest.beam conftest.$ac_ext
16278fi
16279
16280 CFLAGS="$saved_cflags"
16281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16282$as_echo "$have_ipa_pure_const_bug" >&6; }
16283 if test "$have_ipa_pure_const_bug" = yes; then
16284
16285$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16286
16287 fi
16288 ;;
16289 esac
16290fi
16291
Victor Stinner4f5366e2015-01-09 02:13:19 +010016292# Check for stdatomic.h
16293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16294$as_echo_n "checking for stdatomic.h... " >&6; }
16295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16296/* end confdefs.h. */
16297
16298
16299 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016300 atomic_int value = ATOMIC_VAR_INIT(1);
16301 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016302 int main() {
16303 int loaded_value = atomic_load(&value);
16304 return 0;
16305 }
16306
16307
16308_ACEOF
16309if ac_fn_c_try_link "$LINENO"; then :
16310 have_stdatomic_h=yes
16311else
16312 have_stdatomic_h=no
16313fi
16314rm -f core conftest.err conftest.$ac_objext \
16315 conftest$ac_exeext conftest.$ac_ext
16316
16317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16318$as_echo "$have_stdatomic_h" >&6; }
16319
16320if test "$have_stdatomic_h" = yes; then
16321
16322$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16323
16324fi
16325
16326# Check for GCC >= 4.7 __atomic builtins
16327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16328$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16330/* end confdefs.h. */
16331
16332
16333 volatile int val = 1;
16334 int main() {
16335 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16336 return 0;
16337 }
16338
16339
16340_ACEOF
16341if ac_fn_c_try_link "$LINENO"; then :
16342 have_builtin_atomic=yes
16343else
16344 have_builtin_atomic=no
16345fi
16346rm -f core conftest.err conftest.$ac_objext \
16347 conftest$ac_exeext conftest.$ac_ext
16348
16349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16350$as_echo "$have_builtin_atomic" >&6; }
16351
16352if test "$have_builtin_atomic" = yes; then
16353
16354$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16355
16356fi
16357
Ned Deily322f5ba2013-11-21 23:01:59 -080016358# ensurepip option
16359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16360$as_echo_n "checking for ensurepip... " >&6; }
16361
16362# Check whether --with-ensurepip was given.
16363if test "${with_ensurepip+set}" = set; then :
16364 withval=$with_ensurepip;
16365else
16366 with_ensurepip=upgrade
16367fi
16368
16369case $with_ensurepip in #(
16370 yes|upgrade) :
16371 ENSUREPIP=upgrade ;; #(
16372 install) :
16373 ENSUREPIP=install ;; #(
16374 no) :
16375 ENSUREPIP=no ;; #(
16376 *) :
16377 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16378esac
16379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16380$as_echo "$ENSUREPIP" >&6; }
16381
16382
Victor Stinner35a97c02015-03-08 02:59:09 +010016383# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16385$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16387/* end confdefs.h. */
16388
16389
16390 #include <dirent.h>
16391
16392 int main() {
16393 struct dirent entry;
16394 return entry.d_type == DT_UNKNOWN;
16395 }
16396
16397
16398_ACEOF
16399if ac_fn_c_try_link "$LINENO"; then :
16400 have_dirent_d_type=yes
16401else
16402 have_dirent_d_type=no
16403fi
16404rm -f core conftest.err conftest.$ac_objext \
16405 conftest$ac_exeext conftest.$ac_ext
16406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16407$as_echo "$have_dirent_d_type" >&6; }
16408
16409if test "$have_dirent_d_type" = yes; then
16410
16411$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16412
16413fi
16414
Victor Stinner9eb57c52015-03-19 22:21:49 +010016415# check if the Linux getrandom() syscall is available
16416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16417$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16419/* end confdefs.h. */
16420
16421
Victor Stinner1b80b242016-04-12 22:34:58 +020016422 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016423 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016424 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016425
16426 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016427 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016428 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016429 const int flags = GRND_NONBLOCK;
16430 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016431 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016432 return 0;
16433 }
16434
16435
16436_ACEOF
16437if ac_fn_c_try_link "$LINENO"; then :
16438 have_getrandom_syscall=yes
16439else
16440 have_getrandom_syscall=no
16441fi
16442rm -f core conftest.err conftest.$ac_objext \
16443 conftest$ac_exeext conftest.$ac_ext
16444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16445$as_echo "$have_getrandom_syscall" >&6; }
16446
16447if test "$have_getrandom_syscall" = yes; then
16448
16449$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16450
16451fi
16452
Victor Stinner3abf44e2015-09-18 15:38:37 +020016453# check if the getrandom() function is available
16454# the test was written for the Solaris function of <sys/random.h>
16455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16456$as_echo_n "checking for the getrandom() function... " >&6; }
16457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16458/* end confdefs.h. */
16459
16460
16461 #include <sys/random.h>
16462
16463 int main() {
16464 char buffer[1];
16465 const size_t buflen = sizeof(buffer);
16466 const int flags = 0;
16467 /* ignore the result, Python checks for ENOSYS at runtime */
16468 (void)getrandom(buffer, buflen, flags);
16469 return 0;
16470 }
16471
16472
16473_ACEOF
16474if ac_fn_c_try_link "$LINENO"; then :
16475 have_getrandom=yes
16476else
16477 have_getrandom=no
16478fi
16479rm -f core conftest.err conftest.$ac_objext \
16480 conftest$ac_exeext conftest.$ac_ext
16481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16482$as_echo "$have_getrandom" >&6; }
16483
16484if test "$have_getrandom" = yes; then
16485
16486$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16487
16488fi
16489
Guido van Rossum627b2d71993-12-24 10:39:16 +000016490# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016491ac_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 +000016492
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016493ac_config_files="$ac_config_files Modules/ld_so_aix"
16494
Martin v. Löwis11437992002-04-12 09:54:03 +000016495cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016496# This file is a shell script that caches the results of configure
16497# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016498# scripts and configure runs, see configure's option --config-cache.
16499# It is not useful on other systems. If it contains results you don't
16500# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016501#
Martin v. Löwis11437992002-04-12 09:54:03 +000016502# config.status only pays attention to the cache file if you give it
16503# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016504#
Skip Montanaro6dead952003-09-25 14:50:04 +000016505# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016506# loading this file, other *unset* `ac_cv_foo' will be assigned the
16507# following values.
16508
16509_ACEOF
16510
Guido van Rossumf78abae1997-01-21 22:02:36 +000016511# The following way of writing the cache mishandles newlines in values,
16512# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016514# Ultrix sh set writes to stderr and can't be redirected directly,
16515# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516(
16517 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16518 eval ac_val=\$$ac_var
16519 case $ac_val in #(
16520 *${as_nl}*)
16521 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016522 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16523$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524 esac
16525 case $ac_var in #(
16526 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016527 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16528 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529 esac ;;
16530 esac
16531 done
16532
Martin v. Löwis11437992002-04-12 09:54:03 +000016533 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16535 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016536 # `set' does not quote correctly, so add quotes: double-quote
16537 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016539 "s/'/'\\\\''/g;
16540 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016541 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 *)
16543 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546 esac |
16547 sort
16548) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16554 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16556 :end' >>confcache
16557if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16558 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016559 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016560 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16561$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016562 if test ! -f "$cache_file" || test -h "$cache_file"; then
16563 cat confcache >"$cache_file"
16564 else
16565 case $cache_file in #(
16566 */* | ?:*)
16567 mv -f confcache "$cache_file"$$ &&
16568 mv -f "$cache_file"$$ "$cache_file" ;; #(
16569 *)
16570 mv -f confcache "$cache_file" ;;
16571 esac
16572 fi
16573 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016574 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016575 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16576$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016577 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016578fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016579rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016580
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016581test "x$prefix" = xNONE && prefix=$ac_default_prefix
16582# Let make expand exec_prefix.
16583test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016584
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016585DEFS=-DHAVE_CONFIG_H
16586
Skip Montanaro6dead952003-09-25 14:50:04 +000016587ac_libobjs=
16588ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016589U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016590for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16591 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016593 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16595 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016596 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16597 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016598done
16599LIBOBJS=$ac_libobjs
16600
16601LTLIBOBJS=$ac_ltlibobjs
16602
16603
Martin v. Löwis11437992002-04-12 09:54:03 +000016604
Matthias Kloseb9621712010-04-24 17:59:49 +000016605
Victor Stinnere0be4232011-10-25 13:06:09 +020016606: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016607ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016608ac_clean_files_save=$ac_clean_files
16609ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016610{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16611$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16612as_write_fail=0
16613cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016614#! $SHELL
16615# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016616# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016617# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016618# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016619
Martin v. Löwis11437992002-04-12 09:54:03 +000016620debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016621ac_cs_recheck=false
16622ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016623
Matthias Kloseb9621712010-04-24 17:59:49 +000016624SHELL=\${CONFIG_SHELL-$SHELL}
16625export SHELL
16626_ASEOF
16627cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16628## -------------------- ##
16629## M4sh Initialization. ##
16630## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016632# Be more Bourne compatible
16633DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016634if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 emulate sh
16636 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016637 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016638 # is contrary to our usage. Disable this feature.
16639 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016641else
Matthias Kloseb9621712010-04-24 17:59:49 +000016642 case `(set -o) 2>/dev/null` in #(
16643 *posix*) :
16644 set -o posix ;; #(
16645 *) :
16646 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016648fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016649
16650
Matthias Kloseb9621712010-04-24 17:59:49 +000016651as_nl='
16652'
16653export as_nl
16654# Printing a long string crashes Solaris 7 /usr/bin/printf.
16655as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16656as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16657as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16658# Prefer a ksh shell builtin over an external printf program on Solaris,
16659# but without wasting forks for bash or zsh.
16660if test -z "$BASH_VERSION$ZSH_VERSION" \
16661 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16662 as_echo='print -r --'
16663 as_echo_n='print -rn --'
16664elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16665 as_echo='printf %s\n'
16666 as_echo_n='printf %s'
16667else
16668 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16669 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16670 as_echo_n='/usr/ucb/echo -n'
16671 else
16672 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16673 as_echo_n_body='eval
16674 arg=$1;
16675 case $arg in #(
16676 *"$as_nl"*)
16677 expr "X$arg" : "X\\(.*\\)$as_nl";
16678 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16679 esac;
16680 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16681 '
16682 export as_echo_n_body
16683 as_echo_n='sh -c $as_echo_n_body as_echo'
16684 fi
16685 export as_echo_body
16686 as_echo='sh -c $as_echo_body as_echo'
16687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016688
16689# The user is always right.
16690if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016691 PATH_SEPARATOR=:
16692 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16693 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16694 PATH_SEPARATOR=';'
16695 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698
16699# IFS
16700# We need space, tab and new line, in precisely that order. Quoting is
16701# there to prevent editors from complaining about space-tab.
16702# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16703# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704IFS=" "" $as_nl"
16705
16706# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016707as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016708case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709 *[\\/]* ) as_myself=$0 ;;
16710 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016711for as_dir in $PATH
16712do
16713 IFS=$as_save_IFS
16714 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016715 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16716 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719 ;;
16720esac
16721# We did not find ourselves, most probably we were run as `sh COMMAND'
16722# in which case we are not to be found in the path.
16723if test "x$as_myself" = x; then
16724 as_myself=$0
16725fi
16726if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16728 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016729fi
16730
Matthias Kloseb9621712010-04-24 17:59:49 +000016731# Unset variables that we do not need and which cause bugs (e.g. in
16732# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16733# suppresses any "Segmentation fault" message there. '((' could
16734# trigger a bug in pdksh 5.2.14.
16735for as_var in BASH_ENV ENV MAIL MAILPATH
16736do eval test x\${$as_var+set} = xset \
16737 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738done
16739PS1='$ '
16740PS2='> '
16741PS4='+ '
16742
16743# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016744LC_ALL=C
16745export LC_ALL
16746LANGUAGE=C
16747export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748
Matthias Kloseb9621712010-04-24 17:59:49 +000016749# CDPATH.
16750(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16751
16752
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016753# as_fn_error STATUS ERROR [LINENO LOG_FD]
16754# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016755# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16756# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016757# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016758as_fn_error ()
16759{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016760 as_status=$1; test $as_status -eq 0 && as_status=1
16761 if test "$4"; then
16762 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16763 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016764 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016765 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016766 as_fn_exit $as_status
16767} # as_fn_error
16768
16769
16770# as_fn_set_status STATUS
16771# -----------------------
16772# Set $? to STATUS, without forking.
16773as_fn_set_status ()
16774{
16775 return $1
16776} # as_fn_set_status
16777
16778# as_fn_exit STATUS
16779# -----------------
16780# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16781as_fn_exit ()
16782{
16783 set +e
16784 as_fn_set_status $1
16785 exit $1
16786} # as_fn_exit
16787
16788# as_fn_unset VAR
16789# ---------------
16790# Portably unset VAR.
16791as_fn_unset ()
16792{
16793 { eval $1=; unset $1;}
16794}
16795as_unset=as_fn_unset
16796# as_fn_append VAR VALUE
16797# ----------------------
16798# Append the text in VALUE to the end of the definition contained in VAR. Take
16799# advantage of any shell optimizations that allow amortized linear growth over
16800# repeated appends, instead of the typical quadratic growth present in naive
16801# implementations.
16802if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16803 eval 'as_fn_append ()
16804 {
16805 eval $1+=\$2
16806 }'
16807else
16808 as_fn_append ()
16809 {
16810 eval $1=\$$1\$2
16811 }
16812fi # as_fn_append
16813
16814# as_fn_arith ARG...
16815# ------------------
16816# Perform arithmetic evaluation on the ARGs, and store the result in the
16817# global $as_val. Take advantage of shells that can avoid forks. The arguments
16818# must be portable across $(()) and expr.
16819if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16820 eval 'as_fn_arith ()
16821 {
16822 as_val=$(( $* ))
16823 }'
16824else
16825 as_fn_arith ()
16826 {
16827 as_val=`expr "$@" || test $? -eq 1`
16828 }
16829fi # as_fn_arith
16830
16831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832if expr a : '\(a\)' >/dev/null 2>&1 &&
16833 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16834 as_expr=expr
16835else
16836 as_expr=false
16837fi
16838
16839if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16840 as_basename=basename
16841else
16842 as_basename=false
16843fi
16844
Matthias Kloseb9621712010-04-24 17:59:49 +000016845if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16846 as_dirname=dirname
16847else
16848 as_dirname=false
16849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851as_me=`$as_basename -- "$0" ||
16852$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16853 X"$0" : 'X\(//\)$' \| \
16854 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016855$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016856 sed '/^.*\/\([^/][^/]*\)\/*$/{
16857 s//\1/
16858 q
16859 }
16860 /^X\/\(\/\/\)$/{
16861 s//\1/
16862 q
16863 }
16864 /^X\/\(\/\).*/{
16865 s//\1/
16866 q
16867 }
16868 s/.*/./; q'`
16869
Matthias Kloseb9621712010-04-24 17:59:49 +000016870# Avoid depending upon Character Ranges.
16871as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16872as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16873as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16874as_cr_digits='0123456789'
16875as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876
16877ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016878case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016882 xy) ECHO_C='\c';;
16883 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16884 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885 esac;;
16886*)
16887 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016889
Martin v. Löwis11437992002-04-12 09:54:03 +000016890rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891if test -d conf$$.dir; then
16892 rm -f conf$$.dir/conf$$.file
16893else
16894 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016895 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016897if (echo >conf$$.file) 2>/dev/null; then
16898 if ln -s conf$$.file conf$$ 2>/dev/null; then
16899 as_ln_s='ln -s'
16900 # ... but there are two gotchas:
16901 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16902 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016903 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016905 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016906 elif ln conf$$.file conf$$ 2>/dev/null; then
16907 as_ln_s=ln
16908 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016909 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016910 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016911else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016912 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16915rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016916
Matthias Kloseb9621712010-04-24 17:59:49 +000016917
16918# as_fn_mkdir_p
16919# -------------
16920# Create "$as_dir" as a directory, including parents if necessary.
16921as_fn_mkdir_p ()
16922{
16923
16924 case $as_dir in #(
16925 -*) as_dir=./$as_dir;;
16926 esac
16927 test -d "$as_dir" || eval $as_mkdir_p || {
16928 as_dirs=
16929 while :; do
16930 case $as_dir in #(
16931 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16932 *) as_qdir=$as_dir;;
16933 esac
16934 as_dirs="'$as_qdir' $as_dirs"
16935 as_dir=`$as_dirname -- "$as_dir" ||
16936$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16937 X"$as_dir" : 'X\(//\)[^/]' \| \
16938 X"$as_dir" : 'X\(//\)$' \| \
16939 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16940$as_echo X"$as_dir" |
16941 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16942 s//\1/
16943 q
16944 }
16945 /^X\(\/\/\)[^/].*/{
16946 s//\1/
16947 q
16948 }
16949 /^X\(\/\/\)$/{
16950 s//\1/
16951 q
16952 }
16953 /^X\(\/\).*/{
16954 s//\1/
16955 q
16956 }
16957 s/.*/./; q'`
16958 test -d "$as_dir" && break
16959 done
16960 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016961 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016962
16963
16964} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016965if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016966 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016967else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016969 as_mkdir_p=false
16970fi
16971
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016972
16973# as_fn_executable_p FILE
16974# -----------------------
16975# Test if FILE is an executable regular file.
16976as_fn_executable_p ()
16977{
16978 test -f "$1" && test -x "$1"
16979} # as_fn_executable_p
16980as_test_x='test -x'
16981as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016982
16983# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016984as_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 +000016985
16986# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016987as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016988
16989
Martin v. Löwis11437992002-04-12 09:54:03 +000016990exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016991## ----------------------------------- ##
16992## Main body of $CONFIG_STATUS script. ##
16993## ----------------------------------- ##
16994_ASEOF
16995test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016996
Matthias Kloseb9621712010-04-24 17:59:49 +000016997cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16998# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016999# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000# values after options handling.
17001ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017002This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017003generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017004
17005 CONFIG_FILES = $CONFIG_FILES
17006 CONFIG_HEADERS = $CONFIG_HEADERS
17007 CONFIG_LINKS = $CONFIG_LINKS
17008 CONFIG_COMMANDS = $CONFIG_COMMANDS
17009 $ $0 $@
17010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011on `(hostname || uname -n) 2>/dev/null | sed 1q`
17012"
17013
Martin v. Löwis11437992002-04-12 09:54:03 +000017014_ACEOF
17015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016case $ac_config_files in *"
17017"*) set x $ac_config_files; shift; ac_config_files=$*;;
17018esac
17019
17020case $ac_config_headers in *"
17021"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17022esac
17023
17024
17025cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017026# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017027config_files="$ac_config_files"
17028config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017030_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017031
Matthias Kloseb9621712010-04-24 17:59:49 +000017032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017033ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017034\`$as_me' instantiates files and other configuration actions
17035from templates according to the current configuration. Unless the files
17036and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017037
Matthias Kloseb9621712010-04-24 17:59:49 +000017038Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017039
17040 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017041 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017042 --config print configuration, then exit
17043 -q, --quiet, --silent
17044 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 -d, --debug don't remove temporary files
17046 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017047 --file=FILE[:TEMPLATE]
17048 instantiate the configuration file FILE
17049 --header=FILE[:TEMPLATE]
17050 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017051
17052Configuration files:
17053$config_files
17054
17055Configuration headers:
17056$config_headers
17057
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017058Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17062ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017063ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017064python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017065configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017066 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017067
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017068Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017069This config.status script is free software; the Free Software Foundation
17070gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017071
17072ac_pwd='$ac_pwd'
17073srcdir='$srcdir'
17074INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017075MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017076test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017077_ACEOF
17078
Matthias Kloseb9621712010-04-24 17:59:49 +000017079cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17080# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017081ac_need_defaults=:
17082while test $# != 0
17083do
17084 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017085 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17087 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017088 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017090 --*=)
17091 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17092 ac_optarg=
17093 ac_shift=:
17094 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017096 ac_option=$1
17097 ac_optarg=$2
17098 ac_shift=shift
17099 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 esac
17101
Skip Montanaro6dead952003-09-25 14:50:04 +000017102 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017104 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17105 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017106 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017107 $as_echo "$ac_cs_version"; exit ;;
17108 --config | --confi | --conf | --con | --co | --c )
17109 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017111 debug=: ;;
17112 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017113 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017114 case $ac_optarg in
17115 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017116 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017117 esac
17118 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017119 ac_need_defaults=false;;
17120 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017121 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017122 case $ac_optarg in
17123 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17124 esac
17125 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017126 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017127 --he | --h)
17128 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017129 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017130Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017131 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017132 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17134 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17135 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
17137 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017138 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017139Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017140
Matthias Kloseb9621712010-04-24 17:59:49 +000017141 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017143
17144 esac
17145 shift
17146done
17147
Skip Montanaro6dead952003-09-25 14:50:04 +000017148ac_configure_extra_args=
17149
17150if $ac_cs_silent; then
17151 exec 6>/dev/null
17152 ac_configure_extra_args="$ac_configure_extra_args --silent"
17153fi
17154
17155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017156cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017157if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017158 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017159 shift
17160 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17161 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017163 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017164fi
17165
Martin v. Löwis11437992002-04-12 09:54:03 +000017166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168exec 5>>config.log
17169{
17170 echo
17171 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17172## Running $as_me. ##
17173_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017174 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017179_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017180
Matthias Kloseb9621712010-04-24 17:59:49 +000017181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182
17183# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017184for ac_config_target in $ac_config_targets
17185do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186 case $ac_config_target in
17187 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17188 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17189 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017190 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17191 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17193 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017194 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017195 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017196 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197
Victor Stinnere0be4232011-10-25 13:06:09 +020017198 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 esac
17200done
17201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202
Martin v. Löwis11437992002-04-12 09:54:03 +000017203# If the user did not use the arguments to specify the items to instantiate,
17204# then the envvar interface is used. Set only those that are not.
17205# We use the long form for the default assignment because of an extremely
17206# bizarre bug on SunOS 4.1.3.
17207if $ac_need_defaults; then
17208 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17209 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17210fi
17211
Skip Montanaro6dead952003-09-25 14:50:04 +000017212# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017214# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215# Hook for its removal unless debugging.
17216# Note that there is a small window in which the directory will not be cleaned:
17217# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017218$debug ||
17219{
Victor Stinnere0be4232011-10-25 13:06:09 +020017220 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017222 : "${ac_tmp:=$tmp}"
17223 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017225 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017226}
Martin v. Löwis11437992002-04-12 09:54:03 +000017227# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017228
Martin v. Löwis11437992002-04-12 09:54:03 +000017229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017231 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017232} ||
17233{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234 tmp=./conf$$-$RANDOM
17235 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017236} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017237ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017238
Matthias Kloseb9621712010-04-24 17:59:49 +000017239# Set up the scripts for CONFIG_FILES section.
17240# No need to generate them if there are no CONFIG_FILES.
17241# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017243
Matthias Kloseb9621712010-04-24 17:59:49 +000017244
17245ac_cr=`echo X | tr X '\015'`
17246# On cygwin, bash can eat \r inside `` if the user requested igncr.
17247# But we know of no other shell where ac_cr would be empty at this
17248# point, so we can use a bashism as a fallback.
17249if test "x$ac_cr" = x; then
17250 eval ac_cr=\$\'\\r\'
17251fi
17252ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17253if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017254 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017255else
17256 ac_cs_awk_cr=$ac_cr
17257fi
17258
Victor Stinnere0be4232011-10-25 13:06:09 +020017259echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017260_ACEOF
17261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262
Matthias Kloseb9621712010-04-24 17:59:49 +000017263{
17264 echo "cat >conf$$subs.awk <<_ACEOF" &&
17265 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17266 echo "_ACEOF"
17267} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017268 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17269ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270ac_delim='%!_!# '
17271for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017272 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017273 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274
Matthias Kloseb9621712010-04-24 17:59:49 +000017275 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17276 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 break
17278 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017279 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280 else
17281 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283done
Matthias Kloseb9621712010-04-24 17:59:49 +000017284rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285
Matthias Kloseb9621712010-04-24 17:59:49 +000017286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017287cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017289sed -n '
17290h
17291s/^/S["/; s/!.*/"]=/
17292p
17293g
17294s/^[^!]*!//
17295:repl
17296t repl
17297s/'"$ac_delim"'$//
17298t delim
17299:nl
17300h
17301s/\(.\{148\}\)..*/\1/
17302t more1
17303s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17304p
17305n
17306b repl
17307:more1
17308s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17309p
17310g
17311s/.\{148\}//
17312t nl
17313:delim
17314h
17315s/\(.\{148\}\)..*/\1/
17316t more2
17317s/["\\]/\\&/g; s/^/"/; s/$/"/
17318p
17319b
17320:more2
17321s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17322p
17323g
17324s/.\{148\}//
17325t delim
17326' <conf$$subs.awk | sed '
17327/^[^""]/{
17328 N
17329 s/\n//
17330}
17331' >>$CONFIG_STATUS || ac_write_fail=1
17332rm -f conf$$subs.awk
17333cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17334_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017335cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017336 for (key in S) S_is_set[key] = 1
17337 FS = ""
17338
17339}
17340{
17341 line = $ 0
17342 nfields = split(line, field, "@")
17343 substed = 0
17344 len = length(field[1])
17345 for (i = 2; i < nfields; i++) {
17346 key = field[i]
17347 keylen = length(key)
17348 if (S_is_set[key]) {
17349 value = S[key]
17350 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17351 len += length(value) + length(field[++i])
17352 substed = 1
17353 } else
17354 len += 1 + keylen
17355 }
17356
17357 print line
17358}
17359
17360_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017362cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17363if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17364 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17365else
17366 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017367fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017368 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017369_ACEOF
17370
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017371# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17372# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373# trailing colons and then remove the whole line if VPATH becomes empty
17374# (actually we leave an empty line to preserve line numbers).
17375if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017376 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17377h
17378s///
17379s/^/:/
17380s/[ ]*$/:/
17381s/:\$(srcdir):/:/g
17382s/:\${srcdir}:/:/g
17383s/:@srcdir@:/:/g
17384s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017386x
17387s/\(=[ ]*\).*/\1/
17388G
17389s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390s/^[^=]*=[ ]*$//
17391}'
17392fi
17393
Matthias Kloseb9621712010-04-24 17:59:49 +000017394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017395fi # test -n "$CONFIG_FILES"
17396
Matthias Kloseb9621712010-04-24 17:59:49 +000017397# Set up the scripts for CONFIG_HEADERS section.
17398# No need to generate them if there are no CONFIG_HEADERS.
17399# This happens for instance with `./config.status Makefile'.
17400if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017401cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017402BEGIN {
17403_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404
Matthias Kloseb9621712010-04-24 17:59:49 +000017405# Transform confdefs.h into an awk script `defines.awk', embedded as
17406# here-document in config.status, that substitutes the proper values into
17407# config.h.in to produce config.h.
17408
17409# Create a delimiter string that does not exist in confdefs.h, to ease
17410# handling of long lines.
17411ac_delim='%!_!# '
17412for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017413 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17414 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017415 break
17416 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017417 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 else
17419 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17420 fi
17421done
17422
17423# For the awk script, D is an array of macro values keyed by name,
17424# likewise P contains macro parameters if any. Preserve backslash
17425# newline sequences.
17426
17427ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17428sed -n '
17429s/.\{148\}/&'"$ac_delim"'/g
17430t rset
17431:rset
17432s/^[ ]*#[ ]*define[ ][ ]*/ /
17433t def
17434d
17435:def
17436s/\\$//
17437t bsnl
17438s/["\\]/\\&/g
17439s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17440D["\1"]=" \3"/p
17441s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17442d
17443:bsnl
17444s/["\\]/\\&/g
17445s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17446D["\1"]=" \3\\\\\\n"\\/p
17447t cont
17448s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17449t cont
17450d
17451:cont
17452n
17453s/.\{148\}/&'"$ac_delim"'/g
17454t clear
17455:clear
17456s/\\$//
17457t bsnlc
17458s/["\\]/\\&/g; s/^/"/; s/$/"/p
17459d
17460:bsnlc
17461s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17462b cont
17463' <confdefs.h | sed '
17464s/'"$ac_delim"'/"\\\
17465"/g' >>$CONFIG_STATUS || ac_write_fail=1
17466
17467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17468 for (key in D) D_is_set[key] = 1
17469 FS = ""
17470}
17471/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17472 line = \$ 0
17473 split(line, arg, " ")
17474 if (arg[1] == "#") {
17475 defundef = arg[2]
17476 mac1 = arg[3]
17477 } else {
17478 defundef = substr(arg[1], 2)
17479 mac1 = arg[2]
17480 }
17481 split(mac1, mac2, "(") #)
17482 macro = mac2[1]
17483 prefix = substr(line, 1, index(line, defundef) - 1)
17484 if (D_is_set[macro]) {
17485 # Preserve the white space surrounding the "#".
17486 print prefix "define", macro P[macro] D[macro]
17487 next
17488 } else {
17489 # Replace #undef with comments. This is necessary, for example,
17490 # in the case of _POSIX_SOURCE, which is predefined and required
17491 # on some systems where configure will not decide to define it.
17492 if (defundef == "undef") {
17493 print "/*", prefix defundef, macro, "*/"
17494 next
17495 }
17496 }
17497}
17498{ print }
17499_ACAWK
17500_ACEOF
17501cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017502 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017503fi # test -n "$CONFIG_HEADERS"
17504
17505
17506eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17507shift
17508for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509do
17510 case $ac_tag in
17511 :[FHLC]) ac_mode=$ac_tag; continue;;
17512 esac
17513 case $ac_mode$ac_tag in
17514 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017515 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516 :[FH]-) ac_tag=-:-;;
17517 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17518 esac
17519 ac_save_IFS=$IFS
17520 IFS=:
17521 set x $ac_tag
17522 IFS=$ac_save_IFS
17523 shift
17524 ac_file=$1
17525 shift
17526
17527 case $ac_mode in
17528 :L) ac_source=$1;;
17529 :[FH])
17530 ac_file_inputs=
17531 for ac_f
17532 do
17533 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017534 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017535 *) # Look for the file first in the build tree, then in the source tree
17536 # (if the path is not absolute). The absolute path cannot be DOS-style,
17537 # because $ac_f cannot contain `:'.
17538 test -f "$ac_f" ||
17539 case $ac_f in
17540 [\\/$]*) false;;
17541 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17542 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017543 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017545 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17546 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547 done
17548
17549 # Let's still pretend it is `configure' which instantiates (i.e., don't
17550 # use $as_me), people would be surprised to read:
17551 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017552 configure_input='Generated from '`
17553 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17554 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555 if test x"$ac_file" != x-; then
17556 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017557 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17558$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017560 # Neutralize special characters interpreted by sed in replacement strings.
17561 case $configure_input in #(
17562 *\&* | *\|* | *\\* )
17563 ac_sed_conf_input=`$as_echo "$configure_input" |
17564 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17565 *) ac_sed_conf_input=$configure_input;;
17566 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567
17568 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017569 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17570 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571 esac
17572 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 esac
17574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017576$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017577 X"$ac_file" : 'X\(//\)[^/]' \| \
17578 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017580$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17582 s//\1/
17583 q
17584 }
17585 /^X\(\/\/\)[^/].*/{
17586 s//\1/
17587 q
17588 }
17589 /^X\(\/\/\)$/{
17590 s//\1/
17591 q
17592 }
17593 /^X\(\/\).*/{
17594 s//\1/
17595 q
17596 }
17597 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017598 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017599 ac_builddir=.
17600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601case "$ac_dir" in
17602.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17603*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017604 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017606 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607 case $ac_top_builddir_sub in
17608 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17609 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17610 esac ;;
17611esac
17612ac_abs_top_builddir=$ac_pwd
17613ac_abs_builddir=$ac_pwd$ac_dir_suffix
17614# for backward compatibility:
17615ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017616
17617case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620 ac_top_srcdir=$ac_top_builddir_sub
17621 ac_abs_top_srcdir=$ac_pwd ;;
17622 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017623 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624 ac_top_srcdir=$srcdir
17625 ac_abs_top_srcdir=$srcdir ;;
17626 *) # Relative name.
17627 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17628 ac_top_srcdir=$ac_top_build_prefix$srcdir
17629 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017630esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017632
Martin v. Löwis11437992002-04-12 09:54:03 +000017633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634 case $ac_mode in
17635 :F)
17636 #
17637 # CONFIG_FILE
17638 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017639
17640 case $INSTALL in
17641 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017644 ac_MKDIR_P=$MKDIR_P
17645 case $MKDIR_P in
17646 [\\/$]* | ?:[\\/]* ) ;;
17647 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17648 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017649_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650
Matthias Kloseb9621712010-04-24 17:59:49 +000017651cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652# If the template does not know about datarootdir, expand it.
17653# FIXME: This hack should be removed a few years after 2.60.
17654ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017655ac_sed_dataroot='
17656/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 p
17658 q
17659}
17660/@datadir@/p
17661/@docdir@/p
17662/@infodir@/p
17663/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017664/@mandir@/p'
17665case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666*datarootdir*) ac_datarootdir_seen=yes;;
17667*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17669$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672 ac_datarootdir_hack='
17673 s&@datadir@&$datadir&g
17674 s&@docdir@&$docdir&g
17675 s&@infodir@&$infodir&g
17676 s&@localedir@&$localedir&g
17677 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017678 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679esac
17680_ACEOF
17681
17682# Neutralize VPATH when `$srcdir' = `.'.
17683# Shell code in configure.ac might set extrasub.
17684# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017685cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17686ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017687$extrasub
17688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017690:t
17691/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017692s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017694s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017695s&@srcdir@&$ac_srcdir&;t t
17696s&@abs_srcdir@&$ac_abs_srcdir&;t t
17697s&@top_srcdir@&$ac_top_srcdir&;t t
17698s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17699s&@builddir@&$ac_builddir&;t t
17700s&@abs_builddir@&$ac_abs_builddir&;t t
17701s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17702s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017703s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017705"
Victor Stinnere0be4232011-10-25 13:06:09 +020017706eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17707 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017710 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17711 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17712 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017714which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017715$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017716which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017717
Victor Stinnere0be4232011-10-25 13:06:09 +020017718 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017720 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17721 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017722 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017723 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 ;;
17725 :H)
17726 #
17727 # CONFIG_HEADER
17728 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017729 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017730 {
17731 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017732 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17733 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017734 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017735 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017736 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17737$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017738 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017739 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017740 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017741 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 fi
17743 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017744 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017745 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017746 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750
17751 esac
17752
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017753
17754 case $ac_file$ac_mode in
17755 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17756
17757 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758done # for ac_tag
17759
Guido van Rossum627b2d71993-12-24 10:39:16 +000017760
Matthias Kloseb9621712010-04-24 17:59:49 +000017761as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017762_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017763ac_clean_files=$ac_clean_files_save
17764
Matthias Kloseb9621712010-04-24 17:59:49 +000017765test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017766 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017767
Martin v. Löwis11437992002-04-12 09:54:03 +000017768
17769# configure is writing to config.log, and then calls config.status.
17770# config.status does its own redirection, appending to config.log.
17771# Unfortunately, on DOS this fails, as config.log is still kept open
17772# by configure, so config.status won't be able to write to it; its
17773# output is simply discarded. So we exec the FD to /dev/null,
17774# effectively closing config.log, so it can be properly (re)opened and
17775# appended to by config.status. When coming back to configure, we
17776# need to make the FD available again.
17777if test "$no_create" != yes; then
17778 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017779 ac_config_status_args=
17780 test "$silent" = yes &&
17781 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017782 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017783 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017784 exec 5>>config.log
17785 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17786 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017787 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017788fi
17789if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17791$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017792fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017793
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017794
Christian Heimes75ed8902013-11-20 01:11:18 +010017795echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017796if test ! -f Modules/Setup
17797then
17798 cp $srcdir/Modules/Setup.dist Modules/Setup
17799fi
17800
Christian Heimes75ed8902013-11-20 01:11:18 +010017801echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017802if test ! -f Modules/Setup.local
17803then
17804 echo "# Edit this file for local setup changes" >Modules/Setup.local
17805fi
17806
Christian Heimes75ed8902013-11-20 01:11:18 +010017807echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017808$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17809 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017810 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017811mv config.c Modules