blob: 98435960c94c505fdb200217697eba582aa2fe04 [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.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
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'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
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
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700684LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
698RANLIB
699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
INADA Naokia8f8d5b2017-06-29 00:31:53 +0900786runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_threads
834with_thread
835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000838with_c_locale_coercion
839with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700841with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_fpectl
843with_libm
844with_libc
845enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000846with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800847with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000848'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 ac_precious_vars='build_alias
850host_alias
851target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100852MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853CC
854CFLAGS
855LDFLAGS
856LIBS
857CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100858CPP
859PKG_CONFIG
860PKG_CONFIG_PATH
861PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865ac_init_help=
866ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000867ac_unrecognized_opts=
868ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# The variables have the same names as the options, with
870# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874no_recursion=
875prefix=NONE
876program_prefix=NONE
877program_suffix=NONE
878program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883x_includes=NONE
884x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886# Installation directory options.
887# These are left unexpanded so users can "make install exec_prefix=/foo"
888# and all the variables that are supposed to be based on exec_prefix
889# by default will actually change.
890# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892bindir='${exec_prefix}/bin'
893sbindir='${exec_prefix}/sbin'
894libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895datarootdir='${prefix}/share'
896datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897sysconfdir='${prefix}/etc'
898sharedstatedir='${prefix}/com'
899localstatedir='${prefix}/var'
INADA Naokia8f8d5b2017-06-29 00:31:53 +0900900runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901includedir='${prefix}/include'
902oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
904infodir='${datarootdir}/info'
905htmldir='${docdir}'
906dvidir='${docdir}'
907pdfdir='${docdir}'
908psdir='${docdir}'
909libdir='${exec_prefix}/lib'
910localedir='${datarootdir}/locale'
911mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 # If the previous option needs an argument, assign it.
918 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 ac_prev=
921 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200925 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
926 *=) ac_optarg= ;;
927 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Accept the important Cygnus configure options, so we can diagnose typos.
931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 case $ac_dashdash$ac_option in
933 --)
934 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -bindir | --bindir | --bindi | --bind | --bin | --bi)
937 ac_prev=bindir ;;
938 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940
941 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 -cache-file | --cache-file | --cache-fil | --cache-fi \
947 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
948 ac_prev=cache_file ;;
949 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
950 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 cache_file=$ac_optarg ;;
952
953 --config-cache | -C)
954 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
962 | --dataroo | --dataro | --datar)
963 ac_prev=datarootdir ;;
964 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
965 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
966 datarootdir=$ac_optarg ;;
967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983
984 -docdir | --docdir | --docdi | --doc | --do)
985 ac_prev=docdir ;;
986 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
987 docdir=$ac_optarg ;;
988
989 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
990 ac_prev=dvidir ;;
991 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
992 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200998 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000999 ac_useropt_orig=$ac_useropt
1000 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1001 case $ac_user_opts in
1002 *"
1003"enable_$ac_useropt"
1004"*) ;;
1005 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1006 ac_unrecognized_sep=', ';;
1007 esac
1008 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1011 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1012 | --exec | --exe | --ex)
1013 ac_prev=exec_prefix ;;
1014 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1015 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1016 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 # Obsolete; use --with-gas.
1021 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 -help | --help | --hel | --he | -h)
1024 ac_init_help=long ;;
1025 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1026 ac_init_help=recursive ;;
1027 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1028 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1036 ac_prev=htmldir ;;
1037 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1038 | --ht=*)
1039 htmldir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -includedir | --includedir | --includedi | --included | --include \
1042 | --includ | --inclu | --incl | --inc)
1043 ac_prev=includedir ;;
1044 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1045 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -infodir | --infodir | --infodi | --infod | --info | --inf)
1049 ac_prev=infodir ;;
1050 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libdir | --libdir | --libdi | --libd)
1054 ac_prev=libdir ;;
1055 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
1058 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1059 | --libexe | --libex | --libe)
1060 ac_prev=libexecdir ;;
1061 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1062 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 -localedir | --localedir | --localedi | --localed | --locale)
1066 ac_prev=localedir ;;
1067 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1068 localedir=$ac_optarg ;;
1069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 ac_prev=localstatedir ;;
1073 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1078 ac_prev=mandir ;;
1079 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Obsolete; use --without-fp.
1084 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 no_create=yes ;;
1089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1091 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1092 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1095 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1096 | --oldin | --oldi | --old | --ol | --o)
1097 ac_prev=oldincludedir ;;
1098 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1099 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1100 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1104 ac_prev=prefix ;;
1105 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1109 | --program-pre | --program-pr | --program-p)
1110 ac_prev=program_prefix ;;
1111 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1112 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1116 | --program-suf | --program-su | --program-s)
1117 ac_prev=program_suffix ;;
1118 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1119 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -program-transform-name | --program-transform-name \
1123 | --program-transform-nam | --program-transform-na \
1124 | --program-transform-n | --program-transform- \
1125 | --program-transform | --program-transfor \
1126 | --program-transfo | --program-transf \
1127 | --program-trans | --program-tran \
1128 | --progr-tra | --program-tr | --program-t)
1129 ac_prev=program_transform_name ;;
1130 -program-transform-name=* | --program-transform-name=* \
1131 | --program-transform-nam=* | --program-transform-na=* \
1132 | --program-transform-n=* | --program-transform-=* \
1133 | --program-transform=* | --program-transfor=* \
1134 | --program-transfo=* | --program-transf=* \
1135 | --program-trans=* | --program-tran=* \
1136 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1140 ac_prev=pdfdir ;;
1141 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1142 pdfdir=$ac_optarg ;;
1143
1144 -psdir | --psdir | --psdi | --psd | --ps)
1145 ac_prev=psdir ;;
1146 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1147 psdir=$ac_optarg ;;
1148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1150 | -silent | --silent | --silen | --sile | --sil)
1151 silent=yes ;;
1152
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001153 -runstatedir | --runstatedir | --runstatedi | --runstated \
1154 | --runstate | --runstat | --runsta | --runst | --runs \
1155 | --run | --ru | --r)
1156 ac_prev=runstatedir ;;
1157 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1158 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1159 | --run=* | --ru=* | --r=*)
1160 runstatedir=$ac_optarg ;;
1161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1163 ac_prev=sbindir ;;
1164 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1165 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
1168 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1169 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1170 | --sharedst | --shareds | --shared | --share | --shar \
1171 | --sha | --sh)
1172 ac_prev=sharedstatedir ;;
1173 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1174 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1175 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1176 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179 -site | --site | --sit)
1180 ac_prev=site ;;
1181 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1185 ac_prev=srcdir ;;
1186 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1190 | --syscon | --sysco | --sysc | --sys | --sy)
1191 ac_prev=sysconfdir ;;
1192 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1193 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001195
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1202 verbose=yes ;;
1203
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 -version | --version | --versio | --versi | --vers | -V)
1205 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 ac_useropt_orig=$ac_useropt
1229 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1230 case $ac_user_opts in
1231 *"
1232"with_$ac_useropt"
1233"*) ;;
1234 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1235 ac_unrecognized_sep=', ';;
1236 esac
1237 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239 --x)
1240 # Obsolete; use --with-x.
1241 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1244 | --x-incl | --x-inc | --x-in | --x-i)
1245 ac_prev=x_includes ;;
1246 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1247 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
1250 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1251 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1252 ac_prev=x_libraries ;;
1253 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1254 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1258Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ;;
1260
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 *=*)
1262 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1263 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 case $ac_envvar in #(
1265 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 export $ac_envvar ;;
1270
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001271 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001276 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 ;;
1278
1279 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280done
1281
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285fi
1286
Matthias Kloseb9621712010-04-24 17:59:49 +00001287if test -n "$ac_unrecognized_opts"; then
1288 case $enable_option_checking in
1289 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1292 esac
1293fi
1294
1295# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1297 datadir sysconfdir sharedstatedir localstatedir includedir \
1298 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001299 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001302 # Remove trailing slashes.
1303 case $ac_val in
1304 */ )
1305 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1306 eval $ac_var=\$ac_val;;
1307 esac
1308 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001309 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 [\\/$]* | ?:[\\/]* ) continue;;
1311 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001313 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001314done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# There might be people who depend on the old broken behavior: `$host'
1317# used to hold the argument of --host etc.
1318# FIXME: To remove some day.
1319build=$build_alias
1320host=$host_alias
1321target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Martin v. Löwis11437992002-04-12 09:54:03 +00001323# FIXME: To remove some day.
1324if test "x$host_alias" != x; then
1325 if test "x$build_alias" = x; then
1326 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001327 elif test "x$build_alias" != "x$host_alias"; then
1328 cross_compiling=yes
1329 fi
1330fi
1331
1332ac_tool_prefix=
1333test -n "$host_alias" && ac_tool_prefix=$host_alias-
1334
1335test "$silent" = yes && exec 6>/dev/null
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338ac_pwd=`pwd` && test -n "$ac_pwd" &&
1339ac_ls_di=`ls -di .` &&
1340ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344
1345
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346# Find the source files, if location was not specified.
1347if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001348 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 ac_confdir=`$as_dirname -- "$as_myself" ||
1351$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1352 X"$as_myself" : 'X\(//\)[^/]' \| \
1353 X"$as_myself" : 'X\(//\)$' \| \
1354 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1355$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)[^/].*/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\/\)$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\).*/{
1369 s//\1/
1370 q
1371 }
1372 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001373 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375 srcdir=..
1376 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377else
1378 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380if test ! -r "$srcdir/$ac_unique_file"; then
1381 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387 pwd)`
1388# When building in place, set srcdir=.
1389if test "$ac_abs_confdir" = "$ac_pwd"; then
1390 srcdir=.
1391fi
1392# Remove unnecessary trailing slashes from srcdir.
1393# Double slashes in file names in object file debugging info
1394# mess up M-x gdb in Emacs.
1395case $srcdir in
1396*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397esac
1398for ac_var in $ac_precious_vars; do
1399 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_env_${ac_var}_value=\$${ac_var}
1401 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1402 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1403done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001404
Martin v. Löwis11437992002-04-12 09:54:03 +00001405#
1406# Report the --help message.
1407#
1408if test "$ac_init_help" = "long"; then
1409 # Omit some internal or obsolete options to make the list less imposing.
1410 # This message is too long to be a string in the A/UX 3.1 sh.
1411 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001412\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
1414Usage: $0 [OPTION]... [VAR=VALUE]...
1415
1416To assign environment variables (e.g., CC, CFLAGS...), specify them as
1417VAR=VALUE. See below for descriptions of some of the useful variables.
1418
1419Defaults for the options are specified in brackets.
1420
1421Configuration:
1422 -h, --help display this help and exit
1423 --help=short display options specific to this package
1424 --help=recursive display the short help of all the included packages
1425 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001426 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --cache-file=FILE cache test results in FILE [disabled]
1428 -C, --config-cache alias for \`--cache-file=config.cache'
1429 -n, --no-create do not create output files
1430 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432Installation directories:
1433 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438By default, \`make install' will install all the files in
1439\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1440an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1441for instance \`--prefix=\$HOME'.
1442
1443For better control, use the options below.
1444
1445Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --bindir=DIR user executables [EPREFIX/bin]
1447 --sbindir=DIR system admin executables [EPREFIX/sbin]
1448 --libexecdir=DIR program executables [EPREFIX/libexec]
1449 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1450 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1451 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001452 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001453 --libdir=DIR object code libraries [EPREFIX/lib]
1454 --includedir=DIR C header files [PREFIX/include]
1455 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1456 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1457 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1458 --infodir=DIR info documentation [DATAROOTDIR/info]
1459 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1460 --mandir=DIR man documentation [DATAROOTDIR/man]
1461 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1462 --htmldir=DIR html documentation [DOCDIR]
1463 --dvidir=DIR dvi documentation [DOCDIR]
1464 --pdfdir=DIR pdf documentation [DOCDIR]
1465 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466_ACEOF
1467
1468 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001469
1470System types:
1471 --build=BUILD configure for building on BUILD [guessed]
1472 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001473 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001474_ACEOF
1475fi
1476
1477if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001479 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001480 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 cat <<\_ACEOF
1482
1483Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1486 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001487 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001488 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --enable-framework[=INSTALLDIR]
1490 Build (MacOSX|Darwin) framework
1491 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001492 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001493 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1494 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001495 --enable-loadable-sqlite-extensions
1496 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --enable-ipv6 Enable ipv6 (with ipv4) support
1498 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001499 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001500 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001501
1502Optional Packages:
1503 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1504 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001505 --with-universal-archs=ARCH
1506 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001507 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001508 --with-framework-name=FRAMEWORK
1509 specify an alternate name of the framework built
1510 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001512 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-cxx-main=<compiler>
1514 compile main() and link python executable with C++
1515 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with-suffix=.exe set executable suffix
1517 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001518 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001519 --with-lto Enable Link Time Optimization in PGO builds.
1520 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001521 --with-hash-algorithm=[fnv|siphash24]
1522 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001523 --with-address-sanitizer
1524 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001526 --with-system-expat build pyexpat module using an installed expat
1527 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001528 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001529 --with-system-libmpdec build _decimal module using an installed libmpdec
1530 library
Ned Deilyd819b932013-09-06 01:07:05 -07001531 --with-tcltk-includes='-I...'
1532 override search for Tcl and Tk include files
1533 --with-tcltk-libs='-L...'
1534 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001535 --with-dbmliborder=db1:db2:...
1536 order to check db backends for dbm. Valid value is a
1537 colon separated string with the backend names
1538 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with(out)-threads[=DIRECTORY]
1540 disable/enable thread support
1541 --with(out)-thread[=DIRECTORY]
1542 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001543 --with(out)-doc-strings disable/enable documentation strings
1544 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001545 --with(out)-c-locale-coercion
1546 disable/enable C locale coercion to a UTF-8 based
1547 locale
1548 --with(out)-c-locale-warning
1549 disable/enable locale compatibility warning in the C
1550 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001551 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001552 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001553 --with-fpectl enable SIGFPE catching
1554 --with-libm=STRING math library
1555 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001556 --with(out)-computed-gotos
1557 Use computed gotos in evaluation loop (enabled by
1558 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001559 --with(out)-ensurepip=[=upgrade]
1560 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001561
1562Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001563 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 CC C compiler command
1565 CFLAGS C compiler flags
1566 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1567 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001572 PKG_CONFIG path to pkg-config utility
1573 PKG_CONFIG_PATH
1574 directories to add to pkg-config's search path
1575 PKG_CONFIG_LIBDIR
1576 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
1578Use these variables to override the choices made by `configure' or to help
1579it to find libraries and programs with nonstandard names/locations.
1580
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001581Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001582_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001584fi
1585
1586if test "$ac_init_help" = "recursive"; then
1587 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 test -d "$ac_dir" ||
1590 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1591 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_builddir=.
1593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594case "$ac_dir" in
1595.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1596*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001597 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001599 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 case $ac_top_builddir_sub in
1601 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1602 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1603 esac ;;
1604esac
1605ac_abs_top_builddir=$ac_pwd
1606ac_abs_builddir=$ac_pwd$ac_dir_suffix
1607# for backward compatibility:
1608ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001609
1610case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001612 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 ac_top_srcdir=$ac_top_builddir_sub
1614 ac_abs_top_srcdir=$ac_pwd ;;
1615 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001616 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 ac_top_srcdir=$srcdir
1618 ac_abs_top_srcdir=$srcdir ;;
1619 *) # Relative name.
1620 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1621 ac_top_srcdir=$ac_top_build_prefix$srcdir
1622 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001623esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 cd "$ac_dir" || { ac_status=$?; continue; }
1627 # Check for guested configure.
1628 if test -f "$ac_srcdir/configure.gnu"; then
1629 echo &&
1630 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1631 elif test -f "$ac_srcdir/configure"; then
1632 echo &&
1633 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 fi || ac_status=$?
1637 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001638 done
1639fi
1640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001642if $ac_init_version; then
1643 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001644python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001645generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001646
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001647Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001648This configure script is free software; the Free Software Foundation
1649gives unlimited permission to copy, distribute and modify it.
1650_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001653
1654## ------------------------ ##
1655## Autoconf initialization. ##
1656## ------------------------ ##
1657
1658# ac_fn_c_try_compile LINENO
1659# --------------------------
1660# Try to compile conftest.$ac_ext, and return whether this succeeded.
1661ac_fn_c_try_compile ()
1662{
1663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664 rm -f conftest.$ac_objext
1665 if { { ac_try="$ac_compile"
1666case "(($ac_try" in
1667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668 *) ac_try_echo=$ac_try;;
1669esac
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672 (eval "$ac_compile") 2>conftest.err
1673 ac_status=$?
1674 if test -s conftest.err; then
1675 grep -v '^ *+' conftest.err >conftest.er1
1676 cat conftest.er1 >&5
1677 mv -f conftest.er1 conftest.err
1678 fi
1679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1680 test $ac_status = 0; } && {
1681 test -z "$ac_c_werror_flag" ||
1682 test ! -s conftest.err
1683 } && test -s conftest.$ac_objext; then :
1684 ac_retval=0
1685else
1686 $as_echo "$as_me: failed program was:" >&5
1687sed 's/^/| /' conftest.$ac_ext >&5
1688
1689 ac_retval=1
1690fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001691 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 as_fn_set_status $ac_retval
1693
1694} # ac_fn_c_try_compile
1695
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001696# ac_fn_c_try_cpp LINENO
1697# ----------------------
1698# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1699ac_fn_c_try_cpp ()
1700{
1701 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1702 if { { ac_try="$ac_cpp conftest.$ac_ext"
1703case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1710 ac_status=$?
1711 if test -s conftest.err; then
1712 grep -v '^ *+' conftest.err >conftest.er1
1713 cat conftest.er1 >&5
1714 mv -f conftest.er1 conftest.err
1715 fi
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717 test $ac_status = 0; } > conftest.i && {
1718 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1719 test ! -s conftest.err
1720 }; then :
1721 ac_retval=0
1722else
1723 $as_echo "$as_me: failed program was:" >&5
1724sed 's/^/| /' conftest.$ac_ext >&5
1725
1726 ac_retval=1
1727fi
1728 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1729 as_fn_set_status $ac_retval
1730
1731} # ac_fn_c_try_cpp
1732
Matthias Kloseb9621712010-04-24 17:59:49 +00001733# ac_fn_c_try_link LINENO
1734# -----------------------
1735# Try to link conftest.$ac_ext, and return whether this succeeded.
1736ac_fn_c_try_link ()
1737{
1738 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739 rm -f conftest.$ac_objext conftest$ac_exeext
1740 if { { ac_try="$ac_link"
1741case "(($ac_try" in
1742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1743 *) ac_try_echo=$ac_try;;
1744esac
1745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1746$as_echo "$ac_try_echo"; } >&5
1747 (eval "$ac_link") 2>conftest.err
1748 ac_status=$?
1749 if test -s conftest.err; then
1750 grep -v '^ *+' conftest.err >conftest.er1
1751 cat conftest.er1 >&5
1752 mv -f conftest.er1 conftest.err
1753 fi
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } && {
1756 test -z "$ac_c_werror_flag" ||
1757 test ! -s conftest.err
1758 } && test -s conftest$ac_exeext && {
1759 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001760 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 }; then :
1762 ac_retval=0
1763else
1764 $as_echo "$as_me: failed program was:" >&5
1765sed 's/^/| /' conftest.$ac_ext >&5
1766
1767 ac_retval=1
1768fi
1769 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1770 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1771 # interfere with the next link command; also delete a directory that is
1772 # left behind by Apple's compiler. We do this before executing the actions.
1773 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001774 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 as_fn_set_status $ac_retval
1776
1777} # ac_fn_c_try_link
1778
Matthias Kloseb9621712010-04-24 17:59:49 +00001779# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1780# -------------------------------------------------------
1781# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1782# the include files in INCLUDES and setting the cache variable VAR
1783# accordingly.
1784ac_fn_c_check_header_mongrel ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001787 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1789$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001790if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001791 $as_echo_n "(cached) " >&6
1792fi
1793eval ac_res=\$$3
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795$as_echo "$ac_res" >&6; }
1796else
1797 # Is the header compilable?
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1799$as_echo_n "checking $2 usability... " >&6; }
1800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801/* end confdefs.h. */
1802$4
1803#include <$2>
1804_ACEOF
1805if ac_fn_c_try_compile "$LINENO"; then :
1806 ac_header_compiler=yes
1807else
1808 ac_header_compiler=no
1809fi
1810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1812$as_echo "$ac_header_compiler" >&6; }
1813
1814# Is the header present?
1815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1816$as_echo_n "checking $2 presence... " >&6; }
1817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1818/* end confdefs.h. */
1819#include <$2>
1820_ACEOF
1821if ac_fn_c_try_cpp "$LINENO"; then :
1822 ac_header_preproc=yes
1823else
1824 ac_header_preproc=no
1825fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001826rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1828$as_echo "$ac_header_preproc" >&6; }
1829
1830# So? What about this header?
1831case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1832 yes:no: )
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1834$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1836$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1837 ;;
1838 no:yes:* )
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1840$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1842$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1844$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1846$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1848$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001849( $as_echo "## --------------------------------------- ##
1850## Report this to https://bugs.python.org/ ##
1851## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 ) | sed "s/^/$as_me: WARNING: /" >&2
1853 ;;
1854esac
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001857if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001858 $as_echo_n "(cached) " >&6
1859else
1860 eval "$3=\$ac_header_compiler"
1861fi
1862eval ac_res=\$$3
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1864$as_echo "$ac_res" >&6; }
1865fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001866 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001867
1868} # ac_fn_c_check_header_mongrel
1869
1870# ac_fn_c_try_run LINENO
1871# ----------------------
1872# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1873# that executables *can* be run.
1874ac_fn_c_try_run ()
1875{
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 if { { ac_try="$ac_link"
1878case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_link") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1888 { { case "(($ac_try" in
1889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1890 *) ac_try_echo=$ac_try;;
1891esac
1892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1893$as_echo "$ac_try_echo"; } >&5
1894 (eval "$ac_try") 2>&5
1895 ac_status=$?
1896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897 test $ac_status = 0; }; }; then :
1898 ac_retval=0
1899else
1900 $as_echo "$as_me: program exited with status $ac_status" >&5
1901 $as_echo "$as_me: failed program was:" >&5
1902sed 's/^/| /' conftest.$ac_ext >&5
1903
1904 ac_retval=$ac_status
1905fi
1906 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001908 as_fn_set_status $ac_retval
1909
1910} # ac_fn_c_try_run
1911
1912# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1913# -------------------------------------------------------
1914# Tests whether HEADER exists and can be compiled using the include files in
1915# INCLUDES, setting the cache variable VAR accordingly.
1916ac_fn_c_check_header_compile ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001921if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001922 $as_echo_n "(cached) " >&6
1923else
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927#include <$2>
1928_ACEOF
1929if ac_fn_c_try_compile "$LINENO"; then :
1930 eval "$3=yes"
1931else
1932 eval "$3=no"
1933fi
1934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1935fi
1936eval ac_res=\$$3
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1938$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001939 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001940
1941} # ac_fn_c_check_header_compile
1942
Matthias Kloseb9621712010-04-24 17:59:49 +00001943# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1944# -------------------------------------------
1945# Tests whether TYPE exists after having included INCLUDES, setting cache
1946# variable VAR accordingly.
1947ac_fn_c_check_type ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001952if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 $as_echo_n "(cached) " >&6
1954else
1955 eval "$3=no"
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$4
1959int
1960main ()
1961{
1962if (sizeof ($2))
1963 return 0;
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1970/* end confdefs.h. */
1971$4
1972int
1973main ()
1974{
1975if (sizeof (($2)))
1976 return 0;
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982
1983else
1984 eval "$3=yes"
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1989fi
1990eval ac_res=\$$3
1991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1992$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001993 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001994
1995} # ac_fn_c_check_type
1996
Matthias Kloseb9621712010-04-24 17:59:49 +00001997# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1998# --------------------------------------------
1999# Tries to find the compile-time value of EXPR in a program that includes
2000# INCLUDES, setting VAR accordingly. Returns whether the value could be
2001# computed
2002ac_fn_c_compute_int ()
2003{
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 if test "$cross_compiling" = yes; then
2006 # Depending upon the size, compute the lo and hi bounds.
2007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002014test_array [0] = 0;
2015return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 ac_lo=0 ac_mid=0
2023 while :; do
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
2028main ()
2029{
2030static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002031test_array [0] = 0;
2032return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 ac_hi=$ac_mid; break
2040else
2041 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2042 if test $ac_lo -le $ac_mid; then
2043 ac_lo= ac_hi=
2044 break
2045 fi
2046 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2047fi
2048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049 done
2050else
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_hi=-1 ac_mid=-1
2067 while :; do
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=$ac_mid; break
2084else
2085 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2086 if test $ac_mid -le $ac_hi; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 ac_lo= ac_hi=
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100# Binary search between lo and hi bounds.
2101while test "x$ac_lo" != "x$ac_hi"; do
2102 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002110test_array [0] = 0;
2111return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002188if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002244
2245} # ac_fn_c_check_func
2246
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002247# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2248# ---------------------------------------------
2249# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2250# accordingly.
2251ac_fn_c_check_decl ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 as_decl_name=`echo $2|sed 's/ *(.*//'`
2255 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2257$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2258if eval \${$3+:} false; then :
2259 $as_echo_n "(cached) " >&6
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$4
2264int
2265main ()
2266{
2267#ifndef $as_decl_name
2268#ifdef __cplusplus
2269 (void) $as_decl_use;
2270#else
2271 (void) $as_decl_name;
2272#endif
2273#endif
2274
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 eval "$3=yes"
2281else
2282 eval "$3=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286eval ac_res=\$$3
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2288$as_echo "$ac_res" >&6; }
2289 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290
2291} # ac_fn_c_check_decl
2292
Matthias Kloseb9621712010-04-24 17:59:49 +00002293# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2294# ----------------------------------------------------
2295# Tries to find if the field MEMBER exists in type AGGR, after including
2296# INCLUDES, setting cache variable VAR accordingly.
2297ac_fn_c_check_member ()
2298{
2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2301$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002302if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002303 $as_echo_n "(cached) " >&6
2304else
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h. */
2307$5
2308int
2309main ()
2310{
2311static $2 ac_aggr;
2312if (ac_aggr.$3)
2313return 0;
2314 ;
2315 return 0;
2316}
2317_ACEOF
2318if ac_fn_c_try_compile "$LINENO"; then :
2319 eval "$4=yes"
2320else
2321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h. */
2323$5
2324int
2325main ()
2326{
2327static $2 ac_aggr;
2328if (sizeof ac_aggr.$3)
2329return 0;
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 eval "$4=yes"
2336else
2337 eval "$4=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$4
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002347
2348} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Ned Deily4829bc62016-09-12 17:29:04 -04002353It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002354generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002390 $as_echo "PATH: $as_dir"
2391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Kloseb9621712010-04-24 17:59:49 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# 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 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Kloseb9621712010-04-24 17:59:49 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Kloseb9621712010-04-24 17:59:49 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597else
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602do
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$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 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Trent Nelson4d4ec652012-10-16 08:51:24 -04002702
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002703if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002704 # If we're building out-of-tree, we need to make sure the following
2705 # resources get picked up before their $srcdir counterparts.
2706 # Objects/ -> typeslots.inc
2707 # Include/ -> Python-ast.h, graminit.h
2708 # Python/ -> importlib.h
2709 # (A side effect of this is that these resources will automatically be
2710 # regenerated when building out-of-tree, regardless of whether or not
2711 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2712 # off.)
2713 BASECPPFLAGS="-IObjects -IInclude -IPython"
2714else
2715 BASECPPFLAGS=""
2716fi
2717
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718
2719
2720
2721
Victor Stinner9ed34a82017-05-02 22:35:58 +02002722if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724# Extract the first word of "git", so it can be a program name with args.
2725set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2727$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo_n "(cached) " >&6
2730else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 if test -n "$HAS_GIT"; then
2732 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733else
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
2746 done
2747IFS=$as_save_IFS
2748
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750fi
2751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752HAS_GIT=$ac_cv_prog_HAS_GIT
2753if test -n "$HAS_GIT"; then
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2755$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756else
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2758$as_echo "no" >&6; }
2759fi
2760
2761
2762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766then
Ned Deily554626a2017-03-20 23:41:52 -04002767 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2768 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002769 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002771 GITVERSION=""
2772 GITTAG=""
2773 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774fi
2775
2776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
2779
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002780ac_aux_dir=
2781for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2782 if test -f "$ac_dir/install-sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install-sh -c"
2785 break
2786 elif test -f "$ac_dir/install.sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install.sh -c"
2789 break
2790 elif test -f "$ac_dir/shtool"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/shtool install -c"
2793 break
2794 fi
2795done
2796if test -z "$ac_aux_dir"; then
2797 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2798fi
2799
2800# These three variables are undocumented and unsupported,
2801# and are intended to be withdrawn in a future Autoconf release.
2802# They can cause serious problems if a builder's source tree is in a directory
2803# whose full name contains unusual characters.
2804ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2805ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2806ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2807
2808
2809# Make sure we can run config.sub.
2810$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2811 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2812
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2814$as_echo_n "checking build system type... " >&6; }
2815if ${ac_cv_build+:} false; then :
2816 $as_echo_n "(cached) " >&6
2817else
2818 ac_build_alias=$build_alias
2819test "x$ac_build_alias" = x &&
2820 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2821test "x$ac_build_alias" = x &&
2822 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2823ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2824 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2825
2826fi
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2828$as_echo "$ac_cv_build" >&6; }
2829case $ac_cv_build in
2830*-*-*) ;;
2831*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2832esac
2833build=$ac_cv_build
2834ac_save_IFS=$IFS; IFS='-'
2835set x $ac_cv_build
2836shift
2837build_cpu=$1
2838build_vendor=$2
2839shift; shift
2840# Remember, the first character of IFS is used to create $*,
2841# except with old shells:
2842build_os=$*
2843IFS=$ac_save_IFS
2844case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2845
2846
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2848$as_echo_n "checking host system type... " >&6; }
2849if ${ac_cv_host+:} false; then :
2850 $as_echo_n "(cached) " >&6
2851else
2852 if test "x$host_alias" = x; then
2853 ac_cv_host=$ac_cv_build
2854else
2855 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2857fi
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2861$as_echo "$ac_cv_host" >&6; }
2862case $ac_cv_host in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2865esac
2866host=$ac_cv_host
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_host
2869shift
2870host_cpu=$1
2871host_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875host_os=$*
2876IFS=$ac_save_IFS
2877case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2878
2879
2880
doko@python.orga10e4a92013-01-25 18:45:12 +01002881
2882
Ned Deilyfcbc2462014-08-22 13:32:49 -07002883# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2884rm -f pybuilddir.txt
2885
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886for ac_prog in python$PACKAGE_VERSION python3 python
2887do
2888 # Extract the first word of "$ac_prog", so it can be a program name with args.
2889set dummy $ac_prog; ac_word=$2
2890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2891$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo_n "(cached) " >&6
2894else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895 if test -n "$PYTHON_FOR_REGEN"; then
2896 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002897else
2898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2899for as_dir in $PATH
2900do
2901 IFS=$as_save_IFS
2902 test -z "$as_dir" && as_dir=.
2903 for ac_exec_ext in '' $ac_executable_extensions; do
2904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2907 break 2
2908 fi
2909done
2910 done
2911IFS=$as_save_IFS
2912
2913fi
2914fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2916if test -n "$PYTHON_FOR_REGEN"; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2918$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919else
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2921$as_echo "no" >&6; }
2922fi
2923
2924
Victor Stinnera5c62a82017-05-03 18:21:48 +02002925 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002927test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929
2930
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002931if test "$cross_compiling" = yes; then
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2933$as_echo_n "checking for python interpreter for cross build... " >&6; }
2934 if test -z "$PYTHON_FOR_BUILD"; then
2935 for interp in python$PACKAGE_VERSION python3 python; do
2936 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002937 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 +02002938 break
2939 fi
2940 interp=
2941 done
2942 if test x$interp = x; then
2943 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2944 fi
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2946$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002947 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 _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002948 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002949elif test "$cross_compiling" = maybe; then
2950 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951else
2952 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Ned Deily4829bc62016-09-12 17:29:04 -04002971VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001
3002
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
3009
3010
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003011define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003013# Arguments passed to configure.
3014
3015CONFIG_ARGS="$ac_configure_args"
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3018$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003020if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 case $enableval in
3023 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 # Locate the best usable SDK, see Mac/README.txt for more
3025 # information
3026 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003027 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003029 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3030 if test ! -d "${enableval}"
3031 then
3032 enableval=/
3033 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
3037 case $enableval in
3038 no)
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041 ;;
3042 *)
3043 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 if test ! -d "${UNIVERSALSDK}"
3045 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003046 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052else
3053
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059if test -n "${UNIVERSALSDK}"
3060then
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3062$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063else
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003069
Ned Deily87adb6e2013-10-18 21:09:56 -07003070ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072# For backward compatibility reasons we prefer to select '32-bit' if available,
3073# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003075if test "`uname -s`" = "Darwin"
3076then
3077 if test -n "${UNIVERSALSDK}"
3078 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003079 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003080 then
3081 UNIVERSAL_ARCHS="intel"
3082 fi
3083 fi
3084fi
3085
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3088$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
3090# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 UNIVERSAL_ARCHS="$withval"
3094
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095fi
3096
Ned Deily87adb6e2013-10-18 21:09:56 -07003097if test -n "${UNIVERSALSDK}"
3098then
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3100$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3101else
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3103$as_echo "no" >&6; }
3104fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106
3107# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109 withval=$with_framework_name;
3110 PYTHONFRAMEWORK=${withval}
3111 PYTHONFRAMEWORKDIR=${withval}.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3113
3114else
3115
3116 PYTHONFRAMEWORK=Python
3117 PYTHONFRAMEWORKDIR=Python.framework
3118 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3119
3120fi
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003125 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003126 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003127 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 esac
3129 case $enableval in
3130 no)
3131 PYTHONFRAMEWORK=
3132 PYTHONFRAMEWORKDIR=no-framework
3133 PYTHONFRAMEWORKPREFIX=
3134 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST=
3136 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 FRAMEWORKALTINSTALLFIRST=
3138 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE"; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003146 ;;
3147 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003151 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003152 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3153 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003154 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE" ; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 else
3161 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3162 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163
3164 case "${enableval}" in
3165 /System*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 if test "${prefix}" = "NONE" ; then
3168 # See below
3169 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3170 fi
3171 ;;
3172
3173 /Library*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176
3177 */Library/Frameworks)
3178 MDIR="`dirname "${enableval}"`"
3179 MDIR="`dirname "${MDIR}"`"
3180 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3181
3182 if test "${prefix}" = "NONE"; then
3183 # User hasn't specified the
3184 # --prefix option, but wants to install
3185 # the framework in a non-default location,
3186 # ensure that the compatibility links get
3187 # installed relative to that prefix as well
3188 # instead of in /usr/local.
3189 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3190 fi
3191 ;;
3192
3193 *)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 ;;
3196 esac
3197
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003206 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3207
3208 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Guido van Rossum563e7081996-09-10 18:20:48 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORKPREFIX=
3217 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST=
3219 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 FRAMEWORKALTINSTALLFIRST=
3221 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223 if test "x${prefix}" = "xNONE" ; then
3224 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3225 else
3226 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3227 fi
Jack Jansene578a632001-08-15 01:27:14 +00003228 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
3234
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
3236
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240
3241
3242
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003243
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003244
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003246
3247cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003248#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003249_ACEOF
3250
3251
Jack Jansene578a632001-08-15 01:27:14 +00003252##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003253## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003254## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003255##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003256# Set name for machine-dependent library files
3257
Matthias Kloseb9621712010-04-24 17:59:49 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3259$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003260if test -z "$MACHDEP"
3261then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 # avoid using uname for cross builds
3263 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003264 # ac_sys_system and ac_sys_release are used for setting
3265 # a lot of different things including 'define_xopen_source'
3266 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003267 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003268 *-*-linux-android*)
3269 ac_sys_system=Linux-android
3270 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003271 *-*-linux*)
3272 ac_sys_system=Linux
3273 ;;
3274 *-*-cygwin*)
3275 ac_sys_system=Cygwin
3276 ;;
3277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003299 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003300 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003301 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003302 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
Guido van Rossum91922671997-10-09 20:24:13 +00003306
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003307
3308if test "$cross_compiling" = yes; then
3309 case "$host" in
3310 *-*-linux*)
3311 case "$host_cpu" in
3312 arm*)
3313 _host_cpu=arm
3314 ;;
3315 *)
3316 _host_cpu=$host_cpu
3317 esac
3318 ;;
3319 *-*-cygwin*)
3320 _host_cpu=
3321 ;;
3322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3326 esac
3327 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3328fi
3329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3331# disable features if it is defined, without any means to access these
3332# features as extensions. For these systems, we skip the definition of
3333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3334# some feature, make sure there is no alternative way to access this
3335# feature. Also, when using wildcards, make sure you have verified the
3336# need for not defining _XOPEN_SOURCE on all systems matching the
3337# wildcard, and that the wildcard does not include future systems
3338# (which may remove their limitations).
3339case $ac_sys_system/$ac_sys_release in
3340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3341 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003342 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003343 # In addition, Stefan Krah confirms that issue #1244610 exists through
3344 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346 define_xopen_source=no
3347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003352
3353 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003354 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003355 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3356 # also defined. This can be overridden by defining _BSD_SOURCE
3357 # As this has a different meaning on Linux, only define it on OpenBSD
3358
Matthias Kloseb9621712010-04-24 17:59:49 +00003359$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360
3361 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003362 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3363 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3364 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003365 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 +00003366 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003367 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3368 # request to enable features supported by the standard as a request
3369 # to disable features not supported by the standard. The best way
3370 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3371 # entirely and define __EXTENSIONS__ instead.
3372 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003373 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3375 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003376 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003377 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003378 define_xopen_source=no;;
3379 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003381 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003382 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003383 # On FreeBSD 4, the math functions C89 does not cover are never defined
3384 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3385 FreeBSD/4.*)
3386 define_xopen_source=no;;
3387 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3388 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3389 # identifies itself as Darwin/7.*
3390 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3391 # disables platform specific features beyond repair.
3392 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3393 # has no effect, don't bother defining them
3394 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003395 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003396 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003397 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003398 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3399 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3400 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003401 AIX/4)
3402 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003403 AIX/5)
3404 if test `uname -r` -eq 1; then
3405 define_xopen_source=no
3406 fi
3407 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003408 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3409 # defining NI_NUMERICHOST.
3410 QNX/6.3.2)
3411 define_xopen_source=no
3412 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414esac
3415
3416if test $define_xopen_source = yes
3417then
Victor Stinner14d098d2011-09-07 22:29:43 +02003418 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Victor Stinner14d098d2011-09-07 22:29:43 +02003420$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003421
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3424 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3425 # several APIs are not declared. Since this is also needed in some
3426 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Matthias Kloseb9621712010-04-24 17:59:49 +00003428$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003429
3430
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003431
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003432$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434fi
3435
Christian Heimes647cd872013-12-07 23:39:33 +01003436# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3437case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003438 hp*|HP*)
3439 define_stdc_a1=yes;;
3440 *)
3441 define_stdc_a1=no;;
3442esac
3443
3444if test $define_stdc_a1 = yes
3445then
Christian Heimes647cd872013-12-07 23:39:33 +01003446
3447$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3448
Christian Heimesb02bcae2013-12-08 15:21:08 +01003449fi
Christian Heimes647cd872013-12-07 23:39:33 +01003450
Guido van Rossum91922671997-10-09 20:24:13 +00003451#
3452# SGI compilers allow the specification of the both the ABI and the
3453# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003454# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003455#
3456# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3457# thus supply support for various ABI/ISA combinations. The MACHDEP
3458# variable is also adjusted.
3459#
3460
3461if test ! -z "$SGI_ABI"
3462then
3463 CC="cc $SGI_ABI"
3464 LDFLAGS="$SGI_ABI $LDFLAGS"
3465 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3468$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003469
Jack Jansen6b08a402004-06-03 12:41:45 +00003470# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3471# it may influence the way we can build extensions, so distutils
3472# needs to check it
3473
Thomas Wouters477c8d52006-05-27 19:21:47 +00003474
Jack Jansen6b08a402004-06-03 12:41:45 +00003475CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003476EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003477
Guido van Rossum627b2d71993-12-24 10:39:16 +00003478# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003479
3480# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3481# for debug/optimization stuff. BASECFLAGS is for flags that are required
3482# just to get things to compile and link. Users are free to override OPT
3483# when running configure or make. The build should not break if they do.
3484# BASECFLAGS should generally not be messed with, however.
3485
3486# XXX shouldn't some/most/all of this code be merged with the stuff later
3487# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3489$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003490
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003492if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003493 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003494 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003495 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003496 without_gcc=yes;;
3497 yes) CC=gcc
3498 without_gcc=no;;
3499 *) CC=$withval
3500 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003501 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003502else
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003504 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003505 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003506 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003507 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003508 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509fi
3510
Matthias Kloseb9621712010-04-24 17:59:49 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3512$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003513
Zachary Ware5af85642015-12-21 12:09:17 -06003514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3515$as_echo_n "checking for --with-icc... " >&6; }
3516
3517# Check whether --with-icc was given.
3518if test "${with_icc+set}" = set; then :
3519 withval=$with_icc;
3520 case $withval in
3521 no) CC=${CC:-cc}
3522 with_icc=no;;
3523 yes) CC=icc
3524 CXX=icpc
3525 with_icc=yes;;
3526 *) CC=$withval
3527 with_icc=$withval;;
3528 esac
3529else
3530
3531 with_icc=no
3532fi
3533
3534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3535$as_echo "$with_icc" >&6; }
3536
Guido van Rossum8b131c51995-03-09 14:10:13 +00003537# If the user switches compilers, we can't believe the cache
3538if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3539then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003540 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003541(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003542fi
3543
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003544# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3545# when the compiler supports them, but we don't always want -O2, and
3546# we set -g later.
3547if test -z "$CFLAGS"; then
3548 CFLAGS=
3549fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003550
3551if test "$ac_sys_system" = "Darwin"
3552then
3553 # Compiler selection on MacOSX is more complicated than
3554 # AC_PROG_CC can handle, see Mac/README.txt for more
3555 # information
3556 if test -z "${CC}"
3557 then
3558 found_gcc=
3559 found_clang=
3560 as_save_IFS=$IFS; IFS=:
3561 for as_dir in $PATH
3562 do
3563 IFS=$as_save_IFS
3564 if test -x $as_dir/gcc; then
3565 if test -z "${found_gcc}"; then
3566 found_gcc=$as_dir/gcc
3567 fi
3568 fi
3569 if test -x $as_dir/clang; then
3570 if test -z "${found_clang}"; then
3571 found_clang=$as_dir/clang
3572 fi
3573 fi
3574 done
3575 IFS=$as_save_IFS
3576
3577 if test -n "$found_gcc" -a -n "$found_clang"
3578 then
3579 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3580 then
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3582$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3583 CC="$found_clang"
3584 CXX="$found_clang++"
3585 fi
3586
3587
3588 elif test -z "$found_gcc" -a -n "$found_clang"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3591$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3592 CC="$found_clang"
3593 CXX="$found_clang++"
3594
3595 elif test -z "$found_gcc" -a -z "$found_clang"
3596 then
3597 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3598 if test -n "${found_clang}"
3599 then
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3601$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3602 CC="${found_clang}"
3603 CXX="`/usr/bin/xcrun -find clang++`"
3604
3605 # else: use default behaviour
3606 fi
3607 fi
3608 fi
3609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615if test -n "$ac_tool_prefix"; then
3616 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3617set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3619$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003620if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003622else
3623 if test -n "$CC"; then
3624 ac_cv_prog_CC="$CC" # Let the user override the test.
3625else
Martin v. Löwis11437992002-04-12 09:54:03 +00003626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3627for as_dir in $PATH
3628do
3629 IFS=$as_save_IFS
3630 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 $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 +00003635 break 2
3636 fi
3637done
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003640
Jack Jansendd19cf82001-12-06 22:36:17 +00003641fi
3642fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003643CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003644if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3646$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003647else
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3649$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654if test -z "$ac_cv_prog_CC"; then
3655 ac_ct_CC=$CC
3656 # Extract the first word of "gcc", so it can be a program name with args.
3657set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003660if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
3663 if test -n "$ac_ct_CC"; then
3664 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3665else
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 $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 +00003675 break 2
3676 fi
3677done
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
3681fi
3682fi
3683ac_ct_CC=$ac_cv_prog_ac_ct_CC
3684if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3686$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687else
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3689$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692 if test "x$ac_ct_CC" = x; then
3693 CC=""
3694 else
3695 case $cross_compiling:$ac_tool_warned in
3696yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699ac_tool_warned=yes ;;
3700esac
3701 CC=$ac_ct_CC
3702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003703else
3704 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003705fi
3706
Jack Jansendd19cf82001-12-06 22:36:17 +00003707if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708 if test -n "$ac_tool_prefix"; then
3709 # 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 +00003710set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003713if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $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 +00003728 break 2
3729 fi
3730done
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
3734fi
3735fi
3736CC=$ac_cv_prog_CC
3737if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3739$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
3744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
3748if test -z "$CC"; then
3749 # Extract the first word of "cc", so it can be a program name with args.
3750set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003753if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003755else
3756 if test -n "$CC"; then
3757 ac_cv_prog_CC="$CC" # Let the user override the test.
3758else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3761for as_dir in $PATH
3762do
3763 IFS=$as_save_IFS
3764 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3768 ac_prog_rejected=yes
3769 continue
3770 fi
3771 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $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 +00003773 break 2
3774 fi
3775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779if test $ac_prog_rejected = yes; then
3780 # We found a bogon in the path, so make sure we never use it.
3781 set dummy $ac_cv_prog_CC
3782 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784 # We chose a different compiler from the bogus one.
3785 # However, it has the same basename, so the bogon will be chosen
3786 # first if we set CC to just the basename; use the full file name.
3787 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003788 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003789 fi
3790fi
3791fi
3792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3796$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803fi
3804if test -z "$CC"; then
3805 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 do
3808 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3809set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003812if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
Martin v. Löwis11437992002-04-12 09:54:03 +00003818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3819for as_dir in $PATH
3820do
3821 IFS=$as_save_IFS
3822 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 $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 +00003827 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003828 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003829done
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003832
3833fi
3834fi
3835CC=$ac_cv_prog_CC
3836if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3838$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003839else
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3841$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003842fi
3843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 test -n "$CC" && break
3846 done
3847fi
3848if test -z "$CC"; then
3849 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003851do
3852 # Extract the first word of "$ac_prog", so it can be a program name with args.
3853set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3855$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003856if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003858else
3859 if test -n "$ac_ct_CC"; then
3860 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3861else
3862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3863for as_dir in $PATH
3864do
3865 IFS=$as_save_IFS
3866 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 $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 +00003871 break 2
3872 fi
3873done
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
3878fi
3879ac_ct_CC=$ac_cv_prog_ac_ct_CC
3880if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3882$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883else
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3885$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 test -n "$ac_ct_CC" && break
3890done
Michael W. Hudson54241132001-12-07 15:38:26 +00003891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892 if test "x$ac_ct_CC" = x; then
3893 CC=""
3894 else
3895 case $cross_compiling:$ac_tool_warned in
3896yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899ac_tool_warned=yes ;;
3900esac
3901 CC=$ac_ct_CC
3902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903fi
3904
3905fi
3906
3907
Matthias Kloseb9621712010-04-24 17:59:49 +00003908test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003910as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003911See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003912
3913# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003914$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3915set X $ac_compile
3916ac_compiler=$2
3917for ac_option in --version -v -V -qversion; do
3918 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919case "(($ac_try" in
3920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921 *) ac_try_echo=$ac_try;;
3922esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3924$as_echo "$ac_try_echo"; } >&5
3925 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 if test -s conftest.err; then
3928 sed '10a\
3929... rest of stderr output deleted ...
3930 10q' conftest.err >conftest.er1
3931 cat conftest.er1 >&5
3932 fi
3933 rm -f conftest.er1 conftest.err
3934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3935 test $ac_status = 0; }
3936done
Martin v. Löwis11437992002-04-12 09:54:03 +00003937
Matthias Kloseb9621712010-04-24 17:59:49 +00003938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003939/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003940
Martin v. Löwis11437992002-04-12 09:54:03 +00003941int
3942main ()
3943{
3944
3945 ;
3946 return 0;
3947}
3948_ACEOF
3949ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003950ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003951# Try to create an executable without -o first, disregard a.out.
3952# It will help us diagnose broken compilers, and finding out an intuition
3953# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3955$as_echo_n "checking whether the C compiler works... " >&6; }
3956ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3957
3958# The possible output files:
3959ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961ac_rmfiles=
3962for ac_file in $ac_files
3963do
3964 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3967 esac
3968done
3969rm -f $ac_rmfiles
3970
Matthias Kloseb9621712010-04-24 17:59:49 +00003971if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972case "(($ac_try" in
3973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3974 *) ac_try_echo=$ac_try;;
3975esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3977$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3981 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3983# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3984# in a Makefile. We should not override ac_cv_exeext if it was cached,
3985# so that the user can short-circuit this test for compilers unknown to
3986# Autoconf.
3987for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003988do
3989 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992 ;;
3993 [ab].out )
3994 # We found the default executable, but exeext='' is most
3995 # certainly right.
3996 break;;
3997 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003998 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 then :; else
4000 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4001 fi
4002 # We set ac_cv_exeext here because the later test for it is not
4003 # safe: cross compilers may not add the suffix if given an `-o'
4004 # argument, so we may need to know it at that point already.
4005 # Even if this section looks crufty: it has the advantage of
4006 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007 break;;
4008 * )
4009 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004010 esac
4011done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012test "$ac_cv_exeext" = no && ac_cv_exeext=
4013
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004014else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015 ac_file=''
4016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004017if test -z "$ac_file"; then :
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4019$as_echo "no" >&6; }
4020$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004021sed 's/^/| /' conftest.$ac_ext >&5
4022
Matthias Kloseb9621712010-04-24 17:59:49 +00004023{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004025as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004026See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004027else
4028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4029$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4032$as_echo_n "checking for C compiler default output file name... " >&6; }
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4034$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036
Matthias Kloseb9621712010-04-24 17:59:49 +00004037rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4040$as_echo_n "checking for suffix of executables... " >&6; }
4041if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004048 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4051 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004052 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4053# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4054# work properly (i.e., refer to `conftest.exe'), while it won't with
4055# `rm'.
4056for ac_file in conftest.exe conftest conftest.*; do
4057 test -f "$ac_file" || continue
4058 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004060 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4061 break;;
4062 * ) break;;
4063 esac
4064done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065else
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004068as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004069See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004071rm -f conftest conftest$ac_cv_exeext
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4073$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004074
4075rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004076EXEEXT=$ac_cv_exeext
4077ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4079/* end confdefs.h. */
4080#include <stdio.h>
4081int
4082main ()
4083{
4084FILE *f = fopen ("conftest.out", "w");
4085 return ferror (f) || fclose (f) != 0;
4086
4087 ;
4088 return 0;
4089}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004091ac_clean_files="$ac_clean_files conftest.out"
4092# Check that the compiler produces executables we can run. If not, either
4093# the compiler is broken, or we cross compile.
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4095$as_echo_n "checking whether we are cross compiling... " >&6; }
4096if test "$cross_compiling" != yes; then
4097 { { ac_try="$ac_link"
4098case "(($ac_try" in
4099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4100 *) ac_try_echo=$ac_try;;
4101esac
4102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4103$as_echo "$ac_try_echo"; } >&5
4104 (eval "$ac_link") 2>&5
4105 ac_status=$?
4106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4107 test $ac_status = 0; }
4108 if { ac_try='./conftest$ac_cv_exeext'
4109 { { case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
4113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4114$as_echo "$ac_try_echo"; } >&5
4115 (eval "$ac_try") 2>&5
4116 ac_status=$?
4117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4118 test $ac_status = 0; }; }; then
4119 cross_compiling=no
4120 else
4121 if test "$cross_compiling" = maybe; then
4122 cross_compiling=yes
4123 else
4124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004126as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004127If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004128See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 fi
4130 fi
4131fi
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4133$as_echo "$cross_compiling" >&6; }
4134
4135rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4136ac_clean_files=$ac_clean_files_save
4137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4138$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004139if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 $as_echo_n "(cached) " >&6
4141else
4142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004143/* end confdefs.h. */
4144
4145int
4146main ()
4147{
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004154if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155case "(($ac_try" in
4156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4157 *) ac_try_echo=$ac_try;;
4158esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004159eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4160$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004161 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4164 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004165 for ac_file in conftest.o conftest.obj conftest.*; do
4166 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4170 break;;
4171 esac
4172done
4173else
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004175sed 's/^/| /' conftest.$ac_ext >&5
4176
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004179as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004180See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004181fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004182rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4185$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004186OBJEXT=$ac_cv_objext
4187ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4189$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004190if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004192else
Matthias Kloseb9621712010-04-24 17:59:49 +00004193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Martin v. Löwis11437992002-04-12 09:54:03 +00004196int
4197main ()
4198{
4199#ifndef __GNUC__
4200 choke me
4201#endif
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 ac_compiler_gnu=yes
4209else
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004213ac_cv_c_compiler_gnu=$ac_compiler_gnu
4214
4215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4217$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4218if test $ac_compiler_gnu = yes; then
4219 GCC=yes
4220else
4221 GCC=
4222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004223ac_test_CFLAGS=${CFLAGS+set}
4224ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4226$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004227if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004229else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230 ac_save_c_werror_flag=$ac_c_werror_flag
4231 ac_c_werror_flag=yes
4232 ac_cv_prog_cc_g=no
4233 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004236
Martin v. Löwis11437992002-04-12 09:54:03 +00004237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004246 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247else
Matthias Kloseb9621712010-04-24 17:59:49 +00004248 CFLAGS=""
4249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250/* end confdefs.h. */
4251
4252int
4253main ()
4254{
4255
4256 ;
4257 return 0;
4258}
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261
Matthias Kloseb9621712010-04-24 17:59:49 +00004262else
4263 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266/* end confdefs.h. */
4267
4268int
4269main ()
4270{
4271
4272 ;
4273 return 0;
4274}
4275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004276if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4284 ac_c_werror_flag=$ac_save_c_werror_flag
4285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4287$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004289 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290elif test $ac_cv_prog_cc_g = yes; then
4291 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004292 CFLAGS="-g -O2"
4293 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004294 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295 fi
4296else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297 if test "$GCC" = yes; then
4298 CFLAGS="-O2"
4299 else
4300 CFLAGS=
4301 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4304$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004305if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004307else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004309ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004311/* end confdefs.h. */
4312#include <stdarg.h>
4313#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004314struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004315/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4316struct buf { int x; };
4317FILE * (*rcsopen) (struct buf *, struct stat *, int);
4318static char *e (p, i)
4319 char **p;
4320 int i;
4321{
4322 return p[i];
4323}
4324static char *f (char * (*g) (char **, int), char **p, ...)
4325{
4326 char *s;
4327 va_list v;
4328 va_start (v,p);
4329 s = g (p, va_arg (v,int));
4330 va_end (v);
4331 return s;
4332}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004333
4334/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4335 function prototypes and stuff, but not '\xHH' hex character constants.
4336 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004338 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4339 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004341int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4342
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4344 inside strings and character constants. */
4345#define FOO(x) 'x'
4346int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4347
Skip Montanaro6dead952003-09-25 14:50:04 +00004348int test (int i, double x);
4349struct s1 {int (*f) (int a);};
4350struct s2 {int (*f) (double a);};
4351int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4352int argc;
4353char **argv;
4354int
4355main ()
4356{
4357return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4358 ;
4359 return 0;
4360}
4361_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4363 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004364do
4365 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369rm -f core conftest.err conftest.$ac_objext
4370 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004371done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004373CC=$ac_save_CC
4374
4375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376# AC_CACHE_VAL
4377case "x$ac_cv_prog_cc_c89" in
4378 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4380$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4383$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004384 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4387$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004388esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004389if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004390
Matthias Kloseb9621712010-04-24 17:59:49 +00004391fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004392
Martin v. Löwis11437992002-04-12 09:54:03 +00004393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004399ac_ext=c
4400ac_cpp='$CPP $CPPFLAGS'
4401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4403ac_compiler_gnu=$ac_cv_c_compiler_gnu
4404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4405$as_echo_n "checking how to run the C preprocessor... " >&6; }
4406# On Suns, sometimes $CPP names a directory.
4407if test -n "$CPP" && test -d "$CPP"; then
4408 CPP=
4409fi
4410if test -z "$CPP"; then
4411 if ${ac_cv_prog_CPP+:} false; then :
4412 $as_echo_n "(cached) " >&6
4413else
4414 # Double quotes because CPP needs to be expanded
4415 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4416 do
4417 ac_preproc_ok=false
4418for ac_c_preproc_warn_flag in '' yes
4419do
4420 # Use a header file that comes with gcc, so configuring glibc
4421 # with a fresh cross-compiler works.
4422 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4423 # <limits.h> exists even on freestanding compilers.
4424 # On the NeXT, cc -E runs the code through the compiler's parser,
4425 # not just through cpp. "Syntax error" is here to catch this case.
4426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4427/* end confdefs.h. */
4428#ifdef __STDC__
4429# include <limits.h>
4430#else
4431# include <assert.h>
4432#endif
4433 Syntax error
4434_ACEOF
4435if ac_fn_c_try_cpp "$LINENO"; then :
4436
4437else
4438 # Broken: fails on valid input.
4439continue
4440fi
4441rm -f conftest.err conftest.i conftest.$ac_ext
4442
4443 # OK, works on sane cases. Now check whether nonexistent headers
4444 # can be detected and how.
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4446/* end confdefs.h. */
4447#include <ac_nonexistent.h>
4448_ACEOF
4449if ac_fn_c_try_cpp "$LINENO"; then :
4450 # Broken: success on invalid input.
4451continue
4452else
4453 # Passes both tests.
4454ac_preproc_ok=:
4455break
4456fi
4457rm -f conftest.err conftest.i conftest.$ac_ext
4458
4459done
4460# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4461rm -f conftest.i conftest.err conftest.$ac_ext
4462if $ac_preproc_ok; then :
4463 break
4464fi
4465
4466 done
4467 ac_cv_prog_CPP=$CPP
4468
4469fi
4470 CPP=$ac_cv_prog_CPP
4471else
4472 ac_cv_prog_CPP=$CPP
4473fi
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4475$as_echo "$CPP" >&6; }
4476ac_preproc_ok=false
4477for ac_c_preproc_warn_flag in '' yes
4478do
4479 # Use a header file that comes with gcc, so configuring glibc
4480 # with a fresh cross-compiler works.
4481 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4482 # <limits.h> exists even on freestanding compilers.
4483 # On the NeXT, cc -E runs the code through the compiler's parser,
4484 # not just through cpp. "Syntax error" is here to catch this case.
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#ifdef __STDC__
4488# include <limits.h>
4489#else
4490# include <assert.h>
4491#endif
4492 Syntax error
4493_ACEOF
4494if ac_fn_c_try_cpp "$LINENO"; then :
4495
4496else
4497 # Broken: fails on valid input.
4498continue
4499fi
4500rm -f conftest.err conftest.i conftest.$ac_ext
4501
4502 # OK, works on sane cases. Now check whether nonexistent headers
4503 # can be detected and how.
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505/* end confdefs.h. */
4506#include <ac_nonexistent.h>
4507_ACEOF
4508if ac_fn_c_try_cpp "$LINENO"; then :
4509 # Broken: success on invalid input.
4510continue
4511else
4512 # Passes both tests.
4513ac_preproc_ok=:
4514break
4515fi
4516rm -f conftest.err conftest.i conftest.$ac_ext
4517
4518done
4519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4520rm -f conftest.i conftest.err conftest.$ac_ext
4521if $ac_preproc_ok; then :
4522
4523else
4524 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4526as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4527See \`config.log' for more details" "$LINENO" 5; }
4528fi
4529
4530ac_ext=c
4531ac_cpp='$CPP $CPPFLAGS'
4532ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4533ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4534ac_compiler_gnu=$ac_cv_c_compiler_gnu
4535
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4537$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4538if ${ac_cv_path_GREP+:} false; then :
4539 $as_echo_n "(cached) " >&6
4540else
4541 if test -z "$GREP"; then
4542 ac_path_GREP_found=false
4543 # Loop through the user's path and test for each of PROGNAME-LIST
4544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4545for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4546do
4547 IFS=$as_save_IFS
4548 test -z "$as_dir" && as_dir=.
4549 for ac_prog in grep ggrep; do
4550 for ac_exec_ext in '' $ac_executable_extensions; do
4551 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4552 as_fn_executable_p "$ac_path_GREP" || continue
4553# Check for GNU ac_path_GREP and select it if it is found.
4554 # Check for GNU $ac_path_GREP
4555case `"$ac_path_GREP" --version 2>&1` in
4556*GNU*)
4557 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4558*)
4559 ac_count=0
4560 $as_echo_n 0123456789 >"conftest.in"
4561 while :
4562 do
4563 cat "conftest.in" "conftest.in" >"conftest.tmp"
4564 mv "conftest.tmp" "conftest.in"
4565 cp "conftest.in" "conftest.nl"
4566 $as_echo 'GREP' >> "conftest.nl"
4567 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4568 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4569 as_fn_arith $ac_count + 1 && ac_count=$as_val
4570 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4571 # Best one so far, save it but keep looking for a better one
4572 ac_cv_path_GREP="$ac_path_GREP"
4573 ac_path_GREP_max=$ac_count
4574 fi
4575 # 10*(2^10) chars as input seems more than enough
4576 test $ac_count -gt 10 && break
4577 done
4578 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4579esac
4580
4581 $ac_path_GREP_found && break 3
4582 done
4583 done
4584 done
4585IFS=$as_save_IFS
4586 if test -z "$ac_cv_path_GREP"; then
4587 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4588 fi
4589else
4590 ac_cv_path_GREP=$GREP
4591fi
4592
4593fi
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4595$as_echo "$ac_cv_path_GREP" >&6; }
4596 GREP="$ac_cv_path_GREP"
4597
4598
Łukasz Langaa785c872016-09-09 17:37:37 -07004599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4600$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4601if ${ac_cv_path_SED+:} false; then :
4602 $as_echo_n "(cached) " >&6
4603else
4604 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4605 for ac_i in 1 2 3 4 5 6 7; do
4606 ac_script="$ac_script$as_nl$ac_script"
4607 done
4608 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4609 { ac_script=; unset ac_script;}
4610 if test -z "$SED"; then
4611 ac_path_SED_found=false
4612 # Loop through the user's path and test for each of PROGNAME-LIST
4613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4614for as_dir in $PATH
4615do
4616 IFS=$as_save_IFS
4617 test -z "$as_dir" && as_dir=.
4618 for ac_prog in sed gsed; do
4619 for ac_exec_ext in '' $ac_executable_extensions; do
4620 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4621 as_fn_executable_p "$ac_path_SED" || continue
4622# Check for GNU ac_path_SED and select it if it is found.
4623 # Check for GNU $ac_path_SED
4624case `"$ac_path_SED" --version 2>&1` in
4625*GNU*)
4626 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4627*)
4628 ac_count=0
4629 $as_echo_n 0123456789 >"conftest.in"
4630 while :
4631 do
4632 cat "conftest.in" "conftest.in" >"conftest.tmp"
4633 mv "conftest.tmp" "conftest.in"
4634 cp "conftest.in" "conftest.nl"
4635 $as_echo '' >> "conftest.nl"
4636 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4637 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4638 as_fn_arith $ac_count + 1 && ac_count=$as_val
4639 if test $ac_count -gt ${ac_path_SED_max-0}; then
4640 # Best one so far, save it but keep looking for a better one
4641 ac_cv_path_SED="$ac_path_SED"
4642 ac_path_SED_max=$ac_count
4643 fi
4644 # 10*(2^10) chars as input seems more than enough
4645 test $ac_count -gt 10 && break
4646 done
4647 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4648esac
4649
4650 $ac_path_SED_found && break 3
4651 done
4652 done
4653 done
4654IFS=$as_save_IFS
4655 if test -z "$ac_cv_path_SED"; then
4656 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4657 fi
4658else
4659 ac_cv_path_SED=$SED
4660fi
4661
4662fi
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4664$as_echo "$ac_cv_path_SED" >&6; }
4665 SED="$ac_cv_path_SED"
4666 rm -f conftest.sed
4667
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004668
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004669
4670
Matthias Kloseb9621712010-04-24 17:59:49 +00004671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4672$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004674# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004675if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004676 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004677
4678 case $withval in
4679 no) with_cxx_main=no
4680 MAINCC='$(CC)';;
4681 yes) with_cxx_main=yes
4682 MAINCC='$(CXX)';;
4683 *) with_cxx_main=yes
4684 MAINCC=$withval
4685 if test -z "$CXX"
4686 then
4687 CXX=$withval
4688 fi;;
4689 esac
4690else
4691
4692 with_cxx_main=no
4693 MAINCC='$(CC)'
4694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004695fi
4696
Matthias Kloseb9621712010-04-24 17:59:49 +00004697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4698$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004699
4700preset_cxx="$CXX"
4701if test -z "$CXX"
4702then
4703 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004704 gcc) if test -n "$ac_tool_prefix"; then
4705 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4706set dummy ${ac_tool_prefix}g++; ac_word=$2
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
4709if ${ac_cv_path_CXX+:} false; then :
4710 $as_echo_n "(cached) " >&6
4711else
4712 case $CXX in
4713 [\\/]* | ?:[\\/]*)
4714 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4715 ;;
4716 *)
4717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718for as_dir in notfound
4719do
4720 IFS=$as_save_IFS
4721 test -z "$as_dir" && as_dir=.
4722 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004724 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726 break 2
4727 fi
4728done
4729 done
4730IFS=$as_save_IFS
4731
4732 ;;
4733esac
4734fi
4735CXX=$ac_cv_path_CXX
4736if test -n "$CXX"; then
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4738$as_echo "$CXX" >&6; }
4739else
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744
4745fi
4746if test -z "$ac_cv_path_CXX"; then
4747 ac_pt_CXX=$CXX
4748 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004752if ${ac_cv_path_ac_pt_CXX+:} false; then :
4753 $as_echo_n "(cached) " >&6
4754else
4755 case $ac_pt_CXX in
4756 [\\/]* | ?:[\\/]*)
4757 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4758 ;;
4759 *)
4760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in notfound
4762do
4763 IFS=$as_save_IFS
4764 test -z "$as_dir" && as_dir=.
4765 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769 break 2
4770 fi
4771done
4772 done
4773IFS=$as_save_IFS
4774
4775 ;;
4776esac
4777fi
4778ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4779if test -n "$ac_pt_CXX"; then
4780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4781$as_echo "$ac_pt_CXX" >&6; }
4782else
4783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
4785fi
4786
4787 if test "x$ac_pt_CXX" = x; then
4788 CXX="g++"
4789 else
4790 case $cross_compiling:$ac_tool_warned in
4791yes:)
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4793$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4794ac_tool_warned=yes ;;
4795esac
4796 CXX=$ac_pt_CXX
4797 fi
4798else
4799 CXX="$ac_cv_path_CXX"
4800fi
4801 ;;
4802 cc) if test -n "$ac_tool_prefix"; then
4803 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4804set dummy ${ac_tool_prefix}c++; ac_word=$2
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004807if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004808 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809else
4810 case $CXX in
4811 [\\/]* | ?:[\\/]*)
4812 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4813 ;;
4814 *)
4815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4816for as_dir in notfound
4817do
4818 IFS=$as_save_IFS
4819 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004823 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 break 2
4825 fi
4826done
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004828IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 ;;
4831esac
4832fi
4833CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004834if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4836$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004837else
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4839$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004841
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004842
4843fi
4844if test -z "$ac_cv_path_CXX"; then
4845 ac_pt_CXX=$CXX
4846 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004850if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004851 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004853 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855 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 +00004856 ;;
4857 *)
4858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859for as_dir in notfound
4860do
4861 IFS=$as_save_IFS
4862 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004865 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004867 break 2
4868 fi
4869done
Matthias Kloseb9621712010-04-24 17:59:49 +00004870 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004871IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004872
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004873 ;;
4874esac
4875fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4877if test -n "$ac_pt_CXX"; then
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4879$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004880else
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004884
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004885 if test "x$ac_pt_CXX" = x; then
4886 CXX="c++"
4887 else
4888 case $cross_compiling:$ac_tool_warned in
4889yes:)
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4892ac_tool_warned=yes ;;
4893esac
4894 CXX=$ac_pt_CXX
4895 fi
4896else
4897 CXX="$ac_cv_path_CXX"
4898fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004899 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004900 clang|*/clang) if test -n "$ac_tool_prefix"; then
4901 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4902set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904$as_echo_n "checking for $ac_word... " >&6; }
4905if ${ac_cv_path_CXX+:} false; then :
4906 $as_echo_n "(cached) " >&6
4907else
4908 case $CXX in
4909 [\\/]* | ?:[\\/]*)
4910 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4911 ;;
4912 *)
4913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in notfound
4915do
4916 IFS=$as_save_IFS
4917 test -z "$as_dir" && as_dir=.
4918 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004920 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922 break 2
4923 fi
4924done
4925 done
4926IFS=$as_save_IFS
4927
Ned Deilycbfb9a52012-06-23 16:02:19 -07004928 ;;
4929esac
4930fi
4931CXX=$ac_cv_path_CXX
4932if test -n "$CXX"; then
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4934$as_echo "$CXX" >&6; }
4935else
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937$as_echo "no" >&6; }
4938fi
4939
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004940
4941fi
4942if test -z "$ac_cv_path_CXX"; then
4943 ac_pt_CXX=$CXX
4944 # Extract the first word of "clang++", so it can be a program name with args.
4945set dummy clang++; ac_word=$2
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947$as_echo_n "checking for $ac_word... " >&6; }
4948if ${ac_cv_path_ac_pt_CXX+:} false; then :
4949 $as_echo_n "(cached) " >&6
4950else
4951 case $ac_pt_CXX in
4952 [\\/]* | ?:[\\/]*)
4953 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4954 ;;
4955 *)
4956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4957for as_dir in notfound
4958do
4959 IFS=$as_save_IFS
4960 test -z "$as_dir" && as_dir=.
4961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004963 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4965 break 2
4966 fi
4967done
4968 done
4969IFS=$as_save_IFS
4970
4971 ;;
4972esac
4973fi
4974ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4975if test -n "$ac_pt_CXX"; then
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4977$as_echo "$ac_pt_CXX" >&6; }
4978else
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4980$as_echo "no" >&6; }
4981fi
4982
4983 if test "x$ac_pt_CXX" = x; then
4984 CXX="clang++"
4985 else
4986 case $cross_compiling:$ac_tool_warned in
4987yes:)
4988{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4989$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4990ac_tool_warned=yes ;;
4991esac
4992 CXX=$ac_pt_CXX
4993 fi
4994else
4995 CXX="$ac_cv_path_CXX"
4996fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004997 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004998 icc|*/icc) if test -n "$ac_tool_prefix"; then
4999 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5000set dummy ${ac_tool_prefix}icpc; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if ${ac_cv_path_CXX+:} false; then :
5004 $as_echo_n "(cached) " >&6
5005else
5006 case $CXX in
5007 [\\/]* | ?:[\\/]*)
5008 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5009 ;;
5010 *)
5011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in notfound
5013do
5014 IFS=$as_save_IFS
5015 test -z "$as_dir" && as_dir=.
5016 for ac_exec_ext in '' $ac_executable_extensions; do
5017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5018 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020 break 2
5021 fi
5022done
5023 done
5024IFS=$as_save_IFS
5025
5026 ;;
5027esac
5028fi
5029CXX=$ac_cv_path_CXX
5030if test -n "$CXX"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5032$as_echo "$CXX" >&6; }
5033else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039fi
5040if test -z "$ac_cv_path_CXX"; then
5041 ac_pt_CXX=$CXX
5042 # Extract the first word of "icpc", so it can be a program name with args.
5043set dummy icpc; ac_word=$2
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045$as_echo_n "checking for $ac_word... " >&6; }
5046if ${ac_cv_path_ac_pt_CXX+:} false; then :
5047 $as_echo_n "(cached) " >&6
5048else
5049 case $ac_pt_CXX in
5050 [\\/]* | ?:[\\/]*)
5051 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5052 ;;
5053 *)
5054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055for as_dir in notfound
5056do
5057 IFS=$as_save_IFS
5058 test -z "$as_dir" && as_dir=.
5059 for ac_exec_ext in '' $ac_executable_extensions; do
5060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5061 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063 break 2
5064 fi
5065done
5066 done
5067IFS=$as_save_IFS
5068
5069 ;;
5070esac
5071fi
5072ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5073if test -n "$ac_pt_CXX"; then
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5075$as_echo "$ac_pt_CXX" >&6; }
5076else
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078$as_echo "no" >&6; }
5079fi
5080
5081 if test "x$ac_pt_CXX" = x; then
5082 CXX="icpc"
5083 else
5084 case $cross_compiling:$ac_tool_warned in
5085yes:)
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5087$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5088ac_tool_warned=yes ;;
5089esac
5090 CXX=$ac_pt_CXX
5091 fi
5092else
5093 CXX="$ac_cv_path_CXX"
5094fi
5095 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096 esac
5097 if test "$CXX" = "notfound"
5098 then
5099 CXX=""
5100 fi
5101fi
5102if test -z "$CXX"
5103then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 if test -n "$ac_tool_prefix"; then
5105 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5106 do
5107 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5108set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005111if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113else
5114 if test -n "$CXX"; then
5115 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5116else
5117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005123 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005124 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005126 break 2
5127 fi
5128done
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005130IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131
5132fi
5133fi
5134CXX=$ac_cv_prog_CXX
5135if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5137$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005141fi
5142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005144 test -n "$CXX" && break
5145 done
5146fi
5147if test -z "$CXX"; then
5148 ac_ct_CXX=$CXX
5149 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5150do
5151 # Extract the first word of "$ac_prog", so it can be a program name with args.
5152set dummy $ac_prog; ac_word=$2
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5154$as_echo_n "checking for $ac_word... " >&6; }
5155if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5156 $as_echo_n "(cached) " >&6
5157else
5158 if test -n "$ac_ct_CXX"; then
5159 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5160else
5161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5162for as_dir in $PATH
5163do
5164 IFS=$as_save_IFS
5165 test -z "$as_dir" && as_dir=.
5166 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005167 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005168 ac_cv_prog_ac_ct_CXX="$ac_prog"
5169 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5170 break 2
5171 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005173 done
5174IFS=$as_save_IFS
5175
5176fi
5177fi
5178ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5179if test -n "$ac_ct_CXX"; then
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5181$as_echo "$ac_ct_CXX" >&6; }
5182else
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5184$as_echo "no" >&6; }
5185fi
5186
5187
5188 test -n "$ac_ct_CXX" && break
5189done
5190
5191 if test "x$ac_ct_CXX" = x; then
5192 CXX="notfound"
5193 else
5194 case $cross_compiling:$ac_tool_warned in
5195yes:)
5196{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5197$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5198ac_tool_warned=yes ;;
5199esac
5200 CXX=$ac_ct_CXX
5201 fi
5202fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005203
5204 if test "$CXX" = "notfound"
5205 then
5206 CXX=""
5207 fi
5208fi
5209if test "$preset_cxx" != "$CXX"
5210then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005211 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005212
5213 By default, distutils will build C++ extension modules with \"$CXX\".
5214 If this is not intended, then set CXX on the configure command line.
5215 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005216$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005217
5218 By default, distutils will build C++ extension modules with \"$CXX\".
5219 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005220 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005221fi
5222
5223
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005224MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5225
5226
5227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5228$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5229cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef bfin
5231#undef cris
5232#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005233#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005234#undef hppa
5235#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005236#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005237#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005238#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005239#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005240#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005241#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005242 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005243#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005244# if defined(__x86_64__) && defined(__LP64__)
5245 x86_64-linux-gnu
5246# elif defined(__x86_64__) && defined(__ILP32__)
5247 x86_64-linux-gnux32
5248# elif defined(__i386__)
5249 i386-linux-gnu
5250# elif defined(__aarch64__) && defined(__AARCH64EL__)
5251# if defined(__ILP32__)
5252 aarch64_ilp32-linux-gnu
5253# else
5254 aarch64-linux-gnu
5255# endif
5256# elif defined(__aarch64__) && defined(__AARCH64EB__)
5257# if defined(__ILP32__)
5258 aarch64_be_ilp32-linux-gnu
5259# else
5260 aarch64_be-linux-gnu
5261# endif
5262# elif defined(__alpha__)
5263 alpha-linux-gnu
5264# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5265# if defined(__ARMEL__)
5266 arm-linux-gnueabihf
5267# else
5268 armeb-linux-gnueabihf
5269# endif
5270# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5271# if defined(__ARMEL__)
5272 arm-linux-gnueabi
5273# else
5274 armeb-linux-gnueabi
5275# endif
5276# elif defined(__hppa__)
5277 hppa-linux-gnu
5278# elif defined(__ia64__)
5279 ia64-linux-gnu
5280# elif defined(__m68k__) && !defined(__mcoldfire__)
5281 m68k-linux-gnu
5282# elif defined(__mips_hard_float) && defined(_MIPSEL)
5283# if _MIPS_SIM == _ABIO32
5284 mipsel-linux-gnu
5285# elif _MIPS_SIM == _ABIN32
5286 mips64el-linux-gnuabin32
5287# elif _MIPS_SIM == _ABI64
5288 mips64el-linux-gnuabi64
5289# else
5290# error unknown platform triplet
5291# endif
5292# elif defined(__mips_hard_float)
5293# if _MIPS_SIM == _ABIO32
5294 mips-linux-gnu
5295# elif _MIPS_SIM == _ABIN32
5296 mips64-linux-gnuabin32
5297# elif _MIPS_SIM == _ABI64
5298 mips64-linux-gnuabi64
5299# else
5300# error unknown platform triplet
5301# endif
5302# elif defined(__or1k__)
5303 or1k-linux-gnu
5304# elif defined(__powerpc__) && defined(__SPE__)
5305 powerpc-linux-gnuspe
5306# elif defined(__powerpc64__)
5307# if defined(__LITTLE_ENDIAN__)
5308 powerpc64le-linux-gnu
5309# else
5310 powerpc64-linux-gnu
5311# endif
5312# elif defined(__powerpc__)
5313 powerpc-linux-gnu
5314# elif defined(__s390x__)
5315 s390x-linux-gnu
5316# elif defined(__s390__)
5317 s390-linux-gnu
5318# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5319 sh4-linux-gnu
5320# elif defined(__sparc__) && defined(__arch64__)
5321 sparc64-linux-gnu
5322# elif defined(__sparc__)
5323 sparc-linux-gnu
5324# else
5325# error unknown platform triplet
5326# endif
5327#elif defined(__FreeBSD_kernel__)
5328# if defined(__LP64__)
5329 x86_64-kfreebsd-gnu
5330# elif defined(__i386__)
5331 i386-kfreebsd-gnu
5332# else
5333# error unknown platform triplet
5334# endif
5335#elif defined(__gnu_hurd__)
5336 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005337#elif defined(__APPLE__)
5338 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005339#else
5340# error unknown platform triplet
5341#endif
5342
5343EOF
5344
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005345if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005346 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5348$as_echo "$PLATFORM_TRIPLET" >&6; }
5349else
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5351$as_echo "none" >&6; }
5352fi
5353rm -f conftest.c conftest.out
5354
5355if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5356 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5357 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5358 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005359elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5360 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005361fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005362
doko@ubuntu.com55532312016-06-14 08:55:19 +02005363if test x$MULTIARCH != x; then
5364 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5365fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005366
5367
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5369$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5370save_LDFLAGS="$LDFLAGS"
5371LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005372
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374/* end confdefs.h. */
5375
5376int
5377main ()
5378{
5379
5380 ;
5381 return 0;
5382}
5383_ACEOF
5384if ac_fn_c_try_link "$LINENO"; then :
5385 NO_AS_NEEDED="-Wl,--no-as-needed"
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5387$as_echo "yes" >&6; }
5388else
5389 NO_AS_NEEDED=""
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391$as_echo "no" >&6; }
5392fi
5393rm -f core conftest.err conftest.$ac_objext \
5394 conftest$ac_exeext conftest.$ac_ext
5395LDFLAGS="$save_LDFLAGS"
5396
5397
5398
5399# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400
Matthias Kloseb9621712010-04-24 17:59:49 +00005401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5402$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005403if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405else
5406 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5407 then ac_cv_path_EGREP="$GREP -E"
5408 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 # Loop through the user's path and test for each of PROGNAME-LIST
5412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5414do
5415 IFS=$as_save_IFS
5416 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 for ac_prog in egrep; do
5418 for ac_exec_ext in '' $ac_executable_extensions; do
5419 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005420 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005421# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 # Check for GNU $ac_path_EGREP
5423case `"$ac_path_EGREP" --version 2>&1` in
5424*GNU*)
5425 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5426*)
5427 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 while :
5430 do
5431 cat "conftest.in" "conftest.in" >"conftest.tmp"
5432 mv "conftest.tmp" "conftest.in"
5433 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5436 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5439 # Best one so far, save it but keep looking for a better one
5440 ac_cv_path_EGREP="$ac_path_EGREP"
5441 ac_path_EGREP_max=$ac_count
5442 fi
5443 # 10*(2^10) chars as input seems more than enough
5444 test $ac_count -gt 10 && break
5445 done
5446 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5447esac
5448
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 $ac_path_EGREP_found && break 3
5450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005455 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 +00005456 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457else
5458 ac_cv_path_EGREP=$EGREP
5459fi
5460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461 fi
5462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5464$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005466
5467
Matthias Kloseb9621712010-04-24 17:59:49 +00005468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5469$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005470if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005471 $as_echo_n "(cached) " >&6
5472else
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005474/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005475#include <stdlib.h>
5476#include <stdarg.h>
5477#include <string.h>
5478#include <float.h>
5479
5480int
5481main ()
5482{
5483
5484 ;
5485 return 0;
5486}
5487_ACEOF
5488if ac_fn_c_try_compile "$LINENO"; then :
5489 ac_cv_header_stdc=yes
5490else
5491 ac_cv_header_stdc=no
5492fi
5493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5498/* end confdefs.h. */
5499#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005500
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005501_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505else
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005507fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005508rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509
Matthias Kloseb9621712010-04-24 17:59:49 +00005510fi
5511
5512if test $ac_cv_header_stdc = yes; then
5513 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h. */
5516#include <stdlib.h>
5517
5518_ACEOF
5519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5520 $EGREP "free" >/dev/null 2>&1; then :
5521
5522else
5523 ac_cv_header_stdc=no
5524fi
5525rm -f conftest*
5526
5527fi
5528
5529if test $ac_cv_header_stdc = yes; then
5530 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5531 if test "$cross_compiling" = yes; then :
5532 :
5533else
5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5535/* end confdefs.h. */
5536#include <ctype.h>
5537#include <stdlib.h>
5538#if ((' ' & 0x0FF) == 0x020)
5539# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5540# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5541#else
5542# define ISLOWER(c) \
5543 (('a' <= (c) && (c) <= 'i') \
5544 || ('j' <= (c) && (c) <= 'r') \
5545 || ('s' <= (c) && (c) <= 'z'))
5546# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5547#endif
5548
5549#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5550int
5551main ()
5552{
5553 int i;
5554 for (i = 0; i < 256; i++)
5555 if (XOR (islower (i), ISLOWER (i))
5556 || toupper (i) != TOUPPER (i))
5557 return 2;
5558 return 0;
5559}
5560_ACEOF
5561if ac_fn_c_try_run "$LINENO"; then :
5562
5563else
5564 ac_cv_header_stdc=no
5565fi
5566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5567 conftest.$ac_objext conftest.beam conftest.$ac_ext
5568fi
5569
5570fi
5571fi
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5573$as_echo "$ac_cv_header_stdc" >&6; }
5574if test $ac_cv_header_stdc = yes; then
5575
5576$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5577
5578fi
5579
5580# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5581for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5582 inttypes.h stdint.h unistd.h
5583do :
5584 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5585ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5586"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005587if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 cat >>confdefs.h <<_ACEOF
5589#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5590_ACEOF
5591
5592fi
5593
5594done
5595
5596
5597
5598 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 +02005599if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005600 MINIX=yes
5601else
5602 MINIX=
5603fi
5604
5605
5606 if test "$MINIX" = yes; then
5607
5608$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5609
5610
5611$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5612
5613
5614$as_echo "#define _MINIX 1" >>confdefs.h
5615
5616 fi
5617
5618
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5620$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005621if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005622 $as_echo_n "(cached) " >&6
5623else
5624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5625/* end confdefs.h. */
5626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005627# define __EXTENSIONS__ 1
5628 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005629int
5630main ()
5631{
5632
5633 ;
5634 return 0;
5635}
5636_ACEOF
5637if ac_fn_c_try_compile "$LINENO"; then :
5638 ac_cv_safe_to_define___extensions__=yes
5639else
5640 ac_cv_safe_to_define___extensions__=no
5641fi
5642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5643fi
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5645$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5646 test $ac_cv_safe_to_define___extensions__ = yes &&
5647 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5648
5649 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5650
5651 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5652
5653 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5654
5655 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5656
5657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5660$as_echo_n "checking for the Android API level... " >&6; }
5661cat >> conftest.c <<EOF
5662#ifdef __ANDROID__
5663#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005664android_api = __ANDROID_API__
5665arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005666#else
5667#error not Android
5668#endif
5669EOF
5670
5671if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005672 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5673 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5675$as_echo "$ANDROID_API_LEVEL" >&6; }
5676
5677cat >>confdefs.h <<_ACEOF
5678#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5679_ACEOF
5680
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005681
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5683$as_echo_n "checking for the Android arm ABI... " >&6; }
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5685$as_echo "$_arm_arch" >&6; }
5686 if test "$_arm_arch" = 7; then
5687 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5688 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5689 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005690else
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5692$as_echo "not Android" >&6; }
5693fi
5694rm -f conftest.c conftest.out
5695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696# Check for unsupported systems
5697case $ac_sys_system/$ac_sys_release in
5698atheos*|Linux*/1*)
5699 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5700 echo See README for details.
5701 exit 1;;
5702esac
5703
5704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5706$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005709if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 withval=$with_suffix;
5711 case $withval in
5712 no) EXEEXT=;;
5713 yes) EXEEXT=.exe;;
5714 *) EXEEXT=$withval;;
5715 esac
5716fi
5717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5719$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
5721# Test whether we're running on a non-case-sensitive system, in which
5722# case we give a warning if no ext is given
5723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5725$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726if test ! -d CaseSensitiveTestDir; then
5727mkdir CaseSensitiveTestDir
5728fi
5729
5730if test -d casesensitivetestdir
5731then
Matthias Kloseb9621712010-04-24 17:59:49 +00005732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5733$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734 BUILDEXEEXT=.exe
5735else
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738 BUILDEXEEXT=$EXEEXT
5739fi
5740rmdir CaseSensitiveTestDir
5741
5742case $MACHDEP in
5743bsdos*)
5744 case $CC in
5745 gcc) CC="$CC -D_HAVE_BSDI";;
5746 esac;;
5747esac
5748
5749case $ac_sys_system in
5750hp*|HP*)
5751 case $CC in
5752 cc|*/cc) CC="$CC -Ae";;
5753 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754esac
5755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5758$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759if test -z "$LIBRARY"
5760then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005761 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5764$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766# LDLIBRARY is the name of the library to link against (as opposed to the
5767# name of the library into which to insert object files). BLDLIBRARY is also
5768# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5769# is blank as the main program is not linked directly against LDLIBRARY.
5770# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5771# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5772# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5773# DLLLIBRARY is the shared (i.e., DLL) library.
5774#
5775# RUNSHARED is used to run shared python without installed libraries
5776#
5777# INSTSONAME is the name of the shared library that will be use to install
5778# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005779#
5780# LDVERSION is the shared library version number, normally the Python version
5781# with the ABI build flags appended.
5782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784
5785
5786
5787
5788
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790LDLIBRARY="$LIBRARY"
5791BLDLIBRARY='$(LDLIBRARY)'
5792INSTSONAME='$(LDLIBRARY)'
5793DLLLIBRARY=''
5794LDLIBRARYDIR=''
5795RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005796LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
5798# LINKCC is the command that links the python executable -- default is $(CC).
5799# If CXX is set, and if it is needed to link a main function that was
5800# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5801# python might then depend on the C++ runtime
5802# This is altered for AIX in order to build the export list before
5803# linking.
5804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5806$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807if test -z "$LINKCC"
5808then
5809 LINKCC='$(PURIFY) $(MAINCC)'
5810 case $ac_sys_system in
5811 AIX*)
5812 exp_extra="\"\""
5813 if test $ac_sys_release -ge 5 -o \
5814 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5815 exp_extra="."
5816 fi
5817 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 QNX*)
5819 # qcc must be used because the other compilers do not
5820 # support -N.
5821 LINKCC=qcc;;
5822 esac
5823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5825$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826
5827# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5828# make sure we default having it set to "no": this is used by
5829# distutils.unixccompiler to know if it should add --enable-new-dtags
5830# to linker command lines, and failing to detect GNU ld simply results
5831# in the same bahaviour as before.
5832
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5834$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835ac_prog=ld
5836if test "$GCC" = yes; then
5837 ac_prog=`$CC -print-prog-name=ld`
5838fi
5839case `"$ac_prog" -V 2>&1 < /dev/null` in
5840 *GNU*)
5841 GNULD=yes;;
5842 *)
5843 GNULD=no;;
5844esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5846$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5849$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005851if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852 enableval=$enable_shared;
5853fi
5854
5855
5856if test -z "$enable_shared"
5857then
5858 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005859 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 enable_shared="yes";;
5861 *)
5862 enable_shared="no";;
5863 esac
5864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5866$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
Matthias Kloseb9621712010-04-24 17:59:49 +00005868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5869$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005871if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872 enableval=$enable_profiling;
5873fi
5874
5875if test "x$enable_profiling" = xyes; then
5876 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005877 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879/* end confdefs.h. */
5880int main() { return 0; }
5881_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882if ac_fn_c_try_link "$LINENO"; then :
5883
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005885 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887rm -f core conftest.err conftest.$ac_objext \
5888 conftest$ac_exeext conftest.$ac_ext
5889 CC="$ac_save_cc"
5890else
5891 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5894$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896if test "x$enable_profiling" = xyes; then
5897 BASECFLAGS="-pg $BASECFLAGS"
5898 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899fi
5900
Matthias Kloseb9621712010-04-24 17:59:49 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5902$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903
5904# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5905# library that we build, but we do not want to link against it (we
5906# will find it with a -framework option). For this reason there is an
5907# extra variable BLDLIBRARY against which Python and the extension
5908# modules are linked, BLDLIBRARY. This is normally the same as
5909# LDLIBRARY, but empty for MacOSX framework builds.
5910if test "$enable_framework"
5911then
5912 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005913 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 BLDLIBRARY=''
5915else
5916 BLDLIBRARY='$(LDLIBRARY)'
5917fi
5918
5919# Other platforms follow
5920if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005921 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922
Matthias Kloseb9621712010-04-24 17:59:49 +00005923$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924
5925 case $ac_sys_system in
5926 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).dll.a'
5928 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
5930 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
5932 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005933 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005935 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005936 then
5937 PY3LIBRARY=libpython3.so
5938 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005940 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).so'
5942 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005945 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005946 then
5947 PY3LIBRARY=libpython3.so
5948 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
5950 hp*|HP*)
5951 case `uname -m` in
5952 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
5955 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
5958 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).dylib'
5964 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005967 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005969 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005970 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971
5972 esac
5973else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005974 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 case $ac_sys_system in
5976 CYGWIN*)
5977 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005978 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 ;;
5980 esac
5981fi
5982
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005983if test "$cross_compiling" = yes; then
5984 RUNSHARED=
5985fi
5986
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5988$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989
5990if test -n "$ac_tool_prefix"; then
5991 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5992set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005995if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997else
5998 if test -n "$RANLIB"; then
5999 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6000else
6001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6002for as_dir in $PATH
6003do
6004 IFS=$as_save_IFS
6005 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010 break 2
6011 fi
6012done
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014IFS=$as_save_IFS
6015
6016fi
6017fi
6018RANLIB=$ac_cv_prog_RANLIB
6019if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6021$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022else
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6024$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025fi
6026
6027
6028fi
6029if test -z "$ac_cv_prog_RANLIB"; then
6030 ac_ct_RANLIB=$RANLIB
6031 # Extract the first word of "ranlib", so it can be a program name with args.
6032set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006035if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037else
6038 if test -n "$ac_ct_RANLIB"; then
6039 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6040else
6041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044 IFS=$as_save_IFS
6045 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 break 2
6051 fi
6052done
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054IFS=$as_save_IFS
6055
6056fi
6057fi
6058ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6059if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6061$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062else
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065fi
6066
6067 if test "x$ac_ct_RANLIB" = x; then
6068 RANLIB=":"
6069 else
6070 case $cross_compiling:$ac_tool_warned in
6071yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006072{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6073$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074ac_tool_warned=yes ;;
6075esac
6076 RANLIB=$ac_ct_RANLIB
6077 fi
6078else
6079 RANLIB="$ac_cv_prog_RANLIB"
6080fi
6081
6082
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006083if test -n "$ac_tool_prefix"; then
6084 for ac_prog in ar aal
6085 do
6086 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6087set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6089$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006090if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092else
6093 if test -n "$AR"; then
6094 ac_cv_prog_AR="$AR" # Let the user override the test.
6095else
6096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6097for as_dir in $PATH
6098do
6099 IFS=$as_save_IFS
6100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006103 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105 break 2
6106 fi
6107done
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109IFS=$as_save_IFS
6110
6111fi
6112fi
6113AR=$ac_cv_prog_AR
6114if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6116$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117else
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120fi
6121
6122
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006123 test -n "$AR" && break
6124 done
6125fi
6126if test -z "$AR"; then
6127 ac_ct_AR=$AR
6128 for ac_prog in ar aal
6129do
6130 # Extract the first word of "$ac_prog", so it can be a program name with args.
6131set dummy $ac_prog; ac_word=$2
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6133$as_echo_n "checking for $ac_word... " >&6; }
6134if ${ac_cv_prog_ac_ct_AR+:} false; then :
6135 $as_echo_n "(cached) " >&6
6136else
6137 if test -n "$ac_ct_AR"; then
6138 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6139else
6140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141for as_dir in $PATH
6142do
6143 IFS=$as_save_IFS
6144 test -z "$as_dir" && as_dir=.
6145 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006147 ac_cv_prog_ac_ct_AR="$ac_prog"
6148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149 break 2
6150 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006152 done
6153IFS=$as_save_IFS
6154
6155fi
6156fi
6157ac_ct_AR=$ac_cv_prog_ac_ct_AR
6158if test -n "$ac_ct_AR"; then
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6160$as_echo "$ac_ct_AR" >&6; }
6161else
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163$as_echo "no" >&6; }
6164fi
6165
6166
6167 test -n "$ac_ct_AR" && break
6168done
6169
6170 if test "x$ac_ct_AR" = x; then
6171 AR="ar"
6172 else
6173 case $cross_compiling:$ac_tool_warned in
6174yes:)
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6177ac_tool_warned=yes ;;
6178esac
6179 AR=$ac_ct_AR
6180 fi
6181fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182
6183
6184# tweak ARFLAGS only if the user didn't set it on the command line
6185
6186if test -z "$ARFLAGS"
6187then
6188 ARFLAGS="rc"
6189fi
6190
doko@ubuntu.com58844492012-06-30 18:25:32 +02006191if test -n "$ac_tool_prefix"; then
6192 for ac_prog in readelf
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
6196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197$as_echo_n "checking for $ac_word... " >&6; }
6198if ${ac_cv_prog_READELF+:} false; then :
6199 $as_echo_n "(cached) " >&6
6200else
6201 if test -n "$READELF"; then
6202 ac_cv_prog_READELF="$READELF" # 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=.
6209 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.com58844492012-06-30 18:25:32 +02006211 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6213 break 2
6214 fi
6215done
6216 done
6217IFS=$as_save_IFS
6218
6219fi
6220fi
6221READELF=$ac_cv_prog_READELF
6222if test -n "$READELF"; then
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6224$as_echo "$READELF" >&6; }
6225else
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6227$as_echo "no" >&6; }
6228fi
6229
6230
6231 test -n "$READELF" && break
6232 done
6233fi
6234if test -z "$READELF"; then
6235 ac_ct_READELF=$READELF
6236 for ac_prog in readelf
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_READELF+:} false; then :
6243 $as_echo_n "(cached) " >&6
6244else
6245 if test -n "$ac_ct_READELF"; then
6246 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # 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 Lagerwall1b863eb2012-10-29 17:31:54 +00006254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006255 ac_cv_prog_ac_ct_READELF="$ac_prog"
6256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6257 break 2
6258 fi
6259done
6260 done
6261IFS=$as_save_IFS
6262
6263fi
6264fi
6265ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6266if test -n "$ac_ct_READELF"; then
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6268$as_echo "$ac_ct_READELF" >&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_READELF" && break
6276done
6277
6278 if test "x$ac_ct_READELF" = x; then
6279 READELF=":"
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 READELF=$ac_ct_READELF
6288 fi
6289fi
6290
6291if test "$cross_compiling" = yes; then
6292 case "$READELF" in
6293 readelf|:)
6294 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6295 ;;
6296 esac
6297fi
6298
6299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301case $MACHDEP in
6302bsdos*|hp*|HP*)
6303 # install -d does not work on BSDI or HP-UX
6304 if test -z "$INSTALL"
6305 then
6306 INSTALL="${srcdir}/install-sh -c"
6307 fi
6308esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309# Find a good install program. We prefer a C program (faster),
6310# so one script is as good as another. But avoid the broken or
6311# incompatible versions:
6312# SysV /etc/install, /usr/sbin/install
6313# SunOS /usr/etc/install
6314# IRIX /sbin/install
6315# AIX /bin/install
6316# AmigaOS /C/install, which installs bootblocks on floppy discs
6317# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6318# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6319# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6320# OS/2's system install, which has a completely different semantic
6321# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006322# Reject install programs that cannot install multiple files.
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6324$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006326if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328else
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332 IFS=$as_save_IFS
6333 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 # Account for people who put trailing slashes in PATH elements.
6335case $as_dir/ in #((
6336 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 /usr/ucb/* ) ;;
6340 *)
6341 # OSF1 and SCO ODT 3.0 have their own names for install.
6342 # Don't use installbsd from OSF since it installs stuff as root
6343 # by default.
6344 for ac_prog in ginstall scoinst install; do
6345 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006346 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347 if test $ac_prog = install &&
6348 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6349 # AIX install. It has an incompatible calling convention.
6350 :
6351 elif test $ac_prog = install &&
6352 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6353 # program-specific install script used by HP pwplus--don't use.
6354 :
6355 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006356 rm -rf conftest.one conftest.two conftest.dir
6357 echo one > conftest.one
6358 echo two > conftest.two
6359 mkdir conftest.dir
6360 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6361 test -s conftest.one && test -s conftest.two &&
6362 test -s conftest.dir/conftest.one &&
6363 test -s conftest.dir/conftest.two
6364 then
6365 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6366 break 3
6367 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368 fi
6369 fi
6370 done
6371 done
6372 ;;
6373esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006374
6375 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376IFS=$as_save_IFS
6377
Matthias Kloseb9621712010-04-24 17:59:49 +00006378rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379
6380fi
6381 if test "${ac_cv_path_install+set}" = set; then
6382 INSTALL=$ac_cv_path_install
6383 else
6384 # As a last resort, use the slow shell script. Don't cache a
6385 # value for INSTALL within a source directory, because that will
6386 # break other packages using the cache if that directory is
6387 # removed, or if the value is a relative name.
6388 INSTALL=$ac_install_sh
6389 fi
6390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6392$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393
6394# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6395# It thinks the first close brace ends the variable substitution.
6396test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6397
6398test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6399
6400test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6401
Matthias Klose93a0ef12012-03-15 18:08:34 +01006402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6403$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6404if test -z "$MKDIR_P"; then
6405 if ${ac_cv_path_mkdir+:} false; then :
6406 $as_echo_n "(cached) " >&6
6407else
6408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6409for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6410do
6411 IFS=$as_save_IFS
6412 test -z "$as_dir" && as_dir=.
6413 for ac_prog in mkdir gmkdir; do
6414 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006415 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006416 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6417 'mkdir (GNU coreutils) '* | \
6418 'mkdir (coreutils) '* | \
6419 'mkdir (fileutils) '4.1*)
6420 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6421 break 3;;
6422 esac
6423 done
6424 done
6425 done
6426IFS=$as_save_IFS
6427
6428fi
6429
6430 test -d ./--version && rmdir ./--version
6431 if test "${ac_cv_path_mkdir+set}" = set; then
6432 MKDIR_P="$ac_cv_path_mkdir -p"
6433 else
6434 # As a last resort, use the slow shell script. Don't cache a
6435 # value for MKDIR_P within a source directory, because that will
6436 # break other packages using the cache if that directory is
6437 # removed, or if the value is a relative name.
6438 MKDIR_P="$ac_install_sh -d"
6439 fi
6440fi
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6442$as_echo "$MKDIR_P" >&6; }
6443
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444
6445# Not every filesystem supports hard links
6446
6447if test -z "$LN" ; then
6448 case $ac_sys_system in
6449 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450 *) LN=ln;;
6451 esac
6452fi
6453
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006454# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006455
6456ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006457
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6460$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006461
6462# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006463if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464 withval=$with_pydebug;
6465if test "$withval" != no
6466then
6467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469
Matthias Kloseb9621712010-04-24 17:59:49 +00006470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6471$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006472 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006473 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006474else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476fi
6477else
Matthias Kloseb9621712010-04-24 17:59:49 +00006478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006480fi
6481
6482
T. Woutersddbfa2c2017-05-23 01:30:49 +02006483# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6484# the ABI. This allows enabling assertions without changing the ABI.
6485assertions='false'
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6487$as_echo_n "checking for --with-assertions... " >&6; }
6488
6489# Check whether --with-assertions was given.
6490if test "${with_assertions+set}" = set; then :
6491 withval=$with_assertions;
6492if test "$withval" != no
6493then
6494 assertions='true'
6495fi
6496fi
6497
6498if test "$assertions" = 'true'; then
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6500$as_echo "yes" >&6; }
6501elif test "$Py_DEBUG" = 'true'; then
6502 assertions='true'
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6504$as_echo "implied by --with-pydebug" >&6; }
6505else
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; }
6508fi
6509
Brett Cannon63d98bc2016-09-06 17:12:40 -07006510# Enable optimization flags
6511
6512
6513Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6515$as_echo_n "checking for --enable-optimizations... " >&6; }
6516# Check whether --enable-optimizations was given.
6517if test "${enable_optimizations+set}" = set; then :
6518 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006519if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006520then
6521 Py_OPT='true'
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6523$as_echo "yes" >&6; };
6524else
6525 Py_OPT='false'
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6527$as_echo "no" >&6; };
6528fi
6529else
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006535 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6536 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006537 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006538 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006539 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006540 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006541 DEF_MAKE_RULE="build_all"
6542else
6543 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006544 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006545 DEF_MAKE_RULE="all"
6546fi
6547
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006548# Enable LTO flags
6549
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6551$as_echo_n "checking for --with-lto... " >&6; }
6552
6553# Check whether --with-lto was given.
6554if test "${with_lto+set}" = set; then :
6555 withval=$with_lto;
6556if test "$withval" != no
6557then
6558 Py_LTO='true'
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6560$as_echo "yes" >&6; };
6561else
6562 Py_LTO='false'
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; };
6565fi
6566else
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6568$as_echo "no" >&6; }
6569fi
6570
6571if test "$Py_LTO" = 'true' ; then
6572 case $CC in
6573 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006574 case $ac_sys_system in
6575 Darwin*)
6576 # Any changes made here should be reflected in the GCC+Darwin case below
6577 LTOFLAGS="-flto -Wl,-export_dynamic"
6578 ;;
6579 *)
6580 LTOFLAGS="-flto"
6581 ;;
6582 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006583 ;;
6584 *gcc*)
6585 case $ac_sys_system in
6586 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006587 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006588 ;;
6589 *)
6590 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6591 ;;
6592 esac
6593 ;;
6594 esac
6595fi
6596
Brett Cannon7188a3e2015-09-18 15:13:44 -07006597# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006598
6599
6600
6601
6602
Gregory P. Smith799520c2016-09-07 16:10:00 -07006603# Make this work on systems where llvm tools are not installed with their
6604# normal names in the default $PATH (ie: Ubuntu). They exist under the
6605# non-suffixed name in their versioned llvm directory.
6606llvm_bin_dir=''
6607llvm_path="${PATH}"
6608if test "${CC}" = "clang"
6609then
6610 clang_bin=`which clang`
6611 # Some systems install clang elsewhere as a symlink to the real path
6612 # which is where the related llvm tools are located.
6613 if test -L "${clang_bin}"
6614 then
6615 clang_dir=`dirname "${clang_bin}"`
6616 clang_bin=`readlink "${clang_bin}"`
6617 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6618 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6619 fi
6620fi
Zachary Ware5af85642015-12-21 12:09:17 -06006621
Gregory P. Smith799520c2016-09-07 16:10:00 -07006622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6623$as_echo_n "checking target system type... " >&6; }
6624if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006625 $as_echo_n "(cached) " >&6
6626else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006627 if test "x$target_alias" = x; then
6628 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006629else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006630 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6631 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6632fi
6633
6634fi
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6636$as_echo "$ac_cv_target" >&6; }
6637case $ac_cv_target in
6638*-*-*) ;;
6639*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6640esac
6641target=$ac_cv_target
6642ac_save_IFS=$IFS; IFS='-'
6643set x $ac_cv_target
6644shift
6645target_cpu=$1
6646target_vendor=$2
6647shift; shift
6648# Remember, the first character of IFS is used to create $*,
6649# except with old shells:
6650target_os=$*
6651IFS=$ac_save_IFS
6652case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6653
6654
6655# The aliases save the names the user supplied, while $host etc.
6656# will get canonicalized.
6657test -n "$target_alias" &&
6658 test "$program_prefix$program_suffix$program_transform_name" = \
6659 NONENONEs,x,x, &&
6660 program_prefix=${target_alias}-
6661# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6662set dummy $target_alias-llvm-profdata; ac_word=$2
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006680 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ;;
6689esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006690fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6692if test -n "$LLVM_PROFDATA"; then
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6694$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695else
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697$as_echo "no" >&6; }
6698fi
6699
6700
Gregory P. Smith799520c2016-09-07 16:10:00 -07006701if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6702 if test "$build" = "$target"; then
6703 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6704 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6705set dummy llvm-profdata; ac_word=$2
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6709 $as_echo_n "(cached) " >&6
6710else
6711 case $ac_pt_LLVM_PROFDATA in
6712 [\\/]* | ?:[\\/]*)
6713 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6714 ;;
6715 *)
6716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in ${llvm_path}
6718do
6719 IFS=$as_save_IFS
6720 test -z "$as_dir" && as_dir=.
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725 break 2
6726 fi
6727done
6728 done
6729IFS=$as_save_IFS
6730
6731 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6732 ;;
6733esac
6734fi
6735ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6736if test -n "$ac_pt_LLVM_PROFDATA"; then
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6738$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6739else
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6741$as_echo "no" >&6; }
6742fi
6743
6744 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6745 else
6746 LLVM_PROFDATA="''"
6747 fi
6748else
6749 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6750fi
6751
6752
6753if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6754then
6755 LLVM_PROF_FOUND="found"
6756else
6757 LLVM_PROF_FOUND="not-found"
6758fi
6759if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6760then
6761 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6762 if test -n "${found_llvm_profdata}"
6763 then
6764 # llvm-profdata isn't directly in $PATH in some cases.
6765 # https://apple.stackexchange.com/questions/197053/
6766 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6767 LLVM_PROF_FOUND=found
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6769$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6770 fi
6771fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006772LLVM_PROF_ERR=no
6773case $CC in
6774 *clang*)
6775 # Any changes made here should be reflected in the GCC+Darwin case below
6776 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6777 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006779 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6780 if test $LLVM_PROF_FOUND = not-found
6781 then
6782 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006783 if test "${REQUIRE_PGO}" = "yes"
6784 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006785 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006786 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006787 fi
6788 ;;
6789 *gcc*)
6790 case $ac_sys_system in
6791 Darwin*)
6792 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6793 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006794 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006795 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006796 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006797 then
6798 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006799 if test "${REQUIRE_PGO}" = "yes"
6800 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006801 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 fi
6804 ;;
6805 *)
6806 PGO_PROF_GEN_FLAG="-fprofile-generate"
6807 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6808 LLVM_PROF_MERGER="true"
6809 LLVM_PROF_FILE=""
6810 ;;
6811 esac
6812 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006813 *icc*)
6814 PGO_PROF_GEN_FLAG="-prof-gen"
6815 PGO_PROF_USE_FLAG="-prof-use"
6816 LLVM_PROF_MERGER="true"
6817 LLVM_PROF_FILE=""
6818 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819esac
6820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6822# merged with this chunk of code?
6823
6824# Optimizer/debugger flags
6825# ------------------------
6826# (The following bit of code is complicated enough - please keep things
6827# indented properly. Just pretend you're editing Python code. ;-)
6828
6829# There are two parallel sets of case statements below, one that checks to
6830# see if OPT was set and one that does BASECFLAGS setting based upon
6831# compiler and platform. BASECFLAGS tweaks need to be made even if the
6832# user set OPT.
6833
6834# tweak OPT based on compiler and platform, only if the user didn't set
6835# it on the command line
6836
Victor Stinner9ed34a82017-05-02 22:35:58 +02006837
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006838if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839then
6840 case $GCC in
6841 yes)
6842 if test "$CC" != 'g++' ; then
6843 STRICT_PROTO="-Wstrict-prototypes"
6844 fi
6845 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6846 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6847 WRAP="-fwrapv"
6848 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006849
Stefan Krahaf04ff22011-12-08 22:20:31 +01006850 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006851 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006852 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006853 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006854 *)
6855 if $CC --version 2>&1 | grep -q clang
6856 then
6857 cc_is_clang=1
6858 else
6859 cc_is_clang=
6860 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006861 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006862
Victor Stinner35f3d242017-04-21 12:35:24 +02006863 if test -n "${cc_is_clang}"
6864 then
6865 # Clang also needs -fwrapv
6866 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006867 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6868 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006869 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006870 fi
6871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872 case $ac_cv_prog_cc_g in
6873 yes)
6874 if test "$Py_DEBUG" = 'true' ; then
6875 # Optimization messes up debuggers, so turn it off for
6876 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006877 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006878 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006879 else
Victor Stinner28205b22017-04-21 11:24:34 +02006880 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006881 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882 else
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884 fi
6885 ;;
6886 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006887 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888 ;;
6889 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006890
Victor Stinner826f83f2017-04-28 15:07:10 +02006891 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 case $ac_sys_system in
6894 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6895 ;;
6896 esac
6897 ;;
6898
6899 *)
6900 OPT="-O"
6901 ;;
6902 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903fi
6904
6905
6906
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908# The -arch flags for universal builds on OSX
6909UNIVERSAL_ARCH_FLAGS=
6910
6911
6912# tweak BASECFLAGS based on compiler and platform
6913case $GCC in
6914yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006915 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006916
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6918$as_echo_n "checking for -Wextra... " >&6; }
6919 ac_save_cc="$CC"
6920 CC="$CC -Wextra -Werror"
6921 if ${ac_cv_extra_warnings+:} false; then :
6922 $as_echo_n "(cached) " >&6
6923else
6924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6925/* end confdefs.h. */
6926
6927
6928int
6929main ()
6930{
6931
6932 ;
6933 return 0;
6934}
6935
6936_ACEOF
6937if ac_fn_c_try_compile "$LINENO"; then :
6938
6939 ac_cv_extra_warnings=yes
6940
6941else
6942
6943 ac_cv_extra_warnings=no
6944
6945fi
6946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6947fi
6948
6949 CC="$ac_save_cc"
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6951$as_echo "$ac_cv_extra_warnings" >&6; }
6952
6953 if test $ac_cv_extra_warnings = yes
6954 then
6955 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6956 fi
6957
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006958 # Python doesn't violate C99 aliasing rules, but older versions of
6959 # GCC produce warnings for legal Python code. Enable
6960 # -fno-strict-aliasing on versions of GCC that support but produce
6961 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6963$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964 ac_save_cc="$CC"
6965 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006966 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006967 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006971/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006972
Matthias Kloseb159a552010-04-25 21:00:44 +00006973
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006974int
6975main ()
6976{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006977
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006978 ;
6979 return 0;
6980}
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006983if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006984
6985 CC="$ac_save_cc -fstrict-aliasing"
6986 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988/* end confdefs.h. */
6989
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006990 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006991int
6992main ()
6993{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006994double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006995 ;
6996 return 0;
6997}
Matthias Kloseb159a552010-04-25 21:00:44 +00006998
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007000if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007001
7002 ac_cv_no_strict_aliasing=no
7003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004else
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
7006 ac_cv_no_strict_aliasing=yes
7007
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007010
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011else
Matthias Kloseb159a552010-04-25 21:00:44 +00007012
7013 ac_cv_no_strict_aliasing=no
7014
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007015fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007017fi
7018
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7022$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007024 then
7025 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7026 fi
7027
Zachary Ware5af85642015-12-21 12:09:17 -06007028 # ICC doesn't recognize the option, but only emits a warning
7029 ## XXX does it emit an unused result warning and can it be disabled?
7030 case "$CC" in
7031 *icc*)
7032 ac_cv_disable_unused_result_warning=no
7033 ;;
7034 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7036$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7037 ac_save_cc="$CC"
7038 CC="$CC -Wunused-result -Werror"
7039 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007040 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007041 $as_echo_n "(cached) " >&6
7042else
7043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7044/* end confdefs.h. */
7045
7046
7047int
7048main ()
7049{
7050
7051 ;
7052 return 0;
7053}
7054
7055_ACEOF
7056if ac_fn_c_try_compile "$LINENO"; then :
7057
7058 ac_cv_disable_unused_result_warning=yes
7059
7060else
7061
7062 ac_cv_disable_unused_result_warning=no
7063
7064fi
7065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7066fi
7067
7068 CFLAGS="$save_CFLAGS"
7069 CC="$ac_save_cc"
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7071$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007072 ;;
7073 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007074
7075 if test $ac_cv_disable_unused_result_warning = yes
7076 then
7077 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007078 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7079 fi
7080
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7082$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7083 ac_save_cc="$CC"
7084 CC="$CC -Wunused-parameter -Werror"
7085 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7086 $as_echo_n "(cached) " >&6
7087else
7088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7089/* end confdefs.h. */
7090
7091
7092int
7093main ()
7094{
7095
7096 ;
7097 return 0;
7098}
7099
7100_ACEOF
7101if ac_fn_c_try_compile "$LINENO"; then :
7102
7103 ac_cv_disable_unused_parameter_warning=yes
7104
7105else
7106
7107 ac_cv_disable_unused_parameter_warning=no
7108
7109fi
7110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7111fi
7112
7113 CC="$ac_save_cc"
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7115$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7116
7117 if test $ac_cv_disable_unused_parameter_warning = yes
7118 then
7119 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7120 fi
7121
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7123$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7124 ac_save_cc="$CC"
7125 CC="$CC -Wmissing-field-initializers -Werror"
7126 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7127 $as_echo_n "(cached) " >&6
7128else
7129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7130/* end confdefs.h. */
7131
7132
7133int
7134main ()
7135{
7136
7137 ;
7138 return 0;
7139}
7140
7141_ACEOF
7142if ac_fn_c_try_compile "$LINENO"; then :
7143
7144 ac_cv_disable_missing_field_initializers=yes
7145
7146else
7147
7148 ac_cv_disable_missing_field_initializers=no
7149
7150fi
7151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152fi
7153
7154 CC="$ac_save_cc"
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7156$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7157
7158 if test $ac_cv_disable_missing_field_initializers = yes
7159 then
7160 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007161 fi
7162
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7164$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7165 ac_save_cc="$CC"
7166 CC="$CC -Wsign-compare"
7167 save_CFLAGS="$CFLAGS"
7168 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7169 $as_echo_n "(cached) " >&6
7170else
7171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7172/* end confdefs.h. */
7173
7174
7175int
7176main ()
7177{
7178
7179 ;
7180 return 0;
7181}
7182
7183_ACEOF
7184if ac_fn_c_try_compile "$LINENO"; then :
7185
7186 ac_cv_enable_sign_compare_warning=yes
7187
7188else
7189
7190 ac_cv_enable_sign_compare_warning=no
7191
7192fi
7193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7194fi
7195
7196 CFLAGS="$save_CFLAGS"
7197 CC="$ac_save_cc"
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7199$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7200
7201 if test $ac_cv_enable_sign_compare_warning = yes
7202 then
7203 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7204 fi
7205
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7207$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7208 ac_save_cc="$CC"
7209 CC="$CC -Wunreachable-code"
7210 save_CFLAGS="$CFLAGS"
7211 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7212 $as_echo_n "(cached) " >&6
7213else
7214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7215/* end confdefs.h. */
7216
7217
7218int
7219main ()
7220{
7221
7222 ;
7223 return 0;
7224}
7225
7226_ACEOF
7227if ac_fn_c_try_compile "$LINENO"; then :
7228
7229 ac_cv_enable_unreachable_code_warning=yes
7230
7231else
7232
7233 ac_cv_enable_unreachable_code_warning=no
7234
7235fi
7236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7237fi
7238
7239 CFLAGS="$save_CFLAGS"
7240 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007241
7242 # Don't enable unreachable code warning in debug mode, since it usually
7243 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007244 # Issue #24324: Unfortunately, the unreachable code warning does not work
7245 # correctly on gcc and has been silently removed from the compiler.
7246 # It is supported on clang but on OS X systems gcc may be an alias
7247 # for clang. Try to determine if the compiler is not really gcc and,
7248 # if so, only then enable the warning.
7249 if test $ac_cv_enable_unreachable_code_warning = yes && \
7250 test "$Py_DEBUG" != "true" && \
7251 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007252 then
7253 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007254 else
7255 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007256 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7258$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007259
Victor Stinner193ee0a2017-02-06 14:24:00 +01007260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7261$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7262 ac_save_cc="$CC"
7263 CC="$CC -Werror=implicit-function-declaration"
7264 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7265 $as_echo_n "(cached) " >&6
7266else
7267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7268/* end confdefs.h. */
7269
7270
7271int
7272main ()
7273{
7274
7275 ;
7276 return 0;
7277}
7278
7279_ACEOF
7280if ac_fn_c_try_compile "$LINENO"; then :
7281
7282 ac_cv_enable_implicit_function_declaration_error=yes
7283
7284else
7285
7286 ac_cv_enable_implicit_function_declaration_error=no
7287
7288fi
7289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7290fi
7291
7292 CC="$ac_save_cc"
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7294$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7295
7296 if test $ac_cv_enable_implicit_function_declaration_error = yes
7297 then
7298 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7299 fi
7300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007301 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7302 # support. Without this, treatment of subnormals doesn't follow
7303 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007304 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007305 alpha*)
7306 BASECFLAGS="$BASECFLAGS -mieee"
7307 ;;
7308 esac
7309
7310 case $ac_sys_system in
7311 SCO_SV*)
7312 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7313 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007314
7315 # is there any other compiler on Darwin besides gcc?
7316 Darwin*)
7317 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7318 # used to be here, but non-Apple gcc doesn't accept them.
7319 if test "${CC}" = gcc
7320 then
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007322$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007323 case "${UNIVERSALSDK}" in
7324 */MacOSX10.4u.sdk)
7325 # Build using 10.4 SDK, force usage of gcc when the
7326 # compiler is gcc, otherwise the user will get very
7327 # confusing error messages when building on OSX 10.6
7328 CC=gcc-4.0
7329 CPP=cpp-4.0
7330 ;;
7331 esac
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007333$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007334 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335
Ned Deily87adb6e2013-10-18 21:09:56 -07007336 if test "${enable_universalsdk}"
7337 then
7338 case "$UNIVERSAL_ARCHS" in
7339 32-bit)
7340 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7341 LIPO_32BIT_FLAGS=""
7342 ARCH_RUN_32BIT=""
7343 ;;
7344 64-bit)
7345 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7346 LIPO_32BIT_FLAGS=""
7347 ARCH_RUN_32BIT="true"
7348 ;;
7349 all)
7350 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7351 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7352 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7353 ;;
7354 intel)
7355 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7356 LIPO_32BIT_FLAGS="-extract i386"
7357 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7358 ;;
7359 intel-32)
7360 UNIVERSAL_ARCH_FLAGS="-arch i386"
7361 LIPO_32BIT_FLAGS=""
7362 ARCH_RUN_32BIT=""
7363 ;;
7364 3-way)
7365 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7366 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7367 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7368 ;;
7369 *)
7370 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7371 ;;
7372 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373
Ned Deily87adb6e2013-10-18 21:09:56 -07007374 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7375 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7376 if test "${UNIVERSALSDK}" != "/"
7377 then
7378 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7379 fi
7380 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381
Ned Deily87adb6e2013-10-18 21:09:56 -07007382 # Calculate an appropriate deployment target for this build:
7383 # The deployment target value is used explicitly to enable certain
7384 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007385 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007386 # component of the string returned by distutils.get_platform().
7387 #
7388 # Use the value from:
7389 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7390 # 2. the operating system version of the build machine if >= 10.6
7391 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7392 # below to pick either 10.3, 10.4, or 10.5 as the target.
7393 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394
Ned Deily87adb6e2013-10-18 21:09:56 -07007395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7396$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007397 cur_target_major=`sw_vers -productVersion | \
7398 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7399 cur_target_minor=`sw_vers -productVersion | \
7400 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7401 cur_target="${cur_target_major}.${cur_target_minor}"
7402 if test ${cur_target_major} -eq 10 && \
7403 test ${cur_target_minor} -ge 3 && \
7404 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007405 then
Ned Deily36820b62014-06-25 13:44:22 -07007406 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007407 cur_target=10.3
7408 if test ${enable_universalsdk}
7409 then
7410 case "$UNIVERSAL_ARCHS" in
7411 all|3-way|intel|64-bit)
7412 # These configurations were first supported in 10.5
7413 cur_target='10.5'
7414 ;;
7415 esac
7416 else
7417 if test `/usr/bin/arch` = "i386"
7418 then
7419 # 10.4 was the first release to support Intel archs
7420 cur_target="10.4"
7421 fi
7422 fi
7423 fi
7424 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007425
Ned Deily87adb6e2013-10-18 21:09:56 -07007426 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7427 # environment with a value that is the same as what we'll use
7428 # in the Makefile to ensure that we'll get the same compiler
7429 # environment during configure and build time.
7430 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7431 export MACOSX_DEPLOYMENT_TARGET
7432 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7434$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007435
Ned Deily87adb6e2013-10-18 21:09:56 -07007436 # end of Darwin* tests
7437 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438 esac
7439 ;;
7440
7441*)
7442 case $ac_sys_system in
7443 OpenUNIX*|UnixWare*)
7444 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7445 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446 SCO_SV*)
7447 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7448 ;;
7449 esac
7450 ;;
7451esac
7452
Zachary Ware5af85642015-12-21 12:09:17 -06007453# ICC needs -fp-model strict or floats behave badly
7454case "$CC" in
7455*icc*)
7456 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7457 ;;
7458esac
7459
T. Woutersddbfa2c2017-05-23 01:30:49 +02007460if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461 :
7462else
7463 OPT="-DNDEBUG $OPT"
7464fi
7465
7466if test "$ac_arch_flags"
7467then
7468 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7469fi
7470
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471# On some compilers, pthreads are available without further options
7472# (e.g. MacOS X). On some of these systems, the compiler will not
7473# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7474# So we have to see first whether pthreads are available without
7475# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7477$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480else
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482 ac_cv_pthread_is_default=no
7483else
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485/* end confdefs.h. */
7486
Stefan Krah7dba5942012-11-22 22:49:11 +01007487#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488#include <pthread.h>
7489
7490void* routine(void* p){return NULL;}
7491
7492int main(){
7493 pthread_t p;
7494 if(pthread_create(&p,NULL,routine,NULL)!=0)
7495 return 1;
7496 (void)pthread_detach(p);
7497 return 0;
7498}
7499
7500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007501if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502
7503 ac_cv_pthread_is_default=yes
7504 ac_cv_kthread=no
7505 ac_cv_pthread=no
7506
7507else
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7511 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512fi
7513
7514
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515fi
7516
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7518$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519
7520
7521if test $ac_cv_pthread_is_default = yes
7522then
7523 ac_cv_kpthread=no
7524else
7525# -Kpthread, if available, provides the right #defines
7526# and linker options to make pthread_create available
7527# Some compilers won't report that they do not support -Kpthread,
7528# so we need to run a program to see whether it really made the
7529# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7531$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007532if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534else
7535 ac_save_cc="$CC"
7536CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007537if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538 ac_cv_kpthread=no
7539else
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541/* end confdefs.h. */
7542
Stefan Krah7dba5942012-11-22 22:49:11 +01007543#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544#include <pthread.h>
7545
7546void* routine(void* p){return NULL;}
7547
7548int main(){
7549 pthread_t p;
7550 if(pthread_create(&p,NULL,routine,NULL)!=0)
7551 return 1;
7552 (void)pthread_detach(p);
7553 return 0;
7554}
7555
7556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007557if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558 ac_cv_kpthread=yes
7559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7563 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564fi
7565
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566CC="$ac_save_cc"
7567fi
7568
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7570$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571fi
7572
7573if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7574then
7575# -Kthread, if available, provides the right #defines
7576# and linker options to make pthread_create available
7577# Some compilers won't report that they do not support -Kthread,
7578# so we need to run a program to see whether it really made the
7579# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7581$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007582if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584else
7585 ac_save_cc="$CC"
7586CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007587if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588 ac_cv_kthread=no
7589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591/* end confdefs.h. */
7592
Stefan Krah7dba5942012-11-22 22:49:11 +01007593#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594#include <pthread.h>
7595
7596void* routine(void* p){return NULL;}
7597
7598int main(){
7599 pthread_t p;
7600 if(pthread_create(&p,NULL,routine,NULL)!=0)
7601 return 1;
7602 (void)pthread_detach(p);
7603 return 0;
7604}
7605
7606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007607if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608 ac_cv_kthread=yes
7609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614fi
7615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616CC="$ac_save_cc"
7617fi
7618
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7620$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621fi
7622
7623if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7624then
7625# -pthread, if available, provides the right #defines
7626# and linker options to make pthread_create available
7627# Some compilers won't report that they do not support -pthread,
7628# so we need to run a program to see whether it really made the
7629# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7631$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007632if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634else
7635 ac_save_cc="$CC"
7636CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007637if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638 ac_cv_pthread=no
7639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641/* end confdefs.h. */
7642
Stefan Krah7dba5942012-11-22 22:49:11 +01007643#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644#include <pthread.h>
7645
7646void* routine(void* p){return NULL;}
7647
7648int main(){
7649 pthread_t p;
7650 if(pthread_create(&p,NULL,routine,NULL)!=0)
7651 return 1;
7652 (void)pthread_detach(p);
7653 return 0;
7654}
7655
7656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007657if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658 ac_cv_pthread=yes
7659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664fi
7665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666CC="$ac_save_cc"
7667fi
7668
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7670$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671fi
7672
7673# If we have set a CC compiler flag for thread support then
7674# check if it works for CXX, too.
7675ac_cv_cxx_thread=no
7676if test ! -z "$CXX"
7677then
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7679$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680ac_save_cxx="$CXX"
7681
7682if test "$ac_cv_kpthread" = "yes"
7683then
7684 CXX="$CXX -Kpthread"
7685 ac_cv_cxx_thread=yes
7686elif test "$ac_cv_kthread" = "yes"
7687then
7688 CXX="$CXX -Kthread"
7689 ac_cv_cxx_thread=yes
7690elif test "$ac_cv_pthread" = "yes"
7691then
7692 CXX="$CXX -pthread"
7693 ac_cv_cxx_thread=yes
7694fi
7695
7696if test $ac_cv_cxx_thread = yes
7697then
7698 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7699 $CXX -c conftest.$ac_ext 2>&5
7700 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7701 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7702 then
7703 ac_cv_cxx_thread=yes
7704 else
7705 ac_cv_cxx_thread=no
7706 fi
7707 rm -fr conftest*
7708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7710$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711fi
7712CXX="$ac_save_cxx"
7713
7714
7715# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7717$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007718if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720else
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722/* end confdefs.h. */
7723#include <stdlib.h>
7724#include <stdarg.h>
7725#include <string.h>
7726#include <float.h>
7727
7728int
7729main ()
7730{
7731
7732 ;
7733 return 0;
7734}
7735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007736if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737 ac_cv_header_stdc=yes
7738else
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007740fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7742
7743if test $ac_cv_header_stdc = yes; then
7744 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746/* end confdefs.h. */
7747#include <string.h>
7748
7749_ACEOF
7750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 $EGREP "memchr" >/dev/null 2>&1; then :
7752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753else
7754 ac_cv_header_stdc=no
7755fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007756rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757
7758fi
7759
7760if test $ac_cv_header_stdc = yes; then
7761 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763/* end confdefs.h. */
7764#include <stdlib.h>
7765
7766_ACEOF
7767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 $EGREP "free" >/dev/null 2>&1; then :
7769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770else
7771 ac_cv_header_stdc=no
7772fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007773rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774
7775fi
7776
7777if test $ac_cv_header_stdc = yes; then
7778 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780 :
7781else
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783/* end confdefs.h. */
7784#include <ctype.h>
7785#include <stdlib.h>
7786#if ((' ' & 0x0FF) == 0x020)
7787# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7788# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7789#else
7790# define ISLOWER(c) \
7791 (('a' <= (c) && (c) <= 'i') \
7792 || ('j' <= (c) && (c) <= 'r') \
7793 || ('s' <= (c) && (c) <= 'z'))
7794# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7795#endif
7796
7797#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7798int
7799main ()
7800{
7801 int i;
7802 for (i = 0; i < 256; i++)
7803 if (XOR (islower (i), ISLOWER (i))
7804 || toupper (i) != TOUPPER (i))
7805 return 2;
7806 return 0;
7807}
7808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007809if ac_fn_c_try_run "$LINENO"; then :
7810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811else
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007816fi
7817
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818fi
7819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7821$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007822if test $ac_cv_header_stdc = yes; then
7823
Matthias Kloseb9621712010-04-24 17:59:49 +00007824$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825
7826fi
7827
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007828for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007829fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007830ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007831sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007832unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007833poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007834sys/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 +01007835sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007836sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007837sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007838sys/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 -07007839libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007840linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007841sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007842do :
7843 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7844ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007845if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007847#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007848_ACEOF
7849
7850fi
7851
Guido van Rossum627b2d71993-12-24 10:39:16 +00007852done
7853
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007854ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007855for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7858$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007859if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007861else
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007863/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007864#include <sys/types.h>
7865#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
Martin v. Löwis11437992002-04-12 09:54:03 +00007867int
7868main ()
7869{
7870if ((DIR *) 0)
7871return 0;
7872 ;
7873 return 0;
7874}
7875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007876if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007878else
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007883eval ac_res=\$$as_ac_Header
7884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7885$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007886if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007888#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007889_ACEOF
7890
7891ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007894done
7895# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7896if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7898$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007899if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007901else
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906/* Override any GCC internal prototype to avoid an error.
7907 Use char because int might match the return type of a GCC
7908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007909#ifdef __cplusplus
7910extern "C"
7911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007912char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007913int
7914main ()
7915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 ;
7918 return 0;
7919}
7920_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921for ac_lib in '' dir; do
7922 if test -z "$ac_lib"; then
7923 ac_res="none required"
7924 else
7925 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007926 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007931rm -f core conftest.err conftest.$ac_objext \
7932 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007933 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936done
Victor Stinnere0be4232011-10-25 13:06:09 +02007937if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939else
7940 ac_cv_search_opendir=no
7941fi
7942rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007943LIBS=$ac_func_search_save_LIBS
7944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7946$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007948if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007950
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007951fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007952
Michael W. Hudson54241132001-12-07 15:38:26 +00007953else
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7955$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007956if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007958else
7959 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963/* Override any GCC internal prototype to avoid an error.
7964 Use char because int might match the return type of a GCC
7965 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007966#ifdef __cplusplus
7967extern "C"
7968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007969char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007970int
7971main ()
7972{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ;
7975 return 0;
7976}
7977_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978for ac_lib in '' x; do
7979 if test -z "$ac_lib"; then
7980 ac_res="none required"
7981 else
7982 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007983 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988rm -f core conftest.err conftest.$ac_objext \
7989 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007990 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993done
Victor Stinnere0be4232011-10-25 13:06:09 +02007994if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996else
7997 ac_cv_search_opendir=no
7998fi
7999rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008000LIBS=$ac_func_search_save_LIBS
8001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8003$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008005if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008008fi
8009
8010fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8013$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008014if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008018/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008019#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008020int
8021main ()
8022{
8023return makedev(0, 0);
8024 ;
8025 return 0;
8026}
8027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008029 ac_cv_header_sys_types_h_makedev=yes
8030else
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008033rm -f core conftest.err conftest.$ac_objext \
8034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008035
8036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8038$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008039
8040if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008041ac_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 +02008042if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008045
8046fi
8047
8048
8049
8050 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 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 +02008052if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008053
Matthias Kloseb9621712010-04-24 17:59:49 +00008054$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008055
8056fi
8057
8058
8059 fi
8060fi
8061
Michael W. Hudson54241132001-12-07 15:38:26 +00008062
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008063# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8064# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8065SAVE_CFLAGS=$CFLAGS
8066CFLAGS="-std=c99 $CFLAGS"
8067for ac_header in bluetooth/bluetooth.h
8068do :
8069 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8070if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8071 cat >>confdefs.h <<_ACEOF
8072#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8073_ACEOF
8074
8075fi
8076
8077done
8078
8079CFLAGS=$SAVE_CFLAGS
8080
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008081# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8082for ac_header in net/if.h
8083do :
8084 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8085#ifdef STDC_HEADERS
8086# include <stdlib.h>
8087# include <stddef.h>
8088#else
8089# ifdef HAVE_STDLIB_H
8090# include <stdlib.h>
8091# endif
8092#endif
8093#ifdef HAVE_SYS_SOCKET_H
8094# include <sys/socket.h>
8095#endif
8096
8097"
Victor Stinnere0be4232011-10-25 13:06:09 +02008098if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008099 cat >>confdefs.h <<_ACEOF
8100#define HAVE_NET_IF_H 1
8101_ACEOF
8102
8103fi
8104
8105done
8106
8107
Martin v. Löwis11017b12006-01-14 18:12:57 +00008108# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008109for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008110do :
8111 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 +00008112#ifdef HAVE_ASM_TYPES_H
8113#include <asm/types.h>
8114#endif
8115#ifdef HAVE_SYS_SOCKET_H
8116#include <sys/socket.h>
8117#endif
8118
Matthias Kloseb9621712010-04-24 17:59:49 +00008119"
Victor Stinnere0be4232011-10-25 13:06:09 +02008120if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008121 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008122#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008123_ACEOF
8124
8125fi
8126
8127done
8128
8129
Charles-François Natali47413c12011-10-06 19:47:44 +02008130# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008131for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008132do :
8133 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8134ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8135#ifdef HAVE_SYS_SOCKET_H
8136#include <sys/socket.h>
8137#endif
8138
8139"
8140if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8141 cat >>confdefs.h <<_ACEOF
8142#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8143_ACEOF
8144
8145fi
8146
8147done
8148
8149
Guido van Rossum627b2d71993-12-24 10:39:16 +00008150# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008151was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8153$as_echo_n "checking for clock_t in time.h... " >&6; }
8154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008155/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008157
8158_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008161 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008162else
Martin v. Löwis11437992002-04-12 09:54:03 +00008163
8164
Matthias Kloseb9621712010-04-24 17:59:49 +00008165$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008166
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008167
Guido van Rossum627b2d71993-12-24 10:39:16 +00008168fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008169rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8172$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008173
Matthias Kloseb9621712010-04-24 17:59:49 +00008174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8175$as_echo_n "checking for makedev... " >&6; }
8176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008177/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008178
Jesus Cea740f53a2010-04-28 11:35:30 +00008179#if defined(MAJOR_IN_MKDEV)
8180#include <sys/mkdev.h>
8181#elif defined(MAJOR_IN_SYSMACROS)
8182#include <sys/sysmacros.h>
8183#else
8184#include <sys/types.h>
8185#endif
8186
Neal Norwitz11690112002-07-30 01:08:28 +00008187int
8188main ()
8189{
Jesus Cea740f53a2010-04-28 11:35:30 +00008190
8191 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008192 ;
8193 return 0;
8194}
Matthias Kloseb159a552010-04-25 21:00:44 +00008195
Neal Norwitz11690112002-07-30 01:08:28 +00008196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008197if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008198 ac_cv_has_makedev=yes
8199else
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008202rm -f core conftest.err conftest.$ac_objext \
8203 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8205$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008206if test "$ac_cv_has_makedev" = "yes"; then
8207
Matthias Kloseb9621712010-04-24 17:59:49 +00008208$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008209
8210fi
8211
Christian Heimes985ecdc2013-11-20 11:46:18 +01008212# byte swapping
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8214$as_echo_n "checking for le64toh... " >&6; }
8215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216/* end confdefs.h. */
8217
8218#ifdef HAVE_ENDIAN_H
8219#include <endian.h>
8220#elif defined(HAVE_SYS_ENDIAN_H)
8221#include <sys/endian.h>
8222#endif
8223
8224int
8225main ()
8226{
8227
8228 le64toh(1)
8229 ;
8230 return 0;
8231}
8232
8233_ACEOF
8234if ac_fn_c_try_link "$LINENO"; then :
8235 ac_cv_has_le64toh=yes
8236else
8237 ac_cv_has_le64toh=no
8238fi
8239rm -f core conftest.err conftest.$ac_objext \
8240 conftest$ac_exeext conftest.$ac_ext
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8242$as_echo "$ac_cv_has_le64toh" >&6; }
8243if test "$ac_cv_has_le64toh" = "yes"; then
8244
8245$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8246
8247fi
8248
Martin v. Löwis399a6892002-10-04 10:22:02 +00008249# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8250# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8251# defined, but the compiler does not support pragma redefine_extname,
8252# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8253# structures (such as rlimit64) without declaring them. As a
8254# work-around, disable LFS on such configurations
8255
8256use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8258$as_echo_n "checking Solaris LFS bug... " >&6; }
8259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008260/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008261
8262#define _LARGEFILE_SOURCE 1
8263#define _FILE_OFFSET_BITS 64
8264#include <sys/resource.h>
8265
Martin v. Löwis399a6892002-10-04 10:22:02 +00008266int
8267main ()
8268{
8269struct rlimit foo;
8270 ;
8271 return 0;
8272}
8273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008275 sol_lfs_bug=no
8276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8281$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008282if test "$sol_lfs_bug" = "yes"; then
8283 use_lfs=no
8284fi
8285
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008286# Don't use largefile support for GNU/Hurd
8287case $ac_sys_system in GNU*)
8288 use_lfs=no
8289esac
8290
Martin v. Löwis399a6892002-10-04 10:22:02 +00008291if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008292# Two defines needed to enable largefile support on various platforms
8293# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008294case $ac_sys_system/$ac_sys_release in
8295AIX*)
8296
8297$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8298
8299 ;;
8300esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
8304
Matthias Kloseb9621712010-04-24 17:59:49 +00008305$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008306
Martin v. Löwis399a6892002-10-04 10:22:02 +00008307fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008308
Guido van Rossum84e7b241996-08-19 21:59:00 +00008309# Add some code to confdefs.h so that the test for off_t works on SCO
8310cat >> confdefs.h <<\EOF
8311#if defined(SCO_DS)
8312#undef _OFF_T
8313#endif
8314EOF
8315
Guido van Rossumef2255b2000-03-10 22:30:29 +00008316# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008317ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008318if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008319
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008320else
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
8322cat >>confdefs.h <<_ACEOF
8323#define mode_t int
8324_ACEOF
8325
8326fi
8327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008329if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008331else
Martin v. Löwis11437992002-04-12 09:54:03 +00008332
8333cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008335_ACEOF
8336
8337fi
8338
Matthias Kloseb9621712010-04-24 17:59:49 +00008339ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008340if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008341
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008342else
Martin v. Löwis11437992002-04-12 09:54:03 +00008343
8344cat >>confdefs.h <<_ACEOF
8345#define pid_t int
8346_ACEOF
8347
8348fi
8349
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008352#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008353_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008356if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008357
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008358else
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
8360cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008362_ACEOF
8363
8364fi
8365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8367$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008372/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008373#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008374
8375_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008378 ac_cv_type_uid_t=yes
8379else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008380 ac_cv_type_uid_t=no
8381fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008382rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8386$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008387if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008390
8391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008393
8394fi
8395
Mark Dickinson983bc162012-12-02 12:11:38 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008398if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008401
8402fi
8403
Stefan Krah1919b7e2012-03-21 18:25:23 +01008404ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8405if test "x$ac_cv_type___uint128_t" = xyes; then :
8406
8407$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8408
8409fi
8410
Jack Jansendd19cf82001-12-06 22:36:17 +00008411
Michael W. Hudson54241132001-12-07 15:38:26 +00008412# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008413# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414# The cast to long int works around a bug in the HP C Compiler
8415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8417# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8419$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008420if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 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 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 if test "$ac_cv_type_int" = yes; then
8427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008429as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008430See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431 else
8432 ac_cv_sizeof_int=0
8433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8438$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439
8440
8441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008443#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008444_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008445
8446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447# The cast to long int works around a bug in the HP C Compiler
8448# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8449# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8450# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8452$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008453if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 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 +00008457
Martin v. Löwis11437992002-04-12 09:54:03 +00008458else
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 if test "$ac_cv_type_long" = yes; then
8460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008462as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008463See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464 else
8465 ac_cv_sizeof_long=0
8466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008468
Martin v. Löwis11437992002-04-12 09:54:03 +00008469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8471$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472
8473
8474
Martin v. Löwis11437992002-04-12 09:54:03 +00008475cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008476#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008477_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008478
8479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480# The cast to long int works around a bug in the HP C Compiler
8481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8483# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8485$as_echo_n "checking size of long long... " >&6; }
8486if ${ac_cv_sizeof_long_long+:} false; then :
8487 $as_echo_n "(cached) " >&6
8488else
8489 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8490
8491else
8492 if test "$ac_cv_type_long_long" = yes; then
8493 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8495as_fn_error 77 "cannot compute sizeof (long long)
8496See \`config.log' for more details" "$LINENO" 5; }
8497 else
8498 ac_cv_sizeof_long_long=0
8499 fi
8500fi
8501
8502fi
8503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8504$as_echo "$ac_cv_sizeof_long_long" >&6; }
8505
8506
8507
8508cat >>confdefs.h <<_ACEOF
8509#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8510_ACEOF
8511
8512
8513# The cast to long int works around a bug in the HP C Compiler
8514# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8515# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8516# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8518$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008519if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 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 +00008523
Martin v. Löwis11437992002-04-12 09:54:03 +00008524else
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 if test "$ac_cv_type_void_p" = yes; then
8526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008528as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008529See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530 else
8531 ac_cv_sizeof_void_p=0
8532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8537$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538
8539
8540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008542#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008544
8545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546# The cast to long int works around a bug in the HP C Compiler
8547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8549# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8551$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008552if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 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 +00008556
Martin v. Löwis11437992002-04-12 09:54:03 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 if test "$ac_cv_type_short" = yes; then
8559 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008561as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008562See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563 else
8564 ac_cv_sizeof_short=0
8565 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8570$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571
8572
8573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008577
8578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579# The cast to long int works around a bug in the HP C Compiler
8580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8584$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008585if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 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 +00008589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 if test "$ac_cv_type_float" = yes; then
8592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008594as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008595See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596 else
8597 ac_cv_sizeof_float=0
8598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8603$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604
8605
8606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008609_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008610
8611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612# The cast to long int works around a bug in the HP C Compiler
8613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8617$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008618if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 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 +00008622
Martin v. Löwis11437992002-04-12 09:54:03 +00008623else
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 if test "$ac_cv_type_double" = yes; then
8625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008627as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 else
8630 ac_cv_sizeof_double=0
8631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633
Martin v. Löwis11437992002-04-12 09:54:03 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8636$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637
8638
8639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008641#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008642_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008643
8644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645# The cast to long int works around a bug in the HP C Compiler
8646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8650$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 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 +00008655
Martin v. Löwis11437992002-04-12 09:54:03 +00008656else
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 if test "$ac_cv_type_fpos_t" = yes; then
8658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008660as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662 else
8663 ac_cv_sizeof_fpos_t=0
8664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666
Martin v. Löwis11437992002-04-12 09:54:03 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8669$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670
8671
8672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008674#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008675_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008676
Michael W. Hudson54241132001-12-07 15:38:26 +00008677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678# The cast to long int works around a bug in the HP C Compiler
8679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8683$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008684if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 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 +00008688
Martin v. Löwis18e16552006-02-15 17:27:45 +00008689else
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 if test "$ac_cv_type_size_t" = yes; then
8691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008693as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695 else
8696 ac_cv_sizeof_size_t=0
8697 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699
Martin v. Löwis18e16552006-02-15 17:27:45 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8702$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703
8704
8705
Martin v. Löwis18e16552006-02-15 17:27:45 +00008706cat >>confdefs.h <<_ACEOF
8707#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8708_ACEOF
8709
8710
Christian Heimes400adb02008-02-01 08:12:03 +00008711# The cast to long int works around a bug in the HP C Compiler
8712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8716$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008717if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008719else
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 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 +00008721
Christian Heimes400adb02008-02-01 08:12:03 +00008722else
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 if test "$ac_cv_type_pid_t" = yes; then
8724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008726as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008727See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008728 else
8729 ac_cv_sizeof_pid_t=0
8730 fi
8731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732
Christian Heimes400adb02008-02-01 08:12:03 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8735$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008736
8737
8738
8739cat >>confdefs.h <<_ACEOF
8740#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8741_ACEOF
8742
8743
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008744# The cast to long int works around a bug in the HP C Compiler
8745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8747# This bug is HP SR number 8606223364.
8748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8749$as_echo_n "checking size of uintptr_t... " >&6; }
8750if ${ac_cv_sizeof_uintptr_t+:} false; then :
8751 $as_echo_n "(cached) " >&6
8752else
8753 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8754
8755else
8756 if test "$ac_cv_type_uintptr_t" = yes; then
8757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8759as_fn_error 77 "cannot compute sizeof (uintptr_t)
8760See \`config.log' for more details" "$LINENO" 5; }
8761 else
8762 ac_cv_sizeof_uintptr_t=0
8763 fi
8764fi
8765
8766fi
8767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8768$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8769
8770
8771
8772cat >>confdefs.h <<_ACEOF
8773#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8774_ACEOF
8775
8776
Michael W. Hudson54241132001-12-07 15:38:26 +00008777
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8779$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008780have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008782/* end confdefs.h. */
8783
8784int
8785main ()
8786{
8787long double x; x = (long double)0;
8788 ;
8789 return 0;
8790}
8791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008792if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008793
8794
Matthias Kloseb9621712010-04-24 17:59:49 +00008795$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008796
8797 have_long_double=yes
8798
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008799fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8802$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008803if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008804# The cast to long int works around a bug in the HP C Compiler
8805# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8806# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8807# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8809$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008810if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 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 +00008814
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 if test "$ac_cv_type_long_double" = yes; then
8817 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008819as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008820See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008821 else
8822 ac_cv_sizeof_long_double=0
8823 fi
8824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8828$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008829
8830
8831
8832cat >>confdefs.h <<_ACEOF
8833#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8834_ACEOF
8835
8836
8837fi
8838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008839# The cast to long int works around a bug in the HP C Compiler
8840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8842# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8844$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008845if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008847else
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 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 +00008849
Thomas Woutersb2137042007-02-01 18:02:27 +00008850else
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 if test "$ac_cv_type__Bool" = yes; then
8852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008854as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008855See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856 else
8857 ac_cv_sizeof__Bool=0
8858 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860
Thomas Woutersb2137042007-02-01 18:02:27 +00008861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8863$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864
8865
8866
Thomas Woutersb2137042007-02-01 18:02:27 +00008867cat >>confdefs.h <<_ACEOF
8868#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8869_ACEOF
8870
8871
Thomas Woutersb2137042007-02-01 18:02:27 +00008872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873# The cast to long int works around a bug in the HP C Compiler
8874# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8875# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8876# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8878$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008879if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008881else
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008883#ifdef HAVE_SYS_TYPES_H
8884#include <sys/types.h>
8885#endif
8886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 if test "$ac_cv_type_off_t" = yes; then
8891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008893as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008894See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895 else
8896 ac_cv_sizeof_off_t=0
8897 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8902$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904
8905
Martin v. Löwis11437992002-04-12 09:54:03 +00008906cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008907#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008908_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008909
Michael W. Hudson54241132001-12-07 15:38:26 +00008910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8913$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008914if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008915 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008916
Matthias Kloseb9621712010-04-24 17:59:49 +00008917$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008918
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8920$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008921else
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008924fi
8925
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926# The cast to long int works around a bug in the HP C Compiler
8927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8929# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8931$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008932if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008934else
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008936#ifdef HAVE_SYS_TYPES_H
8937#include <sys/types.h>
8938#endif
8939#ifdef HAVE_TIME_H
8940#include <time.h>
8941#endif
8942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008944
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008945else
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 if test "$ac_cv_type_time_t" = yes; then
8947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008949as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008950See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008951 else
8952 ac_cv_sizeof_time_t=0
8953 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008955
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8958$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960
8961
Martin v. Löwis11437992002-04-12 09:54:03 +00008962cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008963#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008964_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008965
Michael W. Hudson54241132001-12-07 15:38:26 +00008966
8967
Trent Mick635f6fb2000-08-23 21:33:05 +00008968# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008969ac_save_cc="$CC"
8970if test "$ac_cv_kpthread" = "yes"
8971then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008972elif test "$ac_cv_kthread" = "yes"
8973then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008974elif test "$ac_cv_pthread" = "yes"
8975then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008976fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977
Matthias Kloseb9621712010-04-24 17:59:49 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8979$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008980have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008982/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008983
8984 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008985int
8986main ()
8987{
Guido van Rossum12580492000-09-24 16:47:19 +00008988pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ;
8990 return 0;
8991}
Matthias Kloseb159a552010-04-25 21:00:44 +00008992
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008994if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008995 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8999$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009000if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9004# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9006$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009007if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009009else
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009011#ifdef HAVE_PTHREAD_H
9012#include <pthread.h>
9013#endif
9014
Matthias Kloseb9621712010-04-24 17:59:49 +00009015"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009016
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017else
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 if test "$ac_cv_type_pthread_t" = yes; then
9019 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009021as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009022See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023 else
9024 ac_cv_sizeof_pthread_t=0
9025 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009027
Trent Mick635f6fb2000-08-23 21:33:05 +00009028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9030$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009032
9033
Martin v. Löwis11437992002-04-12 09:54:03 +00009034cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009035#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038
Trent Mick635f6fb2000-08-23 21:33:05 +00009039fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009040CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009041
Michael W. Hudson54241132001-12-07 15:38:26 +00009042
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009043case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009044 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009045 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9046 ;;
9047 Darwin/*)
9048 OTHER_LIBTOOL_OPT=""
9049 ;;
9050esac
9051
9052
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009054case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009055 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009056 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9057 if test "${enable_universalsdk}"; then
9058 :
9059 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009060 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009061 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009062 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009063 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009064 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009065 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009066 if test ${gcc_version} '<' 4.0
9067 then
9068 LIBTOOL_CRUFT="-lcc_dynamic"
9069 else
9070 LIBTOOL_CRUFT=""
9071 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009073 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009074else
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009076/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009077
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009078 #include <unistd.h>
9079 int main(int argc, char*argv[])
9080 {
9081 if (sizeof(long) == 4) {
9082 return 0;
9083 } else {
9084 return 1;
9085 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009086 }
9087
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009089if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009090 ac_osx_32bit=yes
9091else
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009096fi
9097
9098
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009099 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009100 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009101 i386)
9102 MACOSX_DEFAULT_ARCH="i386"
9103 ;;
9104 ppc)
9105 MACOSX_DEFAULT_ARCH="ppc"
9106 ;;
9107 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009108 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009109 ;;
9110 esac
9111 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009112 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009113 i386)
9114 MACOSX_DEFAULT_ARCH="x86_64"
9115 ;;
9116 ppc)
9117 MACOSX_DEFAULT_ARCH="ppc64"
9118 ;;
9119 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009120 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009121 ;;
9122 esac
9123
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009124 fi
9125
9126 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009127 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009128 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009129esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9131$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009132if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009133then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009134 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009136 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009137
Matthias Kloseb9621712010-04-24 17:59:49 +00009138$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009139
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9141$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009142 if test $enable_shared = "yes"
9143 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009144 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 +00009145 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009146else
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9148$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009149fi
9150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9152$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009153case $ac_sys_system/$ac_sys_release in
9154 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009155
Matthias Kloseb9621712010-04-24 17:59:49 +00009156$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009157
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9159$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009160 ;;
9161 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009164 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009165esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009166
Guido van Rossum0a516c91994-09-12 10:58:40 +00009167# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009168
Michael W. Hudson54241132001-12-07 15:38:26 +00009169
9170
9171
9172
Benjamin Peterson99f03762010-04-11 22:15:28 +00009173
Thomas Wouters477c8d52006-05-27 19:21:47 +00009174
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009175# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9176# -- usually .so, .sl on HP-UX, .dll on Cygwin
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9178$as_echo_n "checking the extension of shared libraries... " >&6; }
9179if test -z "$SHLIB_SUFFIX"; then
9180 case $ac_sys_system in
9181 hp*|HP*)
9182 case `uname -m` in
9183 ia64) SHLIB_SUFFIX=.so;;
9184 *) SHLIB_SUFFIX=.sl;;
9185 esac
9186 ;;
9187 CYGWIN*) SHLIB_SUFFIX=.dll;;
9188 *) SHLIB_SUFFIX=.so;;
9189 esac
9190fi
9191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9192$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009193
Guido van Rossum0a516c91994-09-12 10:58:40 +00009194# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009195# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009196# (Shared libraries in this instance are shared modules to be loaded into
9197# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9199$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009200if test -z "$LDSHARED"
9201then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009202 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009203 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009204 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009205 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009206 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009207 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009208 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210 if test "$GCC" = "yes" ; then
9211 LDSHARED='$(CC) -shared'
9212 LDCXXSHARED='$(CXX) -shared'
9213 else
9214 LDSHARED='$(CC) -G'
9215 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009216 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009217 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 if test "$GCC" = "yes" ; then
9219 LDSHARED='$(CC) -shared'
9220 LDCXXSHARED='$(CXX) -shared'
9221 else
9222 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009223 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009224 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009225 LDSHARED='$(CC) -bundle'
9226 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009227 if test "$enable_framework" ; then
9228 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009229 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9230 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009231 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009232 else
9233 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009234 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009235 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009236 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009237 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009238 LDSHARED='$(CC) -bundle'
9239 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009240 if test "$enable_framework" ; then
9241 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009242 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9243 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009244 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009245 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009246 # No framework, use the Python app as bundle-loader
9247 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009248 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009249 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009250 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009251 Darwin/*)
9252 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9253 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009254
Ned Deily36820b62014-06-25 13:44:22 -07009255 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9256 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9257 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9258 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9259 if test ${dep_target_major} -eq 10 && \
9260 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009261 then
Ned Deily36820b62014-06-25 13:44:22 -07009262 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009263 LDSHARED='$(CC) -bundle'
9264 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009265 if test "$enable_framework" ; then
9266 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009267 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9268 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009269 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009270 else
9271 # No framework, use the Python app as bundle-loader
9272 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9273 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009274 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009275 fi
Ned Deily36820b62014-06-25 13:44:22 -07009276 else
9277 # building for OS X 10.3 and later
9278 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9279 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9280 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009281 fi
9282 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009283 Linux*|GNU*|QNX*)
9284 LDSHARED='$(CC) -shared'
9285 LDCXXSHARED='$(CXX) -shared';;
9286 BSD/OS*/4*)
9287 LDSHARED="gcc -shared"
9288 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009289 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009290 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009291 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009292 LDSHARED='$(CC) -shared'
9293 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009294 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009295 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009296 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009297 OpenBSD*)
9298 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9299 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009300 LDSHARED='$(CC) -shared $(CCSHARED)'
9301 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009302 else
9303 case `uname -r` in
9304 [01].* | 2.[0-7] | 2.[0-7].*)
9305 LDSHARED="ld -Bshareable ${LDFLAGS}"
9306 ;;
9307 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009308 LDSHARED='$(CC) -shared $(CCSHARED)'
9309 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009310 ;;
9311 esac
9312 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009313 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009314 LDSHARED='$(CC) -shared'
9315 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009316 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009317 if test "$GCC" = "yes" ; then
9318 LDSHARED='$(CC) -shared'
9319 LDCXXSHARED='$(CXX) -shared'
9320 else
9321 LDSHARED='$(CC) -G'
9322 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009323 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009324 SCO_SV*)
9325 LDSHARED='$(CC) -Wl,-G,-Bexport'
9326 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9327 CYGWIN*)
9328 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9329 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330 *) LDSHARED="ld";;
9331 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9334$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009335LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009336BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009338# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9340$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009341if test -z "$CCSHARED"
9342then
Guido van Rossum07397971997-04-29 21:49:50 +00009343 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009344 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009345 then CCSHARED="-fPIC";
9346 elif test `uname -p` = sparc;
9347 then CCSHARED="-xcode=pic32";
9348 else CCSHARED="-Kpic";
9349 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009350 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009351 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009352 else CCSHARED="+z";
9353 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009354 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009355 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009356 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009357 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009358 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009359 if test "$GCC" = "yes"
9360 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009361 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009362 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009363 SCO_SV*)
9364 if test "$GCC" = "yes"
9365 then CCSHARED="-fPIC"
9366 else CCSHARED="-Kpic -belf"
9367 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009368 IRIX*/6*) case $CC in
9369 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009370 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009371 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9375$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009376# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009377# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9379$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009380if test -z "$LINKFORSHARED"
9381then
Guido van Rossum07397971997-04-29 21:49:50 +00009382 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009383 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009384 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009385 LINKFORSHARED="-Wl,-E -Wl,+s";;
9386# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009387 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009388 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009389 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009390 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009392 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009393
9394 # Issue #18075: the default maximum stack size (8MBytes) is too
9395 # small for the default recursion limit. Increase the stack size
9396 # to ensure that tests don't crash
9397 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9398
Jack Jansene578a632001-08-15 01:27:14 +00009399 if test "$enable_framework"
9400 then
Jack Jansenda49e192005-01-07 13:08:22 +00009401 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009402 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009403 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009404 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009405 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009406 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009407 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009408 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9409 then
9410 LINKFORSHARED="-Wl,--export-dynamic"
9411 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009412 SunOS/5*) case $CC in
9413 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009414 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009415 then
9416 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009417 fi;;
9418 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009419 CYGWIN*)
9420 if test $enable_shared = "no"
9421 then
9422 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9423 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009424 QNX*)
9425 # -Wl,-E causes the symbols to be added to the dynamic
9426 # symbol table so that they can be found when a module
9427 # is loaded. -N 2048K causes the stack size to be set
9428 # to 2048 kilobytes so that the stack doesn't overflow
9429 # when running test_compile.py.
9430 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9434$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009435
Michael W. Hudson54241132001-12-07 15:38:26 +00009436
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009437
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9439$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009440if test ! "$LIBRARY" = "$LDLIBRARY"
9441then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009442 case $ac_sys_system in
9443 CYGWIN*)
9444 # Cygwin needs CCSHARED when building extension DLLs
9445 # but not when building the interpreter DLL.
9446 CFLAGSFORSHARED='';;
9447 *)
9448 CFLAGSFORSHARED='$(CCSHARED)'
9449 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9452$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009453
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009454# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9455# library (with --enable-shared).
9456# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009457# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9458# if it is not required, since it creates a dependency of the shared library
9459# to LIBS. This, in turn, means that applications linking the shared libpython
9460# don't need to link LIBS explicitly. The default should be only changed
9461# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9464$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009465case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009466 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009467 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009468esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9470$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009471
9472
Guido van Rossum627b2d71993-12-24 10:39:16 +00009473# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9475$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009476if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009477 $as_echo_n "(cached) " >&6
9478else
9479 ac_check_lib_save_LIBS=$LIBS
9480LIBS="-lsendfile $LIBS"
9481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9482/* end confdefs.h. */
9483
9484/* Override any GCC internal prototype to avoid an error.
9485 Use char because int might match the return type of a GCC
9486 builtin and then its argument prototype would still apply. */
9487#ifdef __cplusplus
9488extern "C"
9489#endif
9490char sendfile ();
9491int
9492main ()
9493{
9494return sendfile ();
9495 ;
9496 return 0;
9497}
9498_ACEOF
9499if ac_fn_c_try_link "$LINENO"; then :
9500 ac_cv_lib_sendfile_sendfile=yes
9501else
9502 ac_cv_lib_sendfile_sendfile=no
9503fi
9504rm -f core conftest.err conftest.$ac_objext \
9505 conftest$ac_exeext conftest.$ac_ext
9506LIBS=$ac_check_lib_save_LIBS
9507fi
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9509$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009510if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009511 cat >>confdefs.h <<_ACEOF
9512#define HAVE_LIBSENDFILE 1
9513_ACEOF
9514
9515 LIBS="-lsendfile $LIBS"
9516
9517fi
9518
Matthias Kloseb9621712010-04-24 17:59:49 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9520$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009521if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009523else
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009525LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529/* Override any GCC internal prototype to avoid an error.
9530 Use char because int might match the return type of a GCC
9531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009532#ifdef __cplusplus
9533extern "C"
9534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009535char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009536int
9537main ()
9538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ;
9541 return 0;
9542}
9543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009546else
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009549rm -f core conftest.err conftest.$ac_objext \
9550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009551LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9554$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009555if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 cat >>confdefs.h <<_ACEOF
9557#define HAVE_LIBDL 1
9558_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009559
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009560 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009561
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009562fi
9563 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9565$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009566if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009567 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009568else
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009570LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574/* Override any GCC internal prototype to avoid an error.
9575 Use char because int might match the return type of a GCC
9576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009577#ifdef __cplusplus
9578extern "C"
9579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009580char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009581int
9582main ()
9583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ;
9586 return 0;
9587}
9588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009591else
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009594rm -f core conftest.err conftest.$ac_objext \
9595 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009596LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9599$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 cat >>confdefs.h <<_ACEOF
9602#define HAVE_LIBDLD 1
9603_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009604
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009605 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009606
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009607fi
9608 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009609
Georg Brandlb1441c72009-01-03 22:33:39 +00009610# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009611if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9613$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009614if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009615 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009616else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009617 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621/* Override any GCC internal prototype to avoid an error.
9622 Use char because int might match the return type of a GCC
9623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009624#ifdef __cplusplus
9625extern "C"
9626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009627char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009628int
9629main ()
9630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 ;
9633 return 0;
9634}
9635_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636for ac_lib in '' pthread rt posix4; do
9637 if test -z "$ac_lib"; then
9638 ac_res="none required"
9639 else
9640 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009641 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009646rm -f core conftest.err conftest.$ac_objext \
9647 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009648 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651done
Victor Stinnere0be4232011-10-25 13:06:09 +02009652if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654else
9655 ac_cv_search_sem_init=no
9656fi
9657rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009658LIBS=$ac_func_search_save_LIBS
9659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9661$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009663if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009665
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009666fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009667 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009668 # posix4 on Solaris 2.6
9669 # pthread (first!) on Linux
9670fi
9671
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9674$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009675if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009677else
9678 ac_check_lib_save_LIBS=$LIBS
9679LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009686#ifdef __cplusplus
9687extern "C"
9688#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009689char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009690int
9691main ()
9692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009694 ;
9695 return 0;
9696}
9697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009699 ac_cv_lib_intl_textdomain=yes
9700else
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009703rm -f core conftest.err conftest.$ac_objext \
9704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009705LIBS=$ac_check_lib_save_LIBS
9706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9708$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009709if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009710
Matthias Kloseb9621712010-04-24 17:59:49 +00009711$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009712
Brett Cannonc6d936e2009-06-07 20:09:53 +00009713 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009714fi
9715
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009716
9717# checks for system dependent C++ extensions support
9718case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9720$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009723
Georg Brandl59e87bd2011-02-15 19:48:59 +00009724 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009728loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ;
9730 return 0;
9731}
Matthias Kloseb159a552010-04-25 21:00:44 +00009732
Martin v. Löwis11437992002-04-12 09:54:03 +00009733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009734if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009735
Matthias Kloseb159a552010-04-25 21:00:44 +00009736
Matthias Kloseb9621712010-04-24 17:59:49 +00009737$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009738
Matthias Kloseb159a552010-04-25 21:00:44 +00009739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009740$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009741
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009742else
Matthias Kloseb159a552010-04-25 21:00:44 +00009743
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009745$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009746
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009750 *) ;;
9751esac
9752
Christian Heimes985ecdc2013-11-20 11:46:18 +01009753# check for systems that require aligned memory access
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9755$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009756if ${ac_cv_aligned_required+:} false; then :
9757 $as_echo_n "(cached) " >&6
9758else
9759 if test "$cross_compiling" = yes; then :
9760 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009761else
9762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9763/* end confdefs.h. */
9764
9765int main()
9766{
9767 char s[16];
9768 int i, *p1, *p2;
9769 for (i=0; i < 16; i++)
9770 s[i] = i;
9771 p1 = (int*)(s+1);
9772 p2 = (int*)(s+2);
9773 if (*p1 == *p2)
9774 return 1;
9775 return 0;
9776}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009777_ACEOF
9778if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009779 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009780else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009781 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009782fi
9783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9784 conftest.$ac_objext conftest.beam conftest.$ac_ext
9785fi
9786
9787
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009788fi
9789
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9791$as_echo "$ac_cv_aligned_required" >&6; }
9792if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009793
9794$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9795
9796fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009797
9798# str, bytes and memoryview hash algorithm
9799
9800
9801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9802$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9803
9804# Check whether --with-hash_algorithm was given.
9805if test "${with_hash_algorithm+set}" = set; then :
9806 withval=$with_hash_algorithm;
9807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9808$as_echo "$withval" >&6; }
9809case "$withval" in
9810 siphash24)
9811 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9812
9813 ;;
9814 fnv)
9815 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9816
9817 ;;
9818 *)
9819 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9820 ;;
9821esac
9822
9823else
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9825$as_echo "default" >&6; }
9826fi
9827
9828
Charles-François Natalid30b0222014-05-08 23:08:51 +01009829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9830$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9831
9832# Check whether --with-address_sanitizer was given.
9833if test "${with_address_sanitizer+set}" = set; then :
9834 withval=$with_address_sanitizer;
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9836$as_echo "$withval" >&6; }
9837BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9838LDFLAGS="-fsanitize=address $LDFLAGS"
9839
9840else
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
9843fi
9844
9845
Guido van Rossum70c7f481998-03-26 18:44:10 +00009846# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9848$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009849if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009851else
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009853LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857/* Override any GCC internal prototype to avoid an error.
9858 Use char because int might match the return type of a GCC
9859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009860#ifdef __cplusplus
9861extern "C"
9862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009863char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009864int
9865main ()
9866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 ;
9869 return 0;
9870}
9871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009874else
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009877rm -f core conftest.err conftest.$ac_objext \
9878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009879LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9882$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009883if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009884 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009885fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009886 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9888$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009889if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009891else
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009893LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897/* Override any GCC internal prototype to avoid an error.
9898 Use char because int might match the return type of a GCC
9899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009900#ifdef __cplusplus
9901extern "C"
9902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009903char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009904int
9905main ()
9906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 ;
9909 return 0;
9910}
9911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009913 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009914else
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009917rm -f core conftest.err conftest.$ac_objext \
9918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009919LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9922$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009923if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009924 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009925fi
9926 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009927
Matthias Kloseb9621712010-04-24 17:59:49 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9929$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009932if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009933 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9935$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009936LIBS="$withval $LIBS"
9937
9938else
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9940$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941fi
9942
Guido van Rossum7f43da71994-08-01 12:15:30 +00009943
Victor Stinner8291b5e2015-03-20 16:03:14 +01009944
9945
9946
9947
9948
9949
9950
9951if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9952 if test -n "$ac_tool_prefix"; then
9953 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9954set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
9957if ${ac_cv_path_PKG_CONFIG+:} false; then :
9958 $as_echo_n "(cached) " >&6
9959else
9960 case $PKG_CONFIG in
9961 [\\/]* | ?:[\\/]*)
9962 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9963 ;;
9964 *)
9965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968 IFS=$as_save_IFS
9969 test -z "$as_dir" && as_dir=.
9970 for ac_exec_ext in '' $ac_executable_extensions; do
9971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9972 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9974 break 2
9975 fi
9976done
9977 done
9978IFS=$as_save_IFS
9979
9980 ;;
9981esac
9982fi
9983PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9984if test -n "$PKG_CONFIG"; then
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9986$as_echo "$PKG_CONFIG" >&6; }
9987else
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990fi
9991
9992
9993fi
9994if test -z "$ac_cv_path_PKG_CONFIG"; then
9995 ac_pt_PKG_CONFIG=$PKG_CONFIG
9996 # Extract the first word of "pkg-config", so it can be a program name with args.
9997set dummy pkg-config; ac_word=$2
9998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9999$as_echo_n "checking for $ac_word... " >&6; }
10000if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10001 $as_echo_n "(cached) " >&6
10002else
10003 case $ac_pt_PKG_CONFIG in
10004 [\\/]* | ?:[\\/]*)
10005 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10006 ;;
10007 *)
10008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10009for as_dir in $PATH
10010do
10011 IFS=$as_save_IFS
10012 test -z "$as_dir" && as_dir=.
10013 for ac_exec_ext in '' $ac_executable_extensions; do
10014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10015 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10017 break 2
10018 fi
10019done
10020 done
10021IFS=$as_save_IFS
10022
10023 ;;
10024esac
10025fi
10026ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10027if test -n "$ac_pt_PKG_CONFIG"; then
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10029$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10030else
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032$as_echo "no" >&6; }
10033fi
10034
10035 if test "x$ac_pt_PKG_CONFIG" = x; then
10036 PKG_CONFIG=""
10037 else
10038 case $cross_compiling:$ac_tool_warned in
10039yes:)
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10042ac_tool_warned=yes ;;
10043esac
10044 PKG_CONFIG=$ac_pt_PKG_CONFIG
10045 fi
10046else
10047 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10048fi
10049
10050fi
10051if test -n "$PKG_CONFIG"; then
10052 _pkg_min_version=0.9.0
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10054$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10055 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10057$as_echo "yes" >&6; }
10058 else
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061 PKG_CONFIG=""
10062 fi
10063fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010064
10065# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10067$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010068
10069# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010070if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010071 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010072else
10073 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010074fi
10075
10076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10078$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010079
10080# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10082$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010083
10084# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010086 withval=$with_system_ffi;
10087fi
10088
10089
Zachary Waref40d4dd2016-09-17 01:25:24 -050010090if test "$ac_sys_system" = "Darwin"
10091then
10092 case "$with_system_ffi" in
10093 "")
10094 with_system_ffi="no"
10095 ;;
10096 yes|no)
10097 ;;
10098 *)
10099 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10100 ;;
10101 esac
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10103$as_echo "$with_system_ffi" >&6; }
10104else
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10106$as_echo "yes" >&6; }
10107 if test "$with_system_ffi" != ""
10108 then
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10110$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10111 fi
10112 with_system_ffi="yes"
10113fi
Zachary Ware935043d2016-09-09 17:01:21 -070010114
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010115if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010116 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10117else
10118 LIBFFI_INCLUDEDIR=""
10119fi
10120
10121
Stefan Krah60187b52012-03-23 19:06:27 +010010122# Check for use of the system libmpdec library
10123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10124$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10125
10126# Check whether --with-system_libmpdec was given.
10127if test "${with_system_libmpdec+set}" = set; then :
10128 withval=$with_system_libmpdec;
10129else
10130 with_system_libmpdec="no"
10131fi
10132
10133
10134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10135$as_echo "$with_system_libmpdec" >&6; }
10136
Benjamin Peterson076ed002010-10-31 17:11:02 +000010137# Check for support for loadable sqlite extensions
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10139$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10140# Check whether --enable-loadable-sqlite-extensions was given.
10141if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10142 enableval=$enable_loadable_sqlite_extensions;
10143else
10144 enable_loadable_sqlite_extensions="no"
10145fi
10146
10147
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10149$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10150
Ned Deilyd819b932013-09-06 01:07:05 -070010151# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10152
10153
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10155$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10156
10157# Check whether --with-tcltk-includes was given.
10158if test "${with_tcltk_includes+set}" = set; then :
10159 withval=$with_tcltk_includes;
10160else
10161 with_tcltk_includes="default"
10162fi
10163
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10165$as_echo "$with_tcltk_includes" >&6; }
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10167$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10168
10169# Check whether --with-tcltk-libs was given.
10170if test "${with_tcltk_libs+set}" = set; then :
10171 withval=$with_tcltk_libs;
10172else
10173 with_tcltk_libs="default"
10174fi
10175
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10177$as_echo "$with_tcltk_libs" >&6; }
10178if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10179then
10180 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10181 then
10182 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10183 fi
10184 TCLTK_INCLUDES=""
10185 TCLTK_LIBS=""
10186else
10187 TCLTK_INCLUDES="$with_tcltk_includes"
10188 TCLTK_LIBS="$with_tcltk_libs"
10189fi
10190
Matthias Klose55708cc2009-04-30 08:06:49 +000010191# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10193$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010194
10195# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010197 withval=$with_dbmliborder;
10198if test x$with_dbmliborder = xyes
10199then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010200as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010201else
10202 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10203 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10204 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010205 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010206 fi
10207 done
10208fi
10209fi
10210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10212$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010213
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010214# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010215
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010216USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218
Martin v. Löwis11437992002-04-12 09:54:03 +000010219
10220# Templates for things AC_DEFINEd more than once.
10221# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010222
10223
Martin v. Löwis11437992002-04-12 09:54:03 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10226$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010229if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 withval=$with_threads;
10231fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010232
10233
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010234# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010237if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238 withval=$with_thread; with_threads=$with_thread
10239fi
10240
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010241
10242if test -z "$with_threads"
10243then with_threads="yes"
10244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10246$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010247
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010248
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010249if test "$with_threads" = "no"
10250then
10251 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010252elif test "$ac_cv_pthread_is_default" = yes
10253then
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010255
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010256 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010258
10259 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010261elif test "$ac_cv_kpthread" = "yes"
10262then
10263 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010264 if test "$ac_cv_cxx_thread" = "yes"; then
10265 CXX="$CXX -Kpthread"
10266 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010268
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010269 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010270 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010271elif test "$ac_cv_kthread" = "yes"
10272then
10273 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010274 if test "$ac_cv_cxx_thread" = "yes"; then
10275 CXX="$CXX -Kthread"
10276 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010278
10279 posix_threads=yes
10280 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010281elif test "$ac_cv_pthread" = "yes"
10282then
10283 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010284 if test "$ac_cv_cxx_thread" = "yes"; then
10285 CXX="$CXX -pthread"
10286 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010288
10289 posix_threads=yes
10290 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010291else
10292 if test ! -z "$with_threads" -a -d "$with_threads"
10293 then LDFLAGS="$LDFLAGS -L$with_threads"
10294 fi
10295 if test ! -z "$withval" -a -d "$withval"
10296 then LDFLAGS="$LDFLAGS -L$withval"
10297 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010298
10299 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010300 # define _POSIX_THREADS in unistd.h. Some apparently don't
10301 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10303$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010306
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010307#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010308#ifdef _POSIX_THREADS
10309yes
10310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010311
10312_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010315 unistd_defines_pthreads=yes
10316else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010317 unistd_defines_pthreads=no
10318fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010319rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10322$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010323
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010325
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010326 # Just looking for pthread_create in libpthread is not enough:
10327 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10328 # So we really have to include pthread.h, and then link.
10329 _libs=$LIBS
10330 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10332$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010334/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010335
10336#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010337#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010338
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010339void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010340int
10341main ()
10342{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010343
10344pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10352$as_echo "yes" >&6; }
10353 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010354
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010355 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010356 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010357else
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010359 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010361if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010363
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010364 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010365 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010366else
Guido van Rossumad678af1998-10-02 14:42:15 +000010367
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10369$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010370if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010372else
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010374LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378/* Override any GCC internal prototype to avoid an error.
10379 Use char because int might match the return type of a GCC
10380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010381#ifdef __cplusplus
10382extern "C"
10383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010384char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010385int
10386main ()
10387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010398rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010400LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10403$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010404if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010407 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010408 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010409 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010410else
Greg Steinadf63d62000-07-05 10:38:09 +000010411
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10413$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010414if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010416else
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010418LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422/* Override any GCC internal prototype to avoid an error.
10423 Use char because int might match the return type of a GCC
10424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010425#ifdef __cplusplus
10426extern "C"
10427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010428char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010429int
10430main ()
10431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ;
10434 return 0;
10435}
10436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010439else
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010442rm -f core conftest.err conftest.$ac_objext \
10443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010444LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10447$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010448if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010450
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010451 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010452 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010453 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010454else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010455
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10457$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010458if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010460else
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010462LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010466/* Override any GCC internal prototype to avoid an error.
10467 Use char because int might match the return type of a GCC
10468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010469#ifdef __cplusplus
10470extern "C"
10471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010472char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010473int
10474main ()
10475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ;
10478 return 0;
10479}
10480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010483else
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010486rm -f core conftest.err conftest.$ac_objext \
10487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010488LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10491$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010492if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010496 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010497 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010498else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10501$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010502if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010504else
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010506LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510/* Override any GCC internal prototype to avoid an error.
10511 Use char because int might match the return type of a GCC
10512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010513#ifdef __cplusplus
10514extern "C"
10515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010516char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010517int
10518main ()
10519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ;
10522 return 0;
10523}
10524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010527else
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010530rm -f core conftest.err conftest.$ac_objext \
10531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010532LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10535$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010536if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010538
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010539 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010540 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010541 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010542else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010543
Martin v. Löwis130fb172001-07-19 11:00:41 +000010544 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010545fi
10546
Guido van Rossum627b2d71993-12-24 10:39:16 +000010547
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010548fi
10549
Guido van Rossum0be3e491997-05-22 20:33:33 +000010550fi
10551
Guido van Rossum49545951997-12-02 19:28:29 +000010552fi
10553
Guido van Rossumb93a8621998-05-07 13:27:32 +000010554fi
10555
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010557rm -f core conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010559
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10561$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010562if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010564else
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010566LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570/* Override any GCC internal prototype to avoid an error.
10571 Use char because int might match the return type of a GCC
10572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010573#ifdef __cplusplus
10574extern "C"
10575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010576char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010577int
10578main ()
10579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 ;
10582 return 0;
10583}
10584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010587else
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010590rm -f core conftest.err conftest.$ac_objext \
10591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010592LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10595$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010596if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598
Martin v. Löwis130fb172001-07-19 11:00:41 +000010599 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010600 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010601 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010602fi
10603
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010604
Neal Norwitza978ab02002-11-02 16:58:05 +000010605 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10607$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010608if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010610else
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010612LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616/* Override any GCC internal prototype to avoid an error.
10617 Use char because int might match the return type of a GCC
10618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010619#ifdef __cplusplus
10620extern "C"
10621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010622char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010623int
10624main ()
10625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010627 ;
10628 return 0;
10629}
10630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010633else
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010636rm -f core conftest.err conftest.$ac_objext \
10637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010638LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10641$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010642if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010644
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010645 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010646 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010647 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010648fi
10649
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010650 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010652
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010653if test "$posix_threads" = "yes"; then
10654 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010657
10658 fi
10659
10660 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10661 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010662 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010663$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010664
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665 ;;
10666 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010667$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668
10669 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010670 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010671$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010672
10673 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010674 esac
10675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10677$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010678 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010680else
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682 ac_cv_pthread_system_supported=no
10683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010686
10687 #include <stdio.h>
10688 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689 void *foo(void *parm) {
10690 return NULL;
10691 }
10692 main() {
10693 pthread_attr_t attr;
10694 pthread_t id;
10695 if (pthread_attr_init(&attr)) exit(-1);
10696 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10697 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10698 exit(0);
10699 }
10700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010701if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010702 ac_cv_pthread_system_supported=yes
10703else
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710
Guido van Rossum627b2d71993-12-24 10:39:16 +000010711fi
10712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10714$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715 if test "$ac_cv_pthread_system_supported" = "yes"; then
10716
Matthias Kloseb9621712010-04-24 17:59:49 +000010717$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010718
10719 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 for ac_func in pthread_sigmask
10721do :
10722 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010723if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010724 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010725#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010726_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010727 case $ac_sys_system in
10728 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010731
10732 ;;
10733 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010734fi
10735done
10736
Christian Heimesf77b4b22013-08-21 13:26:05 +020010737 for ac_func in pthread_atfork
10738do :
10739 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10740if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10741 cat >>confdefs.h <<_ACEOF
10742#define HAVE_PTHREAD_ATFORK 1
10743_ACEOF
10744
10745fi
10746done
10747
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010748fi
10749
10750
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10754$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010756if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10760$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761 ipv6=no
10762 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10764$as_echo "yes" >&6; }
10765 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766
10767 ipv6=yes
10768 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770else
Martin v. Löwis11437992002-04-12 09:54:03 +000010771
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010773/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774 /* AF_INET6 available check */
10775#include <sys/types.h>
10776#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010777int
10778main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010780int domain = AF_INET6;
10781 ;
10782 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783}
Martin v. Löwis11437992002-04-12 09:54:03 +000010784_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010785if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10788$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791else
Matthias Kloseb159a552010-04-25 21:00:44 +000010792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10794$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010796
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010800if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10802$as_echo_n "checking if RFC2553 API is available... " >&6; }
10803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010805
10806 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010807#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010808int
10809main ()
10810{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010811struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010812 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 ;
10814 return 0;
10815}
Matthias Kloseb159a552010-04-25 21:00:44 +000010816
Martin v. Löwis11437992002-04-12 09:54:03 +000010817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010818if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010819
10820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010821$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010822 ipv6=yes
10823
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010824else
Matthias Kloseb159a552010-04-25 21:00:44 +000010825
10826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010827$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010828 ipv6=no
10829
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010832fi
10833
10834if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010836
10837fi
10838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839fi
10840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841
10842ipv6type=unknown
10843ipv6lib=none
10844ipv6trylibc=no
10845
10846if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10848$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010849 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10850 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851 case $i in
10852 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010854/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010855
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856#include <netinet/in.h>
10857#ifdef IPV6_INRIA_VERSION
10858yes
10859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010860_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010863 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010864fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010865rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866
10867 ;;
10868 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010870/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010871
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872#include <netinet/in.h>
10873#ifdef __KAME__
10874yes
10875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010876_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879 ipv6type=$i;
10880 ipv6lib=inet6
10881 ipv6libdir=/usr/local/v6/lib
10882 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010883fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010884rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885
10886 ;;
10887 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010889/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891#include <features.h>
10892#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10893yes
10894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010895_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898 ipv6type=$i;
10899 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010901rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902
10903 ;;
10904 linux-inet6)
10905 if test -d /usr/inet6; then
10906 ipv6type=$i
10907 ipv6lib=inet6
10908 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010909 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910 fi
10911 ;;
10912 solaris)
10913 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010914 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915 ipv6type=$i
10916 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917 fi
10918 fi
10919 ;;
10920 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010922/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010923
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924#include <sys/param.h>
10925#ifdef _TOSHIBA_INET6
10926yes
10927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010928_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931 ipv6type=$i;
10932 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010933 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010934fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010935rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936
10937 ;;
10938 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010941
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942#include </usr/local/v6/include/sys/v6config.h>
10943#ifdef __V6D__
10944yes
10945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010946_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949 ipv6type=$i;
10950 ipv6lib=v6;
10951 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010952 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010954rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955
10956 ;;
10957 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961#include <sys/param.h>
10962#ifdef _ZETA_MINAMI_INET6
10963yes
10964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968 ipv6type=$i;
10969 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010970 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010972rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973
10974 ;;
10975 esac
10976 if test "$ipv6type" != "unknown"; then
10977 break
10978 fi
10979 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10981$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982fi
10983
10984if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10985 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10986 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10987 echo "using lib$ipv6lib"
10988 else
10989 if test $ipv6trylibc = "yes"; then
10990 echo "using libc"
10991 else
10992 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10993 echo "You need to fetch lib$ipv6lib.a from appropriate"
10994 echo 'ipv6 kit and compile beforehand.'
10995 exit 1
10996 fi
10997 fi
10998fi
10999
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11001$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11003/* end confdefs.h. */
11004 /* CAN_RAW_FD_FRAMES available check */
11005#include <linux/can/raw.h>
11006int
11007main ()
11008{
11009int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11010 ;
11011 return 0;
11012}
11013_ACEOF
11014if ac_fn_c_try_compile "$LINENO"; then :
11015
11016
11017$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11018
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11020$as_echo "yes" >&6; }
11021
11022else
11023
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026
11027fi
11028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11029
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011030# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11032$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011035if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036 withval=$with_doc_strings;
11037fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011038
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011039
11040if test -z "$with_doc_strings"
11041then with_doc_strings="yes"
11042fi
11043if test "$with_doc_strings" != "no"
11044then
11045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011047
11048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11050$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011051
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011052# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11054$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011057if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011058 withval=$with_pymalloc;
11059fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011060
Neil Schemenauera35c6882001-02-27 04:45:05 +000011061
Neil Schemenauer16c22972002-03-22 15:34:49 +000011062if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011063then
11064 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011065fi
11066if test "$with_pymalloc" != "no"
11067then
Martin v. Löwis11437992002-04-12 09:54:03 +000011068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011070
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011071 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11074$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011075
Nick Coghlan6ea41862017-06-11 13:16:15 +100011076# Check for --with-c-locale-coercion
11077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11078$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11079
11080# Check whether --with-c-locale-coercion was given.
11081if test "${with_c_locale_coercion+set}" = set; then :
11082 withval=$with_c_locale_coercion;
11083fi
11084
11085
11086if test -z "$with_c_locale_coercion"
11087then
11088 with_c_locale_coercion="yes"
11089fi
11090if test "$with_c_locale_coercion" != "no"
11091then
11092
11093$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11094
11095fi
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11097$as_echo "$with_c_locale_coercion" >&6; }
11098
11099# Check for --with-c-locale-warning
11100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11101$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11102
11103# Check whether --with-c-locale-warning was given.
11104if test "${with_c_locale_warning+set}" = set; then :
11105 withval=$with_c_locale_warning;
11106fi
11107
11108
11109if test -z "$with_c_locale_warning"
11110then
11111 with_c_locale_warning="yes"
11112fi
11113if test "$with_c_locale_warning" != "no"
11114then
11115
11116$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11117
11118fi
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11120$as_echo "$with_c_locale_warning" >&6; }
11121
Benjamin Peterson05159c42009-12-03 03:01:27 +000011122# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11124$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011125
11126# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011127if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011128 withval=$with_valgrind;
11129else
11130 with_valgrind=no
11131fi
11132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11134$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011135if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 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 +020011137if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011140
11141else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011142 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011143
11144fi
11145
11146
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011147 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011148fi
11149
Łukasz Langaa785c872016-09-09 17:37:37 -070011150# Check for DTrace support
11151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11152$as_echo_n "checking for --with-dtrace... " >&6; }
11153
11154# Check whether --with-dtrace was given.
11155if test "${with_dtrace+set}" = set; then :
11156 withval=$with_dtrace;
11157else
11158 with_dtrace=no
11159fi
11160
11161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11162$as_echo "$with_dtrace" >&6; }
11163
11164
11165
11166
11167
11168DTRACE=
11169DFLAGS=
11170DTRACE_HEADERS=
11171DTRACE_OBJS=
11172
11173if test "$with_dtrace" = "yes"
11174then
11175 # Extract the first word of "dtrace", so it can be a program name with args.
11176set dummy dtrace; ac_word=$2
11177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11178$as_echo_n "checking for $ac_word... " >&6; }
11179if ${ac_cv_path_DTRACE+:} false; then :
11180 $as_echo_n "(cached) " >&6
11181else
11182 case $DTRACE in
11183 [\\/]* | ?:[\\/]*)
11184 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11185 ;;
11186 *)
11187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11188for as_dir in $PATH
11189do
11190 IFS=$as_save_IFS
11191 test -z "$as_dir" && as_dir=.
11192 for ac_exec_ext in '' $ac_executable_extensions; do
11193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11194 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11196 break 2
11197 fi
11198done
11199 done
11200IFS=$as_save_IFS
11201
11202 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11203 ;;
11204esac
11205fi
11206DTRACE=$ac_cv_path_DTRACE
11207if test -n "$DTRACE"; then
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11209$as_echo "$DTRACE" >&6; }
11210else
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11212$as_echo "no" >&6; }
11213fi
11214
11215
11216 if test "$DTRACE" = "not found"; then
11217 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11218 fi
11219
11220$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11221
11222 DTRACE_HEADERS="Include/pydtrace_probes.h"
11223
11224 # On OS X, DTrace providers do not need to be explicitly compiled and
11225 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11226 # generation flag '-G'. We check for presence of this flag, rather than
11227 # hardcoding support by OS, in the interest of robustness.
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11229$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11230if ${ac_cv_dtrace_link+:} false; then :
11231 $as_echo_n "(cached) " >&6
11232else
11233 ac_cv_dtrace_link=no
11234 echo 'BEGIN' > conftest.d
11235 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11236 ac_cv_dtrace_link=yes
11237
11238fi
11239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11240$as_echo "$ac_cv_dtrace_link" >&6; }
11241 if test "$ac_cv_dtrace_link" = "yes"; then
11242 DTRACE_OBJS="Python/pydtrace.o"
11243 fi
11244fi
11245
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011246# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011247
Guido van Rossum98935bf2001-09-05 19:13:16 +000011248DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011249
Guido van Rossume97ee181999-12-20 21:27:22 +000011250# the dlopen() function means we might want to use dynload_shlib.o. some
11251# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011252for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011253do :
11254 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011255if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011258_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011259
Guido van Rossume97ee181999-12-20 21:27:22 +000011260fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011261done
Guido van Rossume97ee181999-12-20 21:27:22 +000011262
Michael W. Hudson54241132001-12-07 15:38:26 +000011263
Guido van Rossume97ee181999-12-20 21:27:22 +000011264# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11265# loading of modules.
11266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11268$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011269if test -z "$DYNLOADFILE"
11270then
11271 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011272 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11273 if test "$ac_cv_func_dlopen" = yes
11274 then DYNLOADFILE="dynload_shlib.o"
11275 else DYNLOADFILE="dynload_aix.o"
11276 fi
11277 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011278 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011279 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11280 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011281 *)
11282 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11283 # out any dynamic loading
11284 if test "$ac_cv_func_dlopen" = yes
11285 then DYNLOADFILE="dynload_shlib.o"
11286 else DYNLOADFILE="dynload_stub.o"
11287 fi
11288 ;;
11289 esac
11290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11292$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011293if test "$DYNLOADFILE" != "dynload_stub.o"
11294then
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011297
11298fi
11299
Neil Schemenauer4e425612001-06-19 15:44:15 +000011300# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11301
Michael W. Hudson54241132001-12-07 15:38:26 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11304$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011305if test -z "$MACHDEP_OBJS"
11306then
Jack Jansene578a632001-08-15 01:27:14 +000011307 MACHDEP_OBJS=$extra_machdep_objs
11308else
11309 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011310fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011311if test -z "$MACHDEP_OBJS"; then
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11313$as_echo "none" >&6; }
11314else
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11316$as_echo "$MACHDEP_OBJS" >&6; }
11317fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011318
Guido van Rossum627b2d71993-12-24 10:39:16 +000011319# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011320for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011321 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011322 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011323 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011324 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011325 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011326 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011327 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011328 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011329 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011330 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011331 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011332 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011333 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011334 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11335 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011336 sigaction sigaltstack siginterrupt sigpending sigrelse \
11337 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011338 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011339 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011340 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011341do :
11342 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11343ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011344if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011346#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011347_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011348
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011349fi
11350done
11351
Michael W. Hudson54241132001-12-07 15:38:26 +000011352
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011353ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11354 #include <dirent.h>
11355"
11356if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11357
11358$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11359
11360fi
11361
11362
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011363# For some functions, having a definition is not sufficient, since
11364# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11366$as_echo_n "checking for chroot... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011369#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011370int
11371main ()
11372{
11373void *x=chroot
11374 ;
11375 return 0;
11376}
11377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011381
Matthias Kloseb159a552010-04-25 21:00:44 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011384else
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011387
11388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11391$as_echo_n "checking for link... " >&6; }
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011394#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011395int
11396main ()
11397{
11398void *x=link
11399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011406
Matthias Kloseb159a552010-04-25 21:00:44 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011409else
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011412
11413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11416$as_echo_n "checking for symlink... " >&6; }
11417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011418/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011419#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011420int
11421main ()
11422{
11423void *x=symlink
11424 ;
11425 return 0;
11426}
11427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011431
Matthias Kloseb159a552010-04-25 21:00:44 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011434else
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011437
11438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11441$as_echo_n "checking for fchdir... " >&6; }
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011443/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011444#include <unistd.h>
11445int
11446main ()
11447{
11448void *x=fchdir
11449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011456
Matthias Kloseb159a552010-04-25 21:00:44 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011459else
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011462
11463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11466$as_echo_n "checking for fsync... " >&6; }
11467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011468/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011469#include <unistd.h>
11470int
11471main ()
11472{
11473void *x=fsync
11474 ;
11475 return 0;
11476}
11477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011479
Matthias Kloseb9621712010-04-24 17:59:49 +000011480$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011481
Matthias Kloseb159a552010-04-25 21:00:44 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011483$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011484else
Matthias Kloseb9621712010-04-24 17:59:49 +000011485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11486$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011487
11488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11491$as_echo_n "checking for fdatasync... " >&6; }
11492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011493/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011494#include <unistd.h>
11495int
11496main ()
11497{
11498void *x=fdatasync
11499 ;
11500 return 0;
11501}
11502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011506
Matthias Kloseb159a552010-04-25 21:00:44 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011508$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011509else
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11511$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011512
11513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11516$as_echo_n "checking for epoll... " >&6; }
11517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011518/* end confdefs.h. */
11519#include <sys/epoll.h>
11520int
11521main ()
11522{
11523void *x=epoll_create
11524 ;
11525 return 0;
11526}
11527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011529
Matthias Kloseb9621712010-04-24 17:59:49 +000011530$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011531
Matthias Kloseb159a552010-04-25 21:00:44 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011533$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011534else
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11536$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011537
11538fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11541$as_echo_n "checking for epoll_create1... " >&6; }
11542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11543/* end confdefs.h. */
11544#include <sys/epoll.h>
11545int
11546main ()
11547{
11548void *x=epoll_create1
11549 ;
11550 return 0;
11551}
11552_ACEOF
11553if ac_fn_c_try_compile "$LINENO"; then :
11554
11555$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11556
11557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11558$as_echo "yes" >&6; }
11559else
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
11562
11563fi
11564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11566$as_echo_n "checking for kqueue... " >&6; }
11567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011568/* end confdefs.h. */
11569
11570#include <sys/types.h>
11571#include <sys/event.h>
11572
11573int
11574main ()
11575{
11576int x=kqueue()
11577 ;
11578 return 0;
11579}
11580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011581if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011584
Matthias Kloseb159a552010-04-25 21:00:44 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11589$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011590
11591fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11594$as_echo_n "checking for prlimit... " >&6; }
11595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11596/* end confdefs.h. */
11597
11598#include <sys/time.h>
11599#include <sys/resource.h>
11600
11601int
11602main ()
11603{
11604void *x=prlimit
11605 ;
11606 return 0;
11607}
11608_ACEOF
11609if ac_fn_c_try_compile "$LINENO"; then :
11610
11611$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11612
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11614$as_echo "yes" >&6; }
11615else
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
11618
11619fi
11620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11621
Martin v. Löwisd5843682002-11-21 20:41:28 +000011622# On some systems (eg. FreeBSD 5), we would find a definition of the
11623# functions ctermid_r, setgroups in the library, but no prototype
11624# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11625# address to avoid compiler warnings and potential miscompilations
11626# because of the missing prototypes.
11627
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11629$as_echo_n "checking for ctermid_r... " >&6; }
11630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011631/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011632
Martin v. Löwisd5843682002-11-21 20:41:28 +000011633#include <stdio.h>
11634
Martin v. Löwisd5843682002-11-21 20:41:28 +000011635int
11636main ()
11637{
11638void* p = ctermid_r
11639 ;
11640 return 0;
11641}
11642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011646
Matthias Kloseb159a552010-04-25 21:00:44 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011648$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011652
11653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11655
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11657$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011658if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011659 $as_echo_n "(cached) " >&6
11660else
11661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011662/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011663#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011664int
11665main ()
11666{
11667void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011668
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011674 ac_cv_flock_decl=yes
11675else
11676 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011677
11678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011680
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011681fi
11682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11683$as_echo "$ac_cv_flock_decl" >&6; }
11684if test "x${ac_cv_flock_decl}" = xyes; then
11685 for ac_func in flock
11686do :
11687 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011688if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011689 cat >>confdefs.h <<_ACEOF
11690#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011691_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011692
Antoine Pitroua3000072010-09-07 14:52:42 +000011693else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011695$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011696if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011697 $as_echo_n "(cached) " >&6
11698else
11699 ac_check_lib_save_LIBS=$LIBS
11700LIBS="-lbsd $LIBS"
11701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11702/* end confdefs.h. */
11703
11704/* Override any GCC internal prototype to avoid an error.
11705 Use char because int might match the return type of a GCC
11706 builtin and then its argument prototype would still apply. */
11707#ifdef __cplusplus
11708extern "C"
11709#endif
11710char flock ();
11711int
11712main ()
11713{
11714return flock ();
11715 ;
11716 return 0;
11717}
11718_ACEOF
11719if ac_fn_c_try_link "$LINENO"; then :
11720 ac_cv_lib_bsd_flock=yes
11721else
11722 ac_cv_lib_bsd_flock=no
11723fi
11724rm -f core conftest.err conftest.$ac_objext \
11725 conftest$ac_exeext conftest.$ac_ext
11726LIBS=$ac_check_lib_save_LIBS
11727fi
11728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11729$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011730if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011731 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011732
11733
11734$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11735
11736
11737fi
11738
11739
11740fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011741done
11742
Antoine Pitroua3000072010-09-07 14:52:42 +000011743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11746$as_echo_n "checking for getpagesize... " >&6; }
11747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011748/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011749
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011750#include <unistd.h>
11751
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011752int
11753main ()
11754{
11755void* p = getpagesize
11756 ;
11757 return 0;
11758}
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011761
Matthias Kloseb9621712010-04-24 17:59:49 +000011762$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011763
Matthias Kloseb159a552010-04-25 21:00:44 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011765$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11768$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011769
11770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011772
Victor Stinner984890f2011-11-24 13:53:38 +010011773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11774$as_echo_n "checking for broken unsetenv... " >&6; }
11775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11776/* end confdefs.h. */
11777
11778#include <stdlib.h>
11779
11780int
11781main ()
11782{
11783int res = unsetenv("DUMMY")
11784 ;
11785 return 0;
11786}
11787_ACEOF
11788if ac_fn_c_try_compile "$LINENO"; then :
11789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
11791else
11792
11793$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11794
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11796$as_echo "yes" >&6; }
11797
11798fi
11799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11800
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011801for ac_prog in true
11802do
11803 # Extract the first word of "$ac_prog", so it can be a program name with args.
11804set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011807if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011809else
11810 if test -n "$TRUE"; then
11811 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11812else
11813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11814for as_dir in $PATH
11815do
11816 IFS=$as_save_IFS
11817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011820 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 $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 +000011822 break 2
11823 fi
11824done
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011827
11828fi
11829fi
11830TRUE=$ac_cv_prog_TRUE
11831if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11833$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11836$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011837fi
11838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011840 test -n "$TRUE" && break
11841done
11842test -n "$TRUE" || TRUE="/bin/true"
11843
11844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11846$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011847if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011849else
11850 ac_check_lib_save_LIBS=$LIBS
11851LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011853/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011855/* Override any GCC internal prototype to avoid an error.
11856 Use char because int might match the return type of a GCC
11857 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011858#ifdef __cplusplus
11859extern "C"
11860#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011861char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011862int
11863main ()
11864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011866 ;
11867 return 0;
11868}
11869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011870if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011871 ac_cv_lib_c_inet_aton=yes
11872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011875rm -f core conftest.err conftest.$ac_objext \
11876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011877LIBS=$ac_check_lib_save_LIBS
11878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11880$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011881if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011882 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11885$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011888else
11889 ac_check_lib_save_LIBS=$LIBS
11890LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011892/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011894/* Override any GCC internal prototype to avoid an error.
11895 Use char because int might match the return type of a GCC
11896 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011897#ifdef __cplusplus
11898extern "C"
11899#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011900char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011901int
11902main ()
11903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011905 ;
11906 return 0;
11907}
11908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011910 ac_cv_lib_resolv_inet_aton=yes
11911else
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011914rm -f core conftest.err conftest.$ac_objext \
11915 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011916LIBS=$ac_check_lib_save_LIBS
11917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11919$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011920if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011921 cat >>confdefs.h <<_ACEOF
11922#define HAVE_LIBRESOLV 1
11923_ACEOF
11924
11925 LIBS="-lresolv $LIBS"
11926
11927fi
11928
11929
11930fi
11931
11932
Christian Heimesd0764e22007-12-04 15:00:33 +000011933# On Tru64, chflags seems to be present, but calling it will
11934# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11936$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011937if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011939else
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011941 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011944/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011945
Christian Heimesd0764e22007-12-04 15:00:33 +000011946#include <sys/stat.h>
11947#include <unistd.h>
11948int main(int argc, char*argv[])
11949{
11950 if(chflags(argv[0], 0) != 0)
11951 return 1;
11952 return 0;
11953}
Ned Deily3eb67d52011-06-28 00:00:28 -070011954
Christian Heimesd0764e22007-12-04 15:00:33 +000011955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011957 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011958else
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011963fi
11964
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11968$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011969if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011971if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011972 ac_cv_have_chflags="yes"
11973else
11974 ac_cv_have_chflags="no"
11975fi
11976
11977fi
11978if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011981
11982fi
11983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11985$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011986if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011990 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011993/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011994
Christian Heimesd0764e22007-12-04 15:00:33 +000011995#include <sys/stat.h>
11996#include <unistd.h>
11997int main(int argc, char*argv[])
11998{
11999 if(lchflags(argv[0], 0) != 0)
12000 return 1;
12001 return 0;
12002}
Ned Deily3eb67d52011-06-28 00:00:28 -070012003
Christian Heimesd0764e22007-12-04 15:00:33 +000012004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012006 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012012fi
12013
12014
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12017$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012018if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012020if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012021 ac_cv_have_lchflags="yes"
12022else
12023 ac_cv_have_lchflags="no"
12024fi
12025
12026fi
12027if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012030
12031fi
12032
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012033case $ac_sys_system/$ac_sys_release in
12034Darwin/*)
12035 _CUR_CFLAGS="${CFLAGS}"
12036 _CUR_LDFLAGS="${LDFLAGS}"
12037 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12038 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12039 ;;
12040esac
12041
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12043$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012044if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012046else
12047 ac_check_lib_save_LIBS=$LIBS
12048LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012050/* end confdefs.h. */
12051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052/* Override any GCC internal prototype to avoid an error.
12053 Use char because int might match the return type of a GCC
12054 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012055#ifdef __cplusplus
12056extern "C"
12057#endif
12058char inflateCopy ();
12059int
12060main ()
12061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012063 ;
12064 return 0;
12065}
12066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012068 ac_cv_lib_z_inflateCopy=yes
12069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012072rm -f core conftest.err conftest.$ac_objext \
12073 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012074LIBS=$ac_check_lib_save_LIBS
12075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12077$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012078if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012081
12082fi
12083
12084
12085case $ac_sys_system/$ac_sys_release in
12086Darwin/*)
12087 CFLAGS="${_CUR_CFLAGS}"
12088 LDFLAGS="${_CUR_LDFLAGS}"
12089 ;;
12090esac
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12093$as_echo_n "checking for hstrerror... " >&6; }
12094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012095/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012096
Martin v. Löwise9416172003-05-03 10:12:45 +000012097#include <netdb.h>
12098
Martin v. Löwise9416172003-05-03 10:12:45 +000012099int
12100main ()
12101{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012102void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012103 ;
12104 return 0;
12105}
12106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012108
Matthias Kloseb9621712010-04-24 17:59:49 +000012109$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012110
Matthias Kloseb159a552010-04-25 21:00:44 +000012111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012113else
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012116
12117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118rm -f core conftest.err conftest.$ac_objext \
12119 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12122$as_echo_n "checking for inet_aton... " >&6; }
12123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012124/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012125
Martin v. Löwis86d66262006-02-17 08:40:11 +000012126#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012127#include <sys/socket.h>
12128#include <netinet/in.h>
12129#include <arpa/inet.h>
12130
Martin v. Löwise9416172003-05-03 10:12:45 +000012131int
12132main ()
12133{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012134void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012135 ;
12136 return 0;
12137}
12138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012139if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012142
Matthias Kloseb159a552010-04-25 21:00:44 +000012143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12147$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012148
12149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012150rm -f core conftest.err conftest.$ac_objext \
12151 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12154$as_echo_n "checking for inet_pton... " >&6; }
12155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012156/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012157
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012158#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012159#include <sys/socket.h>
12160#include <netinet/in.h>
12161#include <arpa/inet.h>
12162
Martin v. Löwise9416172003-05-03 10:12:45 +000012163int
12164main ()
12165{
12166void* p = inet_pton
12167 ;
12168 return 0;
12169}
12170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012174
Matthias Kloseb159a552010-04-25 21:00:44 +000012175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012176$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12179$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012180
12181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012183
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012184# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12186$as_echo_n "checking for setgroups... " >&6; }
12187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012189
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012190#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012191#ifdef HAVE_GRP_H
12192#include <grp.h>
12193#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012194
Martin v. Löwisd5843682002-11-21 20:41:28 +000012195int
12196main ()
12197{
12198void* p = setgroups
12199 ;
12200 return 0;
12201}
12202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012204
Matthias Kloseb9621712010-04-24 17:59:49 +000012205$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012206
Matthias Kloseb159a552010-04-25 21:00:44 +000012207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012208$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012209else
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12211$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012212
12213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012215
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012216# check for openpty and forkpty
12217
12218for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012219do :
12220 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012224_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012225
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12228$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012229if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012231else
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237/* Override any GCC internal prototype to avoid an error.
12238 Use char because int might match the return type of a GCC
12239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012240#ifdef __cplusplus
12241extern "C"
12242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012243char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012244int
12245main ()
12246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012248 ;
12249 return 0;
12250}
12251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012252if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012253 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012254else
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012257rm -f core conftest.err conftest.$ac_objext \
12258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012259LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12262$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012263if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012265 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012266else
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12268$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012271else
12272 ac_check_lib_save_LIBS=$LIBS
12273LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012275/* end confdefs.h. */
12276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012277/* Override any GCC internal prototype to avoid an error.
12278 Use char because int might match the return type of a GCC
12279 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012280#ifdef __cplusplus
12281extern "C"
12282#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012283char openpty ();
12284int
12285main ()
12286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012288 ;
12289 return 0;
12290}
12291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012292if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012293 ac_cv_lib_bsd_openpty=yes
12294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012297rm -f core conftest.err conftest.$ac_objext \
12298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012299LIBS=$ac_check_lib_save_LIBS
12300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12302$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012303if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012305 LIBS="$LIBS -lbsd"
12306fi
12307
12308
12309fi
12310
Fred Drake8cef4cf2000-06-28 16:40:38 +000012311
12312fi
12313done
12314
12315for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012316do :
12317 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012318if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012320#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012321_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012322
Fred Drake8cef4cf2000-06-28 16:40:38 +000012323else
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12325$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012326if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012328else
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012330LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334/* Override any GCC internal prototype to avoid an error.
12335 Use char because int might match the return type of a GCC
12336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012337#ifdef __cplusplus
12338extern "C"
12339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012340char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012341int
12342main ()
12343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 ;
12346 return 0;
12347}
12348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012350 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012351else
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012354rm -f core conftest.err conftest.$ac_objext \
12355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012356LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12359$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012360if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012362 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012363else
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12365$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012366if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012368else
12369 ac_check_lib_save_LIBS=$LIBS
12370LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012372/* end confdefs.h. */
12373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374/* Override any GCC internal prototype to avoid an error.
12375 Use char because int might match the return type of a GCC
12376 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012377#ifdef __cplusplus
12378extern "C"
12379#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012380char forkpty ();
12381int
12382main ()
12383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012385 ;
12386 return 0;
12387}
12388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012389if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012390 ac_cv_lib_bsd_forkpty=yes
12391else
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012394rm -f core conftest.err conftest.$ac_objext \
12395 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012396LIBS=$ac_check_lib_save_LIBS
12397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12399$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012400if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012402 LIBS="$LIBS -lbsd"
12403fi
12404
12405
12406fi
12407
Fred Drake8cef4cf2000-06-28 16:40:38 +000012408
12409fi
12410done
12411
Jack Jansendd19cf82001-12-06 22:36:17 +000012412
Christian Heimesb186d002008-03-18 15:15:01 +000012413# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012414for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012415do :
12416 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012419#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012420_ACEOF
12421
12422fi
12423done
12424
12425
Michael W. Hudson54241132001-12-07 15:38:26 +000012426# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012427for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012428do :
12429 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12430ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012431if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012433#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012434_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012435
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012437done
12438
Michael W. Hudson54241132001-12-07 15:38:26 +000012439
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012440ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012441if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012442 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012443
Martin v. Löwis1142de32002-03-29 16:28:31 +000012444else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012446 *" dup2.$ac_objext "* ) ;;
12447 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012449esac
12450
Martin v. Löwis1142de32002-03-29 16:28:31 +000012451fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012452
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012453ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012454if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012455 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12456
12457else
12458 case " $LIBOBJS " in
12459 *" strdup.$ac_objext "* ) ;;
12460 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12461 ;;
12462esac
12463
12464fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012465
12466
12467for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012468do :
12469 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012475/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012488
Guido van Rossum627b2d71993-12-24 10:39:16 +000012489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012491
Guido van Rossum627b2d71993-12-24 10:39:16 +000012492fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012493done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012494
Jack Jansen150753c2003-03-29 22:07:47 +000012495for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012496do :
12497 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012498if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012499 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012500#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012503/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012504#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012505int
12506main ()
12507{
12508setpgrp(0,0);
12509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012514
Matthias Kloseb9621712010-04-24 17:59:49 +000012515$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012516
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012519
12520fi
12521done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012522
Thomas Wouters3a584202000-08-05 23:28:51 +000012523for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012524do :
12525 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012526if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012531/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012532#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012533int
12534main ()
12535{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 ;
12538 return 0;
12539}
12540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012541if ac_fn_c_try_compile "$LINENO"; then :
12542
Guido van Rossum627b2d71993-12-24 10:39:16 +000012543else
Skip Montanaro6dead952003-09-25 14:50:04 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012546
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
Guido van Rossum627b2d71993-12-24 10:39:16 +000012548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012550
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012551fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012552done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553
Michael W. Hudson54241132001-12-07 15:38:26 +000012554
Victor Stinnere0be4232011-10-25 13:06:09 +020012555for ac_func in clock_gettime
12556do :
12557 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12558if test "x$ac_cv_func_clock_gettime" = xyes; then :
12559 cat >>confdefs.h <<_ACEOF
12560#define HAVE_CLOCK_GETTIME 1
12561_ACEOF
12562
12563else
12564
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12566$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12567if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12568 $as_echo_n "(cached) " >&6
12569else
12570 ac_check_lib_save_LIBS=$LIBS
12571LIBS="-lrt $LIBS"
12572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12573/* end confdefs.h. */
12574
12575/* Override any GCC internal prototype to avoid an error.
12576 Use char because int might match the return type of a GCC
12577 builtin and then its argument prototype would still apply. */
12578#ifdef __cplusplus
12579extern "C"
12580#endif
12581char clock_gettime ();
12582int
12583main ()
12584{
12585return clock_gettime ();
12586 ;
12587 return 0;
12588}
12589_ACEOF
12590if ac_fn_c_try_link "$LINENO"; then :
12591 ac_cv_lib_rt_clock_gettime=yes
12592else
12593 ac_cv_lib_rt_clock_gettime=no
12594fi
12595rm -f core conftest.err conftest.$ac_objext \
12596 conftest$ac_exeext conftest.$ac_ext
12597LIBS=$ac_check_lib_save_LIBS
12598fi
12599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12600$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12601if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12602
Victor Stinner7efb8332014-08-29 15:41:08 +020012603 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012604 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12605
12606
12607$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12608
12609
12610fi
12611
12612
12613fi
12614done
12615
12616
12617for ac_func in clock_getres
12618do :
12619 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12620if test "x$ac_cv_func_clock_getres" = xyes; then :
12621 cat >>confdefs.h <<_ACEOF
12622#define HAVE_CLOCK_GETRES 1
12623_ACEOF
12624
12625else
12626
12627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12628$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12629if ${ac_cv_lib_rt_clock_getres+:} false; then :
12630 $as_echo_n "(cached) " >&6
12631else
12632 ac_check_lib_save_LIBS=$LIBS
12633LIBS="-lrt $LIBS"
12634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12635/* end confdefs.h. */
12636
12637/* Override any GCC internal prototype to avoid an error.
12638 Use char because int might match the return type of a GCC
12639 builtin and then its argument prototype would still apply. */
12640#ifdef __cplusplus
12641extern "C"
12642#endif
12643char clock_getres ();
12644int
12645main ()
12646{
12647return clock_getres ();
12648 ;
12649 return 0;
12650}
12651_ACEOF
12652if ac_fn_c_try_link "$LINENO"; then :
12653 ac_cv_lib_rt_clock_getres=yes
12654else
12655 ac_cv_lib_rt_clock_getres=no
12656fi
12657rm -f core conftest.err conftest.$ac_objext \
12658 conftest$ac_exeext conftest.$ac_ext
12659LIBS=$ac_check_lib_save_LIBS
12660fi
12661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12662$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12663if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12664
12665 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12666
12667
12668fi
12669
12670
12671fi
12672done
12673
12674
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012675for ac_func in clock_settime
12676do :
12677 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12678if test "x$ac_cv_func_clock_settime" = xyes; then :
12679 cat >>confdefs.h <<_ACEOF
12680#define HAVE_CLOCK_SETTIME 1
12681_ACEOF
12682
12683else
12684
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12686$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12687if ${ac_cv_lib_rt_clock_settime+:} false; then :
12688 $as_echo_n "(cached) " >&6
12689else
12690 ac_check_lib_save_LIBS=$LIBS
12691LIBS="-lrt $LIBS"
12692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693/* end confdefs.h. */
12694
12695/* Override any GCC internal prototype to avoid an error.
12696 Use char because int might match the return type of a GCC
12697 builtin and then its argument prototype would still apply. */
12698#ifdef __cplusplus
12699extern "C"
12700#endif
12701char clock_settime ();
12702int
12703main ()
12704{
12705return clock_settime ();
12706 ;
12707 return 0;
12708}
12709_ACEOF
12710if ac_fn_c_try_link "$LINENO"; then :
12711 ac_cv_lib_rt_clock_settime=yes
12712else
12713 ac_cv_lib_rt_clock_settime=no
12714fi
12715rm -f core conftest.err conftest.$ac_objext \
12716 conftest$ac_exeext conftest.$ac_ext
12717LIBS=$ac_check_lib_save_LIBS
12718fi
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12720$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12721if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12722
12723 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12724
12725
12726fi
12727
12728
12729fi
12730done
12731
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12734$as_echo_n "checking for major... " >&6; }
12735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012736/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012737
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012738#if defined(MAJOR_IN_MKDEV)
12739#include <sys/mkdev.h>
12740#elif defined(MAJOR_IN_SYSMACROS)
12741#include <sys/sysmacros.h>
12742#else
12743#include <sys/types.h>
12744#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012745
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012746int
12747main ()
12748{
12749
12750 makedev(major(0),minor(0));
12751
12752 ;
12753 return 0;
12754}
12755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012756if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012757
12758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12762$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012763
12764else
Skip Montanaro6dead952003-09-25 14:50:04 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12767$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012768
12769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012770rm -f core conftest.err conftest.$ac_objext \
12771 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012772
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012773# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12774# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12776$as_echo_n "checking for if_nameindex... " >&6; }
12777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12778/* end confdefs.h. */
12779
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012780#include <stdio.h>
12781#ifdef STDC_HEADERS
12782# include <stdlib.h>
12783# include <stddef.h>
12784#else
12785# ifdef HAVE_STDLIB_H
12786# include <stdlib.h>
12787# endif
12788#endif
12789#ifdef HAVE_SYS_SOCKET_H
12790# include <sys/socket.h>
12791#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012792#ifdef HAVE_NET_IF_H
12793# include <net/if.h>
12794#endif
12795
12796int
12797main ()
12798{
12799struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12800 ;
12801 return 0;
12802}
12803_ACEOF
12804if ac_fn_c_try_link "$LINENO"; then :
12805
12806$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12807
12808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12809$as_echo "yes" >&6; }
12810else
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12812$as_echo "no" >&6; }
12813
12814fi
12815rm -f core conftest.err conftest.$ac_objext \
12816 conftest$ac_exeext conftest.$ac_ext
12817
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012818# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12819# macro is not defined in android-ndk-r13.
12820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12821$as_echo_n "checking for lockf... " >&6; }
12822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12823/* end confdefs.h. */
12824#include <unistd.h>
12825int
12826main ()
12827{
12828lockf(0, F_LOCK, 0);
12829 ;
12830 return 0;
12831}
12832_ACEOF
12833if ac_fn_c_try_link "$LINENO"; then :
12834
12835$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12836
12837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12838$as_echo "yes" >&6; }
12839else
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12841$as_echo "no" >&6; }
12842
12843fi
12844rm -f core conftest.err conftest.$ac_objext \
12845 conftest$ac_exeext conftest.$ac_ext
12846
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012847# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012848# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12850$as_echo_n "checking for getaddrinfo... " >&6; }
12851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012852/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012853
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012854#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012855#include <sys/socket.h>
12856#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012857#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012858
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012862getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 ;
12864 return 0;
12865}
12866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012868 have_getaddrinfo=yes
12869else
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012872rm -f core conftest.err conftest.$ac_objext \
12873 conftest$ac_exeext conftest.$ac_ext
12874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12875$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012876if test $have_getaddrinfo = yes
12877then
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12879$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012880 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012882else
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012884
12885if test "${enable_ipv6+set}" = set; then
12886 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12887else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012888 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012889fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012892/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012893
Stefan Krah19c21392012-11-22 23:47:32 +010012894#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012895#include <sys/types.h>
12896#include <netdb.h>
12897#include <string.h>
12898#include <sys/socket.h>
12899#include <netinet/in.h>
12900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012901int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012902{
12903 int passive, gaierr, inet4 = 0, inet6 = 0;
12904 struct addrinfo hints, *ai, *aitop;
12905 char straddr[INET6_ADDRSTRLEN], strport[16];
12906
12907 for (passive = 0; passive <= 1; passive++) {
12908 memset(&hints, 0, sizeof(hints));
12909 hints.ai_family = AF_UNSPEC;
12910 hints.ai_flags = passive ? AI_PASSIVE : 0;
12911 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012912 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012913 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12914 (void)gai_strerror(gaierr);
12915 goto bad;
12916 }
12917 for (ai = aitop; ai; ai = ai->ai_next) {
12918 if (ai->ai_addr == NULL ||
12919 ai->ai_addrlen == 0 ||
12920 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12921 straddr, sizeof(straddr), strport, sizeof(strport),
12922 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12923 goto bad;
12924 }
12925 switch (ai->ai_family) {
12926 case AF_INET:
12927 if (strcmp(strport, "54321") != 0) {
12928 goto bad;
12929 }
12930 if (passive) {
12931 if (strcmp(straddr, "0.0.0.0") != 0) {
12932 goto bad;
12933 }
12934 } else {
12935 if (strcmp(straddr, "127.0.0.1") != 0) {
12936 goto bad;
12937 }
12938 }
12939 inet4++;
12940 break;
12941 case AF_INET6:
12942 if (strcmp(strport, "54321") != 0) {
12943 goto bad;
12944 }
12945 if (passive) {
12946 if (strcmp(straddr, "::") != 0) {
12947 goto bad;
12948 }
12949 } else {
12950 if (strcmp(straddr, "::1") != 0) {
12951 goto bad;
12952 }
12953 }
12954 inet6++;
12955 break;
12956 case AF_UNSPEC:
12957 goto bad;
12958 break;
12959 default:
12960 /* another family support? */
12961 break;
12962 }
12963 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012964 freeaddrinfo(aitop);
12965 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012966 }
12967
12968 if (!(inet4 == 0 || inet4 == 2))
12969 goto bad;
12970 if (!(inet6 == 0 || inet6 == 2))
12971 goto bad;
12972
12973 if (aitop)
12974 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012975 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012976
12977 bad:
12978 if (aitop)
12979 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012980 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012981}
12982
Martin v. Löwis11437992002-04-12 09:54:03 +000012983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012984if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012985 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986else
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012992
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012993fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012994
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12998$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12999
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013000if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013001then
13002 if test $ipv6 = yes
13003 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004 echo 'Fatal: You must get working getaddrinfo() function.'
13005 echo ' or you can specify "--disable-ipv6"'.
13006 exit 1
13007 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013008else
Martin v. Löwis11437992002-04-12 09:54:03 +000013009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013011
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013012fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013013
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013014for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013015do :
13016 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013017if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013019#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013020_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013022fi
13023done
13024
Michael W. Hudson54241132001-12-07 15:38:26 +000013025
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013026# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13028$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013029if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013033/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013034#include <sys/types.h>
13035#include <sys/time.h>
13036#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
Martin v. Löwis11437992002-04-12 09:54:03 +000013038int
13039main ()
13040{
13041if ((struct tm *) 0)
13042return 0;
13043 ;
13044 return 0;
13045}
13046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13055$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013056if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059
13060fi
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13063$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013064if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013066else
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013068/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069#include <sys/types.h>
13070#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072int
13073main ()
13074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075struct tm tm;
13076 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 ;
13079 return 0;
13080}
13081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013082if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083 ac_cv_struct_tm=time.h
13084else
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13090$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013091if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013094
13095fi
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097ac_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 +000013098#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100"
Victor Stinnere0be4232011-10-25 13:06:09 +020013101if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013102
13103cat >>confdefs.h <<_ACEOF
13104#define HAVE_STRUCT_TM_TM_ZONE 1
13105_ACEOF
13106
13107
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113
13114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13116"
Victor Stinnere0be4232011-10-25 13:06:09 +020013117if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013119else
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121fi
13122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013125_ACEOF
13126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13128$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013129if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013134#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135#if !HAVE_DECL_TZNAME
13136extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013138
Martin v. Löwis11437992002-04-12 09:54:03 +000013139int
13140main ()
13141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 ;
13144 return 0;
13145}
13146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013147if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148 ac_cv_var_tzname=yes
13149else
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013152rm -f core conftest.err conftest.$ac_objext \
13153 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13156$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013157 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013160
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013161 fi
13162fi
13163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164ac_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 +020013165if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013166
13167cat >>confdefs.h <<_ACEOF
13168#define HAVE_STRUCT_STAT_ST_RDEV 1
13169_ACEOF
13170
13171
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013172fi
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174ac_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 +020013175if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013176
Martin v. Löwis11437992002-04-12 09:54:03 +000013177cat >>confdefs.h <<_ACEOF
13178#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13179_ACEOF
13180
13181
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013182fi
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184ac_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 +020013185if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013186
13187cat >>confdefs.h <<_ACEOF
13188#define HAVE_STRUCT_STAT_ST_FLAGS 1
13189_ACEOF
13190
13191
13192fi
13193
Matthias Kloseb9621712010-04-24 17:59:49 +000013194ac_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 +020013195if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013196
13197cat >>confdefs.h <<_ACEOF
13198#define HAVE_STRUCT_STAT_ST_GEN 1
13199_ACEOF
13200
13201
13202fi
13203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204ac_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 +020013205if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013206
13207cat >>confdefs.h <<_ACEOF
13208#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13209_ACEOF
13210
13211
13212fi
13213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214ac_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 +020013215if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013216
Martin v. Löwis11437992002-04-12 09:54:03 +000013217cat >>confdefs.h <<_ACEOF
13218#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13219_ACEOF
13220
13221
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013222fi
13223
Stefan Krah267b6392016-04-26 01:09:18 +020013224ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13225 #include <sys/types.h>
13226 #include <pwd.h>
13227
13228"
13229if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13230
13231cat >>confdefs.h <<_ACEOF
13232#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13233_ACEOF
13234
13235
13236fi
13237ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13238 #include <sys/types.h>
13239 #include <pwd.h>
13240
13241"
13242if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13243
13244cat >>confdefs.h <<_ACEOF
13245#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13246_ACEOF
13247
13248
13249fi
13250
Zachary Ware6a6967e2016-10-01 00:47:27 -050013251# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13252ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13253"
13254if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13255
13256cat >>confdefs.h <<_ACEOF
13257#define HAVE_SIGINFO_T_SI_BAND 1
13258_ACEOF
13259
13260
13261fi
13262
Michael W. Hudson54241132001-12-07 15:38:26 +000013263
Matthias Kloseb9621712010-04-24 17:59:49 +000013264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13265$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013266if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268else
Matthias Kloseb159a552010-04-25 21:00:44 +000013269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013271/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013272#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013273int
13274main ()
13275{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 ;
13278 return 0;
13279}
13280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013282 ac_cv_header_time_altzone=yes
13283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288fi
13289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13291$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013292if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013295
13296fi
13297
Guido van Rossumda88dad1995-01-26 00:46:29 +000013298was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13300$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013302/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013303
13304#include <sys/types.h>
13305#include <sys/select.h>
13306#include <sys/time.h>
13307
Martin v. Löwis11437992002-04-12 09:54:03 +000013308int
13309main ()
13310{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 ;
13313 return 0;
13314}
13315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013321 was_it_defined=yes
13322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13326$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13329$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013330if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013334/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013335#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013336int
13337main ()
13338{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013339struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 ;
13341 return 0;
13342}
13343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013345 ac_cv_struct_addrinfo=yes
13346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13350fi
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13353$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013354if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013357
13358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13361$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013367
13368# include <sys/types.h>
13369# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013370int
13371main ()
13372{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013373struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013379 ac_cv_struct_sockaddr_storage=yes
13380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13384fi
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13387$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013388if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013391
13392fi
13393
Christian Heimesdffa3942016-09-05 23:54:41 +020013394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13395$as_echo_n "checking for sockaddr_alg... " >&6; }
13396if ${ac_cv_struct_sockaddr_alg+:} false; then :
13397 $as_echo_n "(cached) " >&6
13398else
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400/* end confdefs.h. */
13401
13402# include <sys/types.h>
13403# include <sys/socket.h>
13404# include <linux/if_alg.h>
13405int
13406main ()
13407{
13408struct sockaddr_alg s
13409 ;
13410 return 0;
13411}
13412_ACEOF
13413if ac_fn_c_try_compile "$LINENO"; then :
13414 ac_cv_struct_sockaddr_alg=yes
13415else
13416 ac_cv_struct_sockaddr_alg=no
13417fi
13418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13419fi
13420
13421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13422$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13423if test $ac_cv_struct_sockaddr_alg = yes; then
13424
13425$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13426
13427fi
13428
Guido van Rossum627b2d71993-12-24 10:39:16 +000013429# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13432$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013433if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013435else
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
13442static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013443test_array [0] = 0;
13444return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
13446 ;
13447 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013448}
Martin v. Löwis11437992002-04-12 09:54:03 +000013449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013450if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013451 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13458$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013461
13462fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13465$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013466if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013470/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472int
13473main ()
13474{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013475
Martin v. Löwis11437992002-04-12 09:54:03 +000013476#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013477 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013478 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013479 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481 char const *const *pcpcc;
13482 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 /* NEC SVR4.0.2 mips cc rejects this. */
13484 struct point {int x, y;};
13485 static struct point const zero = {0,0};
13486 /* AIX XL C 1.02.0.0 rejects this.
13487 It does not let you subtract one const X* pointer from another in
13488 an arm of an if-expression whose if-part is not a constant
13489 expression */
13490 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013491 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013493 ++pcpcc;
13494 ppc = (char**) pcpcc;
13495 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013496 { /* SCO 3.2v4 cc rejects this sort of thing. */
13497 char tx;
13498 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 }
13504 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13505 int x[] = {25, 17};
13506 const int *foo = &x[0];
13507 ++foo;
13508 }
13509 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13510 typedef const int *iptr;
13511 iptr p = 0;
13512 ++p;
13513 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013514 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013516 struct s { int j; const int *ap[3]; } bx;
13517 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 }
13519 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13520 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013521 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013523 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013524#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013528}
Martin v. Löwis11437992002-04-12 09:54:03 +000013529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531 ac_cv_c_const=yes
13532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13538$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542
13543fi
13544
Michael W. Hudson54241132001-12-07 15:38:26 +000013545
Guido van Rossumda88dad1995-01-26 00:46:29 +000013546works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13548$as_echo_n "checking for working signed char... " >&6; }
13549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013550/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552int
13553main ()
13554{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013555signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 ;
13557 return 0;
13558}
13559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013560if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013561 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013562else
Skip Montanaro6dead952003-09-25 14:50:04 +000013563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013565
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013566
Guido van Rossum7f43da71994-08-01 12:15:30 +000013567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13570$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013571
Guido van Rossumda88dad1995-01-26 00:46:29 +000013572have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13574$as_echo_n "checking for prototypes... " >&6; }
13575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013576/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013577int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013578int
13579main ()
13580{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013581return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
13584}
13585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013589
Matthias Kloseb159a552010-04-25 21:00:44 +000013590 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13594$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013595
Guido van Rossumda88dad1995-01-26 00:46:29 +000013596works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13598$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013600/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013601
13602#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013603int foo(int x, ...) {
13604 va_list va;
13605 va_start(va, x);
13606 va_arg(va, int);
13607 va_arg(va, char *);
13608 va_arg(va, double);
13609 return 0;
13610}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612int
13613main ()
13614{
Guido van Rossum90eea071996-08-30 20:58:57 +000013615return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013616 ;
13617 return 0;
13618}
13619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013621
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013625 works=yes
13626
Guido van Rossum627b2d71993-12-24 10:39:16 +000013627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13630$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631
Martin v. Löwisd6320502004-08-12 13:45:08 +000013632# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13634$as_echo_n "checking for socketpair... " >&6; }
13635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013636/* end confdefs.h. */
13637
13638#include <sys/types.h>
13639#include <sys/socket.h>
13640
13641int
13642main ()
13643{
13644void *x=socketpair
13645 ;
13646 return 0;
13647}
13648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013649if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013652
Matthias Kloseb159a552010-04-25 21:00:44 +000013653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013654$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13657$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013658
13659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013661
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013662# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13664$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013666/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013667#include <sys/types.h>
13668#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013669int
13670main ()
13671{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013672struct sockaddr x;
13673x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 ;
13675 return 0;
13676}
13677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013678if ac_fn_c_try_compile "$LINENO"; then :
13679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13680$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013683
13684else
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13686$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013687
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013691# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
13693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013695if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13700$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013701 OLD_CFLAGS=$CFLAGS
13702 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013704/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013705
13706# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
Martin v. Löwis11437992002-04-12 09:54:03 +000013708int
13709main ()
13710{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013711
13712 char *name;
13713 struct hostent *he, *res;
13714 char buffer[2048];
13715 int buflen = 2048;
13716 int h_errnop;
13717
13718 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
13720 ;
13721 return 0;
13722}
13723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013727
Martin v. Löwis11437992002-04-12 09:54:03 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13732$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013734else
Skip Montanaro6dead952003-09-25 14:50:04 +000013735
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13737$as_echo "no" >&6; }
13738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13739$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013741/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013743# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
Martin v. Löwis11437992002-04-12 09:54:03 +000013745int
13746main ()
13747{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013748
13749 char *name;
13750 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013751 char buffer[2048];
13752 int buflen = 2048;
13753 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013754
Matthias Kloseb159a552010-04-25 21:00:44 +000013755 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
13757 ;
13758 return 0;
13759}
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013762
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013764
Martin v. Löwis11437992002-04-12 09:54:03 +000013765
Matthias Kloseb159a552010-04-25 21:00:44 +000013766$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013767
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13769$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013771else
Skip Montanaro6dead952003-09-25 14:50:04 +000013772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13774$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13776$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13778/* end confdefs.h. */
13779
13780# include <netdb.h>
13781
13782int
13783main ()
13784{
13785
13786 char *name;
13787 struct hostent *he;
13788 struct hostent_data data;
13789
13790 (void) gethostbyname_r(name, he, &data);
13791
13792 ;
13793 return 0;
13794}
13795_ACEOF
13796if ac_fn_c_try_compile "$LINENO"; then :
13797
13798 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13799
13800
13801$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13802
13803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13804$as_echo "yes" >&6; }
13805
13806else
13807
13808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13809$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013810
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013813
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013819 CFLAGS=$OLD_CFLAGS
13820
13821else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 for ac_func in gethostbyname
13824do :
13825 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013826if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013828#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013829_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013830
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013831fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013832done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013833
Michael W. Hudson54241132001-12-07 15:38:26 +000013834
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013835fi
13836
Michael W. Hudson54241132001-12-07 15:38:26 +000013837
13838
13839
13840
13841
13842
Guido van Rossum627b2d71993-12-24 10:39:16 +000013843# checks for system services
13844# (none yet)
13845
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013847ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013848if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013849
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13852$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013853if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013855else
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013857LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861/* Override any GCC internal prototype to avoid an error.
13862 Use char because int might match the return type of a GCC
13863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013864#ifdef __cplusplus
13865extern "C"
13866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013867char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013868int
13869main ()
13870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 ;
13873 return 0;
13874}
13875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013877 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013878else
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013881rm -f core conftest.err conftest.$ac_objext \
13882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013883LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13886$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013887if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013888 cat >>confdefs.h <<_ACEOF
13889#define HAVE_LIBIEEE 1
13890_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013892 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013893
Guido van Rossum627b2d71993-12-24 10:39:16 +000013894fi
13895
Michael W. Hudson54241132001-12-07 15:38:26 +000013896
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013897fi
13898
Michael W. Hudson54241132001-12-07 15:38:26 +000013899
Guido van Rossum7f253911997-05-09 02:42:48 +000013900# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13902$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013905if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013907if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013908then
13909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13913$as_echo "yes" >&6; }
13914else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13915$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013916fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13919$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920fi
13921
Guido van Rossum7f253911997-05-09 02:42:48 +000013922
Guido van Rossum7f43da71994-08-01 12:15:30 +000013923# check for --with-libm=...
13924
Guido van Rossum563e7081996-09-10 18:20:48 +000013925case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013926Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013927*) LIBM=-lm
13928esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13930$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013933if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013935if test "$withval" = no
13936then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13938$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013939elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013940then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13942$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013943else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013944fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013945else
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13947$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948fi
13949
Guido van Rossum7f43da71994-08-01 12:15:30 +000013950
13951# check for --with-libc=...
13952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13954$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013959if test "$withval" = no
13960then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13962$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013963elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013964then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13966$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013967else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013968fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13971$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972fi
13973
Guido van Rossum7f43da71994-08-01 12:15:30 +000013974
Stefan Krah1919b7e2012-03-21 18:25:23 +010013975# **************************************
13976# * Check for gcc x64 inline assembler *
13977# **************************************
13978
13979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13980$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13982/* end confdefs.h. */
13983
13984int
13985main ()
13986{
13987
13988 __asm__ __volatile__ ("movq %rcx, %rax");
13989
13990 ;
13991 return 0;
13992}
13993_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013994if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013995 have_gcc_asm_for_x64=yes
13996else
13997 have_gcc_asm_for_x64=no
13998fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013999rm -f core conftest.err conftest.$ac_objext \
14000 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14002$as_echo "$have_gcc_asm_for_x64" >&6; }
14003if test "$have_gcc_asm_for_x64" = yes
14004then
14005
14006$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14007
14008fi
14009
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014010# **************************************************
14011# * Check for various properties of floating point *
14012# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
14015$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014016if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014018else
14019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014021 ac_cv_little_endian_double=no
14022else
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014024/* end confdefs.h. */
14025
14026#include <string.h>
14027int main() {
14028 double x = 9006104071832581.0;
14029 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
14030 return 0;
14031 else
14032 return 1;
14033}
14034
14035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014036if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014037 ac_cv_little_endian_double=yes
14038else
Matthias Kloseb9621712010-04-24 17:59:49 +000014039 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014043fi
14044
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014045fi
14046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14048$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014049if test "$ac_cv_little_endian_double" = yes
14050then
14051
Matthias Kloseb9621712010-04-24 17:59:49 +000014052$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014053
14054fi
14055
Matthias Kloseb9621712010-04-24 17:59:49 +000014056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14057$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014058if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014060else
14061
Matthias Kloseb9621712010-04-24 17:59:49 +000014062if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014063 ac_cv_big_endian_double=no
14064else
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014066/* end confdefs.h. */
14067
14068#include <string.h>
14069int main() {
14070 double x = 9006104071832581.0;
14071 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14072 return 0;
14073 else
14074 return 1;
14075}
14076
14077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014078if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014079 ac_cv_big_endian_double=yes
14080else
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14084 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014085fi
14086
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087fi
14088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14090$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014091if test "$ac_cv_big_endian_double" = yes
14092then
14093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014095
14096fi
14097
14098# Some ARM platforms use a mixed-endian representation for doubles.
14099# While Python doesn't currently have full support for these platforms
14100# (see e.g., issue 1762561), we can at least make sure that float <-> string
14101# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14103$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014104if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014106else
14107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014109 ac_cv_mixed_endian_double=no
14110else
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014112/* end confdefs.h. */
14113
14114#include <string.h>
14115int main() {
14116 double x = 9006104071832581.0;
14117 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14118 return 0;
14119 else
14120 return 1;
14121}
14122
14123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014124if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014125 ac_cv_mixed_endian_double=yes
14126else
Matthias Kloseb9621712010-04-24 17:59:49 +000014127 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014131fi
14132
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014133fi
14134
Matthias Kloseb9621712010-04-24 17:59:49 +000014135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14136$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014137if test "$ac_cv_mixed_endian_double" = yes
14138then
14139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014141
14142fi
14143
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014144# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014145# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014146# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014147# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014148# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014149# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014150
14151# This inline assembler syntax may also work for suncc and icc,
14152# so we try it on all platforms.
14153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14155$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014157/* end confdefs.h. */
14158
14159int
14160main ()
14161{
14162
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014163 unsigned short cw;
14164 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14165 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014166
14167 ;
14168 return 0;
14169}
14170_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014171if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014172 have_gcc_asm_for_x87=yes
14173else
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014175fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014176rm -f core conftest.err conftest.$ac_objext \
14177 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14179$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014180if test "$have_gcc_asm_for_x87" = yes
14181then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014184
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014186
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14188$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14190/* end confdefs.h. */
14191
14192int
14193main ()
14194{
14195
14196 unsigned int fpcr;
14197 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14198 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14199
14200 ;
14201 return 0;
14202}
14203_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014204if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014205 have_gcc_asm_for_mc68881=yes
14206else
14207 have_gcc_asm_for_mc68881=no
14208fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014209rm -f core conftest.err conftest.$ac_objext \
14210 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14212$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14213if test "$have_gcc_asm_for_mc68881" = yes
14214then
14215
14216$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14217
14218fi
14219
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014220# Detect whether system arithmetic is subject to x87-style double
14221# rounding issues. The result of this test has little meaning on non
14222# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14223# mode is round-to-nearest and double rounding issues are present, and
14224# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14226$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014227# $BASECFLAGS may affect the result
14228ac_save_cc="$CC"
14229CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014230if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014231 ac_cv_x87_double_rounding=no
14232else
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014234/* end confdefs.h. */
14235
14236#include <stdlib.h>
14237#include <math.h>
14238int main() {
14239 volatile double x, y, z;
14240 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14241 x = 0.99999999999999989; /* 1-2**-53 */
14242 y = 1./x;
14243 if (y != 1.)
14244 exit(0);
14245 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14246 x = 1e16;
14247 y = 2.99999;
14248 z = x + y;
14249 if (z != 1e16+4.)
14250 exit(0);
14251 /* both tests show evidence of double rounding */
14252 exit(1);
14253}
14254
14255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014256if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014257 ac_cv_x87_double_rounding=no
14258else
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014263fi
14264
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014265CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14267$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014268if test "$ac_cv_x87_double_rounding" = yes
14269then
14270
Matthias Kloseb9621712010-04-24 17:59:49 +000014271$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014272
14273fi
14274
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014275# ************************************
14276# * Check for mathematical functions *
14277# ************************************
14278
14279LIBS_SAVE=$LIBS
14280LIBS="$LIBS $LIBM"
14281
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014282for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14283do :
14284 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14285ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014286if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014287 cat >>confdefs.h <<_ACEOF
14288#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14289_ACEOF
14290
14291fi
14292done
14293
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014294for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014295do :
14296 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14297ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014298if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014299 cat >>confdefs.h <<_ACEOF
14300#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14301_ACEOF
14302
14303fi
14304done
14305
14306ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14307"
Victor Stinnere0be4232011-10-25 13:06:09 +020014308if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014309 ac_have_decl=1
14310else
14311 ac_have_decl=0
14312fi
14313
14314cat >>confdefs.h <<_ACEOF
14315#define HAVE_DECL_ISINF $ac_have_decl
14316_ACEOF
14317ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14318"
Victor Stinnere0be4232011-10-25 13:06:09 +020014319if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014320 ac_have_decl=1
14321else
14322 ac_have_decl=0
14323fi
14324
14325cat >>confdefs.h <<_ACEOF
14326#define HAVE_DECL_ISNAN $ac_have_decl
14327_ACEOF
14328ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14329"
Victor Stinnere0be4232011-10-25 13:06:09 +020014330if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014331 ac_have_decl=1
14332else
14333 ac_have_decl=0
14334fi
14335
14336cat >>confdefs.h <<_ACEOF
14337#define HAVE_DECL_ISFINITE $ac_have_decl
14338_ACEOF
14339
14340
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014341# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14342# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14344$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014345if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014347else
14348
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014350 ac_cv_tanh_preserves_zero_sign=no
14351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014353/* end confdefs.h. */
14354
14355#include <math.h>
14356#include <stdlib.h>
14357int main() {
14358 /* return 0 if either negative zeros don't exist
14359 on this platform or if negative zeros exist
14360 and tanh(-0.) == -0. */
14361 if (atan2(0., -1.) == atan2(-0., -1.) ||
14362 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14363 else exit(1);
14364}
14365
14366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014367if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014368 ac_cv_tanh_preserves_zero_sign=yes
14369else
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14373 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014374fi
14375
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014376fi
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14379$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014380if test "$ac_cv_tanh_preserves_zero_sign" = yes
14381then
14382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014384
14385fi
14386
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014387if test "$ac_cv_func_log1p" = yes
14388then
14389 # On some versions of AIX, log1p(-0.) returns 0. instead of
14390 # -0. See issue #9920.
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14392$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014393 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014394 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014395else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014396
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014397 if test "$cross_compiling" = yes; then :
14398 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014399else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14401/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014402
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014403 #include <math.h>
14404 #include <stdlib.h>
14405 int main() {
14406 /* Fail if the signs of log1p(-0.) and -0. can be
14407 distinguished. */
14408 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14409 return 0;
14410 else
14411 return 1;
14412 }
14413
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014414_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014415if ac_fn_c_try_run "$LINENO"; then :
14416 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014417else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014418 ac_cv_log1p_drops_zero_sign=yes
14419fi
14420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14421 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014422fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014423
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014424fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014425
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14427$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14428fi
14429if test "$ac_cv_log1p_drops_zero_sign" = yes
14430then
14431
14432$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14433
14434fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014435
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014436LIBS=$LIBS_SAVE
14437
Mark Dickinsona614f042009-11-28 12:48:43 +000014438# For multiprocessing module, check that sem_open
14439# actually works. For FreeBSD versions <= 7.2,
14440# the kernel module that provides POSIX semaphores
14441# isn't loaded by default, so an attempt to call
14442# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14444$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014445if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014447else
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014449 ac_cv_posix_semaphores_enabled=yes
14450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014452/* end confdefs.h. */
14453
14454#include <unistd.h>
14455#include <fcntl.h>
14456#include <stdio.h>
14457#include <semaphore.h>
14458#include <sys/stat.h>
14459
14460int main(void) {
14461 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14462 if (a == SEM_FAILED) {
14463 perror("sem_open");
14464 return 1;
14465 }
14466 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014467 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014468 return 0;
14469}
14470
14471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014472if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014473 ac_cv_posix_semaphores_enabled=yes
14474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014479fi
14480
14481
Mark Dickinsona614f042009-11-28 12:48:43 +000014482fi
14483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14485$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014486if test $ac_cv_posix_semaphores_enabled = no
14487then
14488
Matthias Kloseb9621712010-04-24 17:59:49 +000014489$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014490
14491fi
14492
Mark Dickinson10683072009-04-18 21:18:19 +000014493# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14495$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014496if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014498else
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014500 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014501else
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014503/* end confdefs.h. */
14504
14505#include <unistd.h>
14506#include <fcntl.h>
14507#include <stdio.h>
14508#include <semaphore.h>
14509#include <sys/stat.h>
14510
14511int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014512 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014513 int count;
14514 int res;
14515 if(a==SEM_FAILED){
14516 perror("sem_open");
14517 return 1;
14518
14519 }
14520 res = sem_getvalue(a, &count);
14521 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014522 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014523 return res==-1 ? 1 : 0;
14524}
14525
Mark Dickinson10683072009-04-18 21:18:19 +000014526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014527if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014528 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014529else
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14533 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014534fi
14535
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014536
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014537fi
14538
Matthias Kloseb9621712010-04-24 17:59:49 +000014539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14540$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014541if test $ac_cv_broken_sem_getvalue = yes
14542then
14543
Matthias Kloseb9621712010-04-24 17:59:49 +000014544$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014545
14546fi
14547
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014548ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14549"
14550if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14551 ac_have_decl=1
14552else
14553 ac_have_decl=0
14554fi
14555
14556cat >>confdefs.h <<_ACEOF
14557#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14558_ACEOF
14559ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14560"
14561if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14562 ac_have_decl=1
14563else
14564 ac_have_decl=0
14565fi
14566
14567cat >>confdefs.h <<_ACEOF
14568#define HAVE_DECL_RTLD_NOW $ac_have_decl
14569_ACEOF
14570ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14571"
14572if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14573 ac_have_decl=1
14574else
14575 ac_have_decl=0
14576fi
14577
14578cat >>confdefs.h <<_ACEOF
14579#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14580_ACEOF
14581ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14582"
14583if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14584 ac_have_decl=1
14585else
14586 ac_have_decl=0
14587fi
14588
14589cat >>confdefs.h <<_ACEOF
14590#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14591_ACEOF
14592ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14593"
14594if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14595 ac_have_decl=1
14596else
14597 ac_have_decl=0
14598fi
14599
14600cat >>confdefs.h <<_ACEOF
14601#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14602_ACEOF
14603ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14604"
14605if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14606 ac_have_decl=1
14607else
14608 ac_have_decl=0
14609fi
14610
14611cat >>confdefs.h <<_ACEOF
14612#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14613_ACEOF
14614ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14615"
14616if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14617 ac_have_decl=1
14618else
14619 ac_have_decl=0
14620fi
14621
14622cat >>confdefs.h <<_ACEOF
14623#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14624_ACEOF
14625
14626
Mark Dickinsonbd792642009-03-18 20:06:12 +000014627# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14629$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014630# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014631if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014632 enableval=$enable_big_digits; case $enable_big_digits in
14633yes)
14634 enable_big_digits=30 ;;
14635no)
14636 enable_big_digits=15 ;;
1463715|30)
14638 ;;
14639*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014640 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 +000014641esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14643$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014644
14645cat >>confdefs.h <<_ACEOF
14646#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14647_ACEOF
14648
14649
14650else
Matthias Kloseb9621712010-04-24 17:59:49 +000014651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14652$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014653fi
14654
14655
Guido van Rossumef2255b2000-03-10 22:30:29 +000014656# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014657ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014658if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014659
14660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014663 wchar_h="yes"
14664
Guido van Rossumef2255b2000-03-10 22:30:29 +000014665else
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014667
14668fi
14669
Michael W. Hudson54241132001-12-07 15:38:26 +000014670
Martin v. Löwis11437992002-04-12 09:54:03 +000014671
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014672# determine wchar_t size
14673if test "$wchar_h" = yes
14674then
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14680$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014681if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014683else
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14685"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687else
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 if test "$ac_cv_type_wchar_t" = yes; then
14689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014691as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014692See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693 else
14694 ac_cv_sizeof_wchar_t=0
14695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014697
Martin v. Löwis11437992002-04-12 09:54:03 +000014698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14700$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701
14702
14703
Martin v. Löwis11437992002-04-12 09:54:03 +000014704cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014705#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014706_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014707
Michael W. Hudson54241132001-12-07 15:38:26 +000014708
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014709fi
14710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14712$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014713have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014715/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014716
14717#include <tcl.h>
14718#if TCL_UTF_MAX != 6
14719# error "NOT UCS4_TCL"
14720#endif
14721int
14722main ()
14723{
14724
14725 ;
14726 return 0;
14727}
14728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014730
14731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014733
14734 have_ucs4_tcl=yes
14735
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14739$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014740
Skip Montanaro6dead952003-09-25 14:50:04 +000014741# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014742if test "$wchar_h" = yes
14743then
14744 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14746$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014747 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014749else
14750
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014752 ac_cv_wchar_t_signed=yes
14753else
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014755/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014756
14757 #include <wchar.h>
14758 int main()
14759 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014760 /* Success: exit code 0 */
14761 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014762 }
14763
14764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014765if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014766 ac_cv_wchar_t_signed=yes
14767else
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014772fi
14773
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014774fi
14775
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14777$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778fi
14779
Georg Brandl52d168a2008-01-07 18:10:24 +000014780# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014781if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014782 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014783then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014784 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014787
Georg Brandl52d168a2008-01-07 18:10:24 +000014788else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014789 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014790fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14792$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014793
14794# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14796$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014797if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014799else
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 ac_cv_c_bigendian=unknown
14801 # See if we're dealing with a universal compiler.
14802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14803/* end confdefs.h. */
14804#ifndef __APPLE_CC__
14805 not a universal capable compiler
14806 #endif
14807 typedef int dummy;
14808
Skip Montanaro6dead952003-09-25 14:50:04 +000014809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014810if ac_fn_c_try_compile "$LINENO"; then :
14811
14812 # Check for potential -arch flags. It is not universal unless
14813 # there are at least two -arch flags with different values.
14814 ac_arch=
14815 ac_prev=
14816 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14817 if test -n "$ac_prev"; then
14818 case $ac_word in
14819 i?86 | x86_64 | ppc | ppc64)
14820 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14821 ac_arch=$ac_word
14822 else
14823 ac_cv_c_bigendian=universal
14824 break
14825 fi
14826 ;;
14827 esac
14828 ac_prev=
14829 elif test "x$ac_word" = "x-arch"; then
14830 ac_prev=arch
14831 fi
14832 done
14833fi
14834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14835 if test $ac_cv_c_bigendian = unknown; then
14836 # See if sys/param.h defines the BYTE_ORDER macro.
14837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014838/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014839#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014841
Martin v. Löwis11437992002-04-12 09:54:03 +000014842int
14843main ()
14844{
Matthias Kloseb9621712010-04-24 17:59:49 +000014845#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14846 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14847 && LITTLE_ENDIAN)
14848 bogus endian macros
14849 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014850
14851 ;
14852 return 0;
14853}
14854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014856 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014858/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014859#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014861
Martin v. Löwis11437992002-04-12 09:54:03 +000014862int
14863main ()
14864{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014865#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 not big endian
14867 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014868
14869 ;
14870 return 0;
14871}
14872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014873if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014874 ac_cv_c_bigendian=yes
14875else
Matthias Kloseb9621712010-04-24 17:59:49 +000014876 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014879fi
14880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14881 fi
14882 if test $ac_cv_c_bigendian = unknown; then
14883 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014885/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014886#include <limits.h>
14887
Martin v. Löwis11437992002-04-12 09:54:03 +000014888int
14889main ()
14890{
Matthias Kloseb9621712010-04-24 17:59:49 +000014891#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14892 bogus endian macros
14893 #endif
14894
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 ;
14896 return 0;
14897}
14898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014899if ac_fn_c_try_compile "$LINENO"; then :
14900 # It does; now see whether it defined to _BIG_ENDIAN or not.
14901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14902/* end confdefs.h. */
14903#include <limits.h>
14904
14905int
14906main ()
14907{
14908#ifndef _BIG_ENDIAN
14909 not big endian
14910 #endif
14911
14912 ;
14913 return 0;
14914}
14915_ACEOF
14916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014918else
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14922fi
14923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14924 fi
14925 if test $ac_cv_c_bigendian = unknown; then
14926 # Compile a test program.
14927 if test "$cross_compiling" = yes; then :
14928 # Try to guess by grepping values from an object file.
14929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14930/* end confdefs.h. */
14931short int ascii_mm[] =
14932 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14933 short int ascii_ii[] =
14934 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14935 int use_ascii (int i) {
14936 return ascii_mm[i] + ascii_ii[i];
14937 }
14938 short int ebcdic_ii[] =
14939 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14940 short int ebcdic_mm[] =
14941 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14942 int use_ebcdic (int i) {
14943 return ebcdic_mm[i] + ebcdic_ii[i];
14944 }
14945 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946
Matthias Kloseb9621712010-04-24 17:59:49 +000014947int
14948main ()
14949{
14950return use_ascii (foo) == use_ebcdic (foo);
14951 ;
14952 return 0;
14953}
14954_ACEOF
14955if ac_fn_c_try_compile "$LINENO"; then :
14956 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14957 ac_cv_c_bigendian=yes
14958 fi
14959 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14960 if test "$ac_cv_c_bigendian" = unknown; then
14961 ac_cv_c_bigendian=no
14962 else
14963 # finding both strings is unlikely to happen, but who knows?
14964 ac_cv_c_bigendian=unknown
14965 fi
14966 fi
14967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014969else
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014971/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014973int
14974main ()
14975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 /* Are we little or big endian? From Harbison&Steele. */
14978 union
14979 {
14980 long int l;
14981 char c[sizeof (long int)];
14982 } u;
14983 u.l = 1;
14984 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985
14986 ;
14987 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014988}
Martin v. Löwis11437992002-04-12 09:54:03 +000014989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014990if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014991 ac_cv_c_bigendian=no
14992else
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15002$as_echo "$ac_cv_c_bigendian" >&6; }
15003 case $ac_cv_c_bigendian in #(
15004 yes)
15005 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15006;; #(
15007 no)
15008 ;; #(
15009 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015012
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ;; #(
15014 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015015 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015016 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015018
Michael W. Hudson54241132001-12-07 15:38:26 +000015019
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015020# ABI version string for Python extension modules. This appears between the
15021# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15022# from the following attributes which affect the ABI of this Python build (in
15023# this order):
15024#
15025# * The Python implementation (always 'cpython-' for us)
15026# * The major and minor version numbers
15027# * --with-pydebug (adds a 'd')
15028# * --with-pymalloc (adds a 'm')
15029# * --with-wide-unicode (adds a 'u')
15030#
15031# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015032# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15033# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015034
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15036$as_echo_n "checking ABIFLAGS... " >&6; }
15037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15038$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15040$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015041SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15043$as_echo "$SOABI" >&6; }
15044
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015045
15046case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015047 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015048 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15049 *)
15050 EXT_SUFFIX=${SHLIB_SUFFIX};;
15051esac
15052
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15054$as_echo_n "checking LDVERSION... " >&6; }
15055LDVERSION='$(VERSION)$(ABIFLAGS)'
15056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15057$as_echo "$LDVERSION" >&6; }
15058
doko@python.org87421192013-01-26 11:39:31 +010015059
doko@ubuntu.com55532312016-06-14 08:55:19 +020015060if test x$PLATFORM_TRIPLET = x; then
15061 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15062else
15063 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15064fi
doko@python.org87421192013-01-26 11:39:31 +010015065
15066
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015067# Check whether right shifting a negative integer extends the sign bit
15068# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15070$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015071if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015073else
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
Matthias Kloseb9621712010-04-24 17:59:49 +000015075if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015076 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015077else
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015079/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015080
15081int main()
15082{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015083 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015084}
15085
Martin v. Löwis11437992002-04-12 09:54:03 +000015086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015087if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015088 ac_cv_rshift_extends_sign=yes
15089else
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015094fi
15095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096fi
15097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15099$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015100if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015101then
Martin v. Löwis11437992002-04-12 09:54:03 +000015102
Matthias Kloseb9621712010-04-24 17:59:49 +000015103$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015104
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015105fi
15106
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015107# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15109$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015110if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015112else
Martin v. Löwis11437992002-04-12 09:54:03 +000015113
Matthias Kloseb9621712010-04-24 17:59:49 +000015114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015115/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015116#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015117int
15118main ()
15119{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015120
15121 FILE *f = fopen("/dev/null", "r");
15122 flockfile(f);
15123 getc_unlocked(f);
15124 funlockfile(f);
15125
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 ;
15127 return 0;
15128}
15129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015130if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015131 ac_cv_have_getc_unlocked=yes
15132else
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 ac_cv_have_getc_unlocked=no
15134fi
15135rm -f core conftest.err conftest.$ac_objext \
15136 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15140$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015141if test "$ac_cv_have_getc_unlocked" = yes
15142then
Martin v. Löwis11437992002-04-12 09:54:03 +000015143
Matthias Kloseb9621712010-04-24 17:59:49 +000015144$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015145
15146fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015147
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015148# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015149# save the value of LIBS so we don't actually link Python with readline
15150LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015151
Gregory P. Smith18820942008-09-07 06:24:49 +000015152# On some systems we need to link readline to a termcap compatible
15153# library. NOTE: Keep the precedence of listed libraries synchronised
15154# with setup.py.
15155py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15157$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015158for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015159 if test -z "$py_libtermcap"; then
15160 READLINE_LIBS="-lreadline"
15161 else
15162 READLINE_LIBS="-lreadline -l$py_libtermcap"
15163 fi
15164 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015166/* end confdefs.h. */
15167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168/* Override any GCC internal prototype to avoid an error.
15169 Use char because int might match the return type of a GCC
15170 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015171#ifdef __cplusplus
15172extern "C"
15173#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015174char readline ();
15175int
15176main ()
15177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015179 ;
15180 return 0;
15181}
15182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015183if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015184 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015186rm -f core conftest.err conftest.$ac_objext \
15187 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015188 if test $py_cv_lib_readline = yes; then
15189 break
15190 fi
15191done
15192# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15193#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015194if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15196$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015197else
Matthias Kloseb9621712010-04-24 17:59:49 +000015198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15199$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015200
Matthias Kloseb9621712010-04-24 17:59:49 +000015201$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015202
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015203fi
15204
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015205# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015207/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015208#include <readline/readline.h>
15209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015210if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015211 have_readline=yes
15212else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015213 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015214
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015215fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015216rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015217if test $have_readline = yes
15218then
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015220/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015221#include <readline/readline.h>
15222
15223_ACEOF
15224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015226
Matthias Kloseb9621712010-04-24 17:59:49 +000015227$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015228
15229fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015230rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015231
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015233/* end confdefs.h. */
15234#include <readline/readline.h>
15235
15236_ACEOF
15237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015239
Matthias Kloseb9621712010-04-24 17:59:49 +000015240$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015241
15242fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015243rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015244
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015245fi
15246
Martin v. Löwis0daad592001-09-30 21:09:59 +000015247# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15249$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015250if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015254LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258/* Override any GCC internal prototype to avoid an error.
15259 Use char because int might match the return type of a GCC
15260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015261#ifdef __cplusplus
15262extern "C"
15263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015264char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015265int
15266main ()
15267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 ;
15270 return 0;
15271}
15272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015273if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015275else
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015278rm -f core conftest.err conftest.$ac_objext \
15279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015280LIBS=$ac_check_lib_save_LIBS
15281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15283$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015284if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015285
Matthias Kloseb9621712010-04-24 17:59:49 +000015286$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015287
Martin v. Löwis0daad592001-09-30 21:09:59 +000015288fi
15289
Michael W. Hudson54241132001-12-07 15:38:26 +000015290
Thomas Wouters89d996e2007-09-08 17:39:28 +000015291# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15293$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015294if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015296else
15297 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015298LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015300/* end confdefs.h. */
15301
15302/* Override any GCC internal prototype to avoid an error.
15303 Use char because int might match the return type of a GCC
15304 builtin and then its argument prototype would still apply. */
15305#ifdef __cplusplus
15306extern "C"
15307#endif
15308char rl_completion_display_matches_hook ();
15309int
15310main ()
15311{
15312return rl_completion_display_matches_hook ();
15313 ;
15314 return 0;
15315}
15316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015317if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015318 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15319else
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015322rm -f core conftest.err conftest.$ac_objext \
15323 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015324LIBS=$ac_check_lib_save_LIBS
15325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15327$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015328if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015329
Matthias Kloseb9621712010-04-24 17:59:49 +000015330$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015331
15332fi
15333
15334
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015335# also in 4.0, but not in editline
15336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15337$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15338if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15339 $as_echo_n "(cached) " >&6
15340else
15341 ac_check_lib_save_LIBS=$LIBS
15342LIBS="-lreadline $READLINE_LIBS $LIBS"
15343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15344/* end confdefs.h. */
15345
15346/* Override any GCC internal prototype to avoid an error.
15347 Use char because int might match the return type of a GCC
15348 builtin and then its argument prototype would still apply. */
15349#ifdef __cplusplus
15350extern "C"
15351#endif
15352char rl_resize_terminal ();
15353int
15354main ()
15355{
15356return rl_resize_terminal ();
15357 ;
15358 return 0;
15359}
15360_ACEOF
15361if ac_fn_c_try_link "$LINENO"; then :
15362 ac_cv_lib_readline_rl_resize_terminal=yes
15363else
15364 ac_cv_lib_readline_rl_resize_terminal=no
15365fi
15366rm -f core conftest.err conftest.$ac_objext \
15367 conftest$ac_exeext conftest.$ac_ext
15368LIBS=$ac_check_lib_save_LIBS
15369fi
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15371$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15372if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15373
15374$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15375
15376fi
15377
15378
Martin v. Löwis0daad592001-09-30 21:09:59 +000015379# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15381$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015382if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015384else
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015386LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390/* Override any GCC internal prototype to avoid an error.
15391 Use char because int might match the return type of a GCC
15392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015393#ifdef __cplusplus
15394extern "C"
15395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015396char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015397int
15398main ()
15399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 ;
15402 return 0;
15403}
15404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015405if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015410rm -f core conftest.err conftest.$ac_objext \
15411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015412LIBS=$ac_check_lib_save_LIBS
15413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15415$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015416if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015417
Matthias Kloseb9621712010-04-24 17:59:49 +000015418$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015419
Guido van Rossum353ae582001-07-10 16:45:32 +000015420fi
15421
Jack Jansendd19cf82001-12-06 22:36:17 +000015422
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015423# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015425/* end confdefs.h. */
15426#include <readline/readline.h>
15427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015428if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015429 have_readline=yes
15430else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015431 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015432
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015433fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015434rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015435if test $have_readline = yes
15436then
Matthias Kloseb9621712010-04-24 17:59:49 +000015437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015438/* end confdefs.h. */
15439#include <readline/readline.h>
15440
15441_ACEOF
15442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015444
Matthias Kloseb9621712010-04-24 17:59:49 +000015445$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015446
15447fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015448rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015449
15450fi
15451
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15453$as_echo_n "checking for append_history in -lreadline... " >&6; }
15454if ${ac_cv_lib_readline_append_history+:} false; then :
15455 $as_echo_n "(cached) " >&6
15456else
15457 ac_check_lib_save_LIBS=$LIBS
15458LIBS="-lreadline $READLINE_LIBS $LIBS"
15459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15460/* end confdefs.h. */
15461
15462/* Override any GCC internal prototype to avoid an error.
15463 Use char because int might match the return type of a GCC
15464 builtin and then its argument prototype would still apply. */
15465#ifdef __cplusplus
15466extern "C"
15467#endif
15468char append_history ();
15469int
15470main ()
15471{
15472return append_history ();
15473 ;
15474 return 0;
15475}
15476_ACEOF
15477if ac_fn_c_try_link "$LINENO"; then :
15478 ac_cv_lib_readline_append_history=yes
15479else
15480 ac_cv_lib_readline_append_history=no
15481fi
15482rm -f core conftest.err conftest.$ac_objext \
15483 conftest$ac_exeext conftest.$ac_ext
15484LIBS=$ac_check_lib_save_LIBS
15485fi
15486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15487$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15488if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15489
15490$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15491
15492fi
15493
15494
Martin v. Löwis82bca632006-02-10 20:49:30 +000015495# End of readline checks: restore LIBS
15496LIBS=$LIBS_no_readline
15497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15499$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015500if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015502else
Martin v. Löwis11437992002-04-12 09:54:03 +000015503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015505 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015506else
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015508/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015509
15510int main()
15511{
15512 int val1 = nice(1);
15513 if (val1 != -1 && val1 == nice(2))
15514 exit(0);
15515 exit(1);
15516}
15517
Martin v. Löwis11437992002-04-12 09:54:03 +000015518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015519if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015520 ac_cv_broken_nice=yes
15521else
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15525 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015526fi
15527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528fi
15529
Matthias Kloseb9621712010-04-24 17:59:49 +000015530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15531$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015532if test "$ac_cv_broken_nice" = yes
15533then
Martin v. Löwis11437992002-04-12 09:54:03 +000015534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015536
15537fi
15538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15540$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015541if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015543else
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015545 ac_cv_broken_poll=no
15546else
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015548/* end confdefs.h. */
15549
15550#include <poll.h>
15551
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015552int main()
15553{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015554 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015555 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015556
15557 close (42);
15558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015559 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015560 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015561 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015562 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015563 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015564 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015565 return 1;
15566}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015567
15568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015569if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015570 ac_cv_broken_poll=yes
15571else
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15575 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015578fi
15579
Matthias Kloseb9621712010-04-24 17:59:49 +000015580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15581$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015582if test "$ac_cv_broken_poll" = yes
15583then
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015586
15587fi
15588
Brett Cannon43802422005-02-10 20:48:03 +000015589# 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 +000015590# (which is not required by ISO C or UNIX spec) and/or if we support
15591# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015592ac_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 +000015593#include <$ac_cv_struct_tm>
15594
Matthias Kloseb9621712010-04-24 17:59:49 +000015595"
Victor Stinnere0be4232011-10-25 13:06:09 +020015596if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015597
15598cat >>confdefs.h <<_ACEOF
15599#define HAVE_STRUCT_TM_TM_ZONE 1
15600_ACEOF
15601
15602
15603fi
15604
15605if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15606
Matthias Kloseb9621712010-04-24 17:59:49 +000015607$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015608
15609else
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15611"
Victor Stinnere0be4232011-10-25 13:06:09 +020015612if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614else
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015616fi
15617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015619#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620_ACEOF
15621
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15623$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015624if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626else
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015628/* end confdefs.h. */
15629#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630#if !HAVE_DECL_TZNAME
15631extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015632#endif
15633
15634int
15635main ()
15636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015638 ;
15639 return 0;
15640}
15641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015642if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015643 ac_cv_var_tzname=yes
15644else
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015647rm -f core conftest.err conftest.$ac_objext \
15648 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15651$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015652 if test $ac_cv_var_tzname = yes; then
15653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015655
15656 fi
15657fi
15658
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015659
Martin v. Löwis1d459062005-03-14 21:23:33 +000015660# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15662$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015663if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015664 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015665else
15666
Matthias Kloseb9621712010-04-24 17:59:49 +000015667if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015668 ac_cv_working_tzset=no
15669else
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015671/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015672
15673#include <stdlib.h>
15674#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015675#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015676
15677#if HAVE_TZNAME
15678extern char *tzname[];
15679#endif
15680
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015681int main()
15682{
Brett Cannon18367812003-09-19 00:59:16 +000015683 /* Note that we need to ensure that not only does tzset(3)
15684 do 'something' with localtime, but it works as documented
15685 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015686 This includes making sure that tzname is set properly if
15687 tm->tm_zone does not exist since it is the alternative way
15688 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015689
15690 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015691 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015692 */
15693
Martin v. Löwis1d459062005-03-14 21:23:33 +000015694 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015695 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15696
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015697 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015698 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015699 if (localtime(&groundhogday)->tm_hour != 0)
15700 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015701#if HAVE_TZNAME
15702 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15703 if (strcmp(tzname[0], "UTC") ||
15704 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15705 exit(1);
15706#endif
Brett Cannon18367812003-09-19 00:59:16 +000015707
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015708 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015709 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015710 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015711 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015712#if HAVE_TZNAME
15713 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15714 exit(1);
15715#endif
Brett Cannon18367812003-09-19 00:59:16 +000015716
15717 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15718 tzset();
15719 if (localtime(&groundhogday)->tm_hour != 11)
15720 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015721#if HAVE_TZNAME
15722 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15723 exit(1);
15724#endif
15725
15726#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015727 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15728 exit(1);
15729 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15730 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015731#endif
Brett Cannon18367812003-09-19 00:59:16 +000015732
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015733 exit(0);
15734}
15735
15736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015737if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015738 ac_cv_working_tzset=yes
15739else
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015744fi
15745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746fi
15747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15749$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015750if test "$ac_cv_working_tzset" = yes
15751then
15752
Matthias Kloseb9621712010-04-24 17:59:49 +000015753$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015754
15755fi
15756
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015757# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15759$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015760if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015762else
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015764/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015765#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015766int
15767main ()
15768{
15769
15770struct stat st;
15771st.st_mtim.tv_nsec = 1;
15772
15773 ;
15774 return 0;
15775}
15776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015778 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015779else
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15783fi
15784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15786$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015787if test "$ac_cv_stat_tv_nsec" = yes
15788then
15789
Matthias Kloseb9621712010-04-24 17:59:49 +000015790$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015791
15792fi
15793
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015794# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15796$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015797if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015799else
Matthias Kloseb9621712010-04-24 17:59:49 +000015800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015801/* end confdefs.h. */
15802#include <sys/stat.h>
15803int
15804main ()
15805{
15806
15807struct stat st;
15808st.st_mtimespec.tv_nsec = 1;
15809
15810 ;
15811 return 0;
15812}
15813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015814if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015815 ac_cv_stat_tv_nsec2=yes
15816else
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15820fi
15821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15823$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015824if test "$ac_cv_stat_tv_nsec2" = yes
15825then
15826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015828
15829fi
15830
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015831# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015832ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015833if test "$cross_compiling" = no; then
15834 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15835fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015836
15837for ac_header in curses.h ncurses.h
15838do :
15839 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15840ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15841if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15842 cat >>confdefs.h <<_ACEOF
15843#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15844_ACEOF
15845
15846fi
15847
15848done
15849
15850
15851# On Solaris, term.h requires curses.h
15852for ac_header in term.h
15853do :
15854 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15855#ifdef HAVE_CURSES_H
15856#include <curses.h>
15857#endif
15858
15859"
15860if test "x$ac_cv_header_term_h" = xyes; then :
15861 cat >>confdefs.h <<_ACEOF
15862#define HAVE_TERM_H 1
15863_ACEOF
15864
15865fi
15866
15867done
15868
15869
Jack Jansen666b1e72001-10-31 12:11:48 +000015870# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15872$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015873if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015875else
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015877/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015878#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015879int
15880main ()
15881{
Jack Jansen666b1e72001-10-31 12:11:48 +000015882
15883 int rtn;
15884 rtn = mvwdelch(0,0,0);
15885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 ;
15887 return 0;
15888}
15889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015890if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015891 ac_cv_mvwdelch_is_expression=yes
15892else
Matthias Kloseb9621712010-04-24 17:59:49 +000015893 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15896fi
15897
Matthias Kloseb9621712010-04-24 17:59:49 +000015898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15899$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015900
15901if test "$ac_cv_mvwdelch_is_expression" = yes
15902then
Martin v. Löwis11437992002-04-12 09:54:03 +000015903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015905
15906fi
15907
Matthias Kloseb9621712010-04-24 17:59:49 +000015908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15909$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015910if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015911 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015912else
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015914/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015915#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015916int
15917main ()
15918{
Jack Jansen666b1e72001-10-31 12:11:48 +000015919
15920 WINDOW *w;
15921 w->_flags = 0;
15922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 ;
15924 return 0;
15925}
15926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015927if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015928 ac_cv_window_has_flags=yes
15929else
Matthias Kloseb9621712010-04-24 17:59:49 +000015930 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15933fi
15934
Matthias Kloseb9621712010-04-24 17:59:49 +000015935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15936$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015937
Jack Jansen666b1e72001-10-31 12:11:48 +000015938
15939if test "$ac_cv_window_has_flags" = yes
15940then
Martin v. Löwis11437992002-04-12 09:54:03 +000015941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015943
15944fi
15945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15947$as_echo_n "checking for is_term_resized... " >&6; }
15948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015949/* end confdefs.h. */
15950#include <curses.h>
15951int
15952main ()
15953{
15954void *x=is_term_resized
15955 ;
15956 return 0;
15957}
15958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015959if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015960
Matthias Kloseb9621712010-04-24 17:59:49 +000015961$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015962
Matthias Kloseb159a552010-04-25 21:00:44 +000015963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015964$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015965else
Matthias Kloseb9621712010-04-24 17:59:49 +000015966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15967$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015968
15969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15971
Matthias Kloseb9621712010-04-24 17:59:49 +000015972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15973$as_echo_n "checking for resize_term... " >&6; }
15974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015975/* end confdefs.h. */
15976#include <curses.h>
15977int
15978main ()
15979{
15980void *x=resize_term
15981 ;
15982 return 0;
15983}
15984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015985if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015988
Matthias Kloseb159a552010-04-25 21:00:44 +000015989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015990$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015991else
Matthias Kloseb9621712010-04-24 17:59:49 +000015992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15993$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015994
15995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15999$as_echo_n "checking for resizeterm... " >&6; }
16000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016001/* end confdefs.h. */
16002#include <curses.h>
16003int
16004main ()
16005{
16006void *x=resizeterm
16007 ;
16008 return 0;
16009}
16010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016011if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016012
Matthias Kloseb9621712010-04-24 17:59:49 +000016013$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016014
Matthias Kloseb159a552010-04-25 21:00:44 +000016015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016016$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016017else
Matthias Kloseb9621712010-04-24 17:59:49 +000016018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16019$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016020
16021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016023# last curses configure check
16024CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016025
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16027$as_echo "$as_me: checking for device files" >&6;}
16028
16029if test "x$cross_compiling" = xyes; then
16030 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16032$as_echo_n "checking for /dev/ptmx... " >&6; }
16033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16034$as_echo "not set" >&6; }
16035 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16036 fi
16037 if test "${ac_cv_file__dev_ptc+set}" != set; then
16038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16039$as_echo_n "checking for /dev/ptc... " >&6; }
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16041$as_echo "not set" >&6; }
16042 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16043 fi
16044fi
16045
Matthias Kloseb9621712010-04-24 17:59:49 +000016046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16047$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016048if ${ac_cv_file__dev_ptmx+:} false; then :
16049 $as_echo_n "(cached) " >&6
16050else
16051 test "$cross_compiling" = yes &&
16052 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16053if test -r "/dev/ptmx"; then
16054 ac_cv_file__dev_ptmx=yes
16055else
16056 ac_cv_file__dev_ptmx=no
16057fi
16058fi
16059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16060$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16061if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016062
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016063fi
16064
16065if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016068
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16071$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016072if ${ac_cv_file__dev_ptc+:} false; then :
16073 $as_echo_n "(cached) " >&6
16074else
16075 test "$cross_compiling" = yes &&
16076 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16077if test -r "/dev/ptc"; then
16078 ac_cv_file__dev_ptc=yes
16079else
16080 ac_cv_file__dev_ptc=no
16081fi
16082fi
16083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16084$as_echo "$ac_cv_file__dev_ptc" >&6; }
16085if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016086
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016087fi
16088
16089if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016090
Matthias Kloseb9621712010-04-24 17:59:49 +000016091$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016092
Neal Norwitz865400f2003-03-21 01:42:58 +000016093fi
16094
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016095if test $ac_sys_system = Darwin
16096then
16097 LIBS="$LIBS -framework CoreFoundation"
16098fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016099
Matthias Kloseb9621712010-04-24 17:59:49 +000016100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16101$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016102if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016103 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016104else
Matthias Kloseb9621712010-04-24 17:59:49 +000016105 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016106 ac_cv_have_size_t_format="cross -- assuming yes"
16107
Thomas Wouters477c8d52006-05-27 19:21:47 +000016108else
Matthias Kloseb9621712010-04-24 17:59:49 +000016109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016110/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016111
Thomas Wouters477c8d52006-05-27 19:21:47 +000016112#include <stdio.h>
16113#include <stddef.h>
16114#include <string.h>
16115
Christian Heimes2c181612007-12-17 20:04:13 +000016116#ifdef HAVE_SYS_TYPES_H
16117#include <sys/types.h>
16118#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016119
16120#ifdef HAVE_SSIZE_T
16121typedef ssize_t Py_ssize_t;
16122#elif SIZEOF_VOID_P == SIZEOF_LONG
16123typedef long Py_ssize_t;
16124#else
16125typedef int Py_ssize_t;
16126#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016127
Christian Heimes2c181612007-12-17 20:04:13 +000016128int main()
16129{
16130 char buffer[256];
16131
Thomas Wouters477c8d52006-05-27 19:21:47 +000016132 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16133 return 1;
16134
Thomas Wouters89f507f2006-12-13 04:49:30 +000016135 if (strcmp(buffer, "123"))
16136 return 1;
16137
16138 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16139 return 1;
16140
16141 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016142 return 1;
16143
16144 return 0;
16145}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016146
Thomas Wouters477c8d52006-05-27 19:21:47 +000016147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016148if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016149 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016150else
Matthias Kloseb9621712010-04-24 17:59:49 +000016151 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016155fi
16156
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16159$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016160if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016161
Matthias Kloseb9621712010-04-24 17:59:49 +000016162$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016163
16164fi
16165
Matthias Kloseb9621712010-04-24 17:59:49 +000016166ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016167#ifdef HAVE_SYS_TYPES_H
16168#include <sys/types.h>
16169#endif
16170#ifdef HAVE_SYS_SOCKET_H
16171#include <sys/socket.h>
16172#endif
16173
Matthias Kloseb9621712010-04-24 17:59:49 +000016174"
Victor Stinnere0be4232011-10-25 13:06:09 +020016175if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016176
Martin v. Löwis11437992002-04-12 09:54:03 +000016177else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016178
Matthias Kloseb9621712010-04-24 17:59:49 +000016179$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016180
16181fi
16182
Michael W. Hudson54241132001-12-07 15:38:26 +000016183
Matthias Kloseb9621712010-04-24 17:59:49 +000016184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16185$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016186if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016187 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016188else
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016190 ac_cv_broken_mbstowcs=no
16191else
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016193/* end confdefs.h. */
16194
Stefan Krah19c21392012-11-22 23:47:32 +010016195#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016196#include<stdlib.h>
16197int main() {
16198 size_t len = -1;
16199 const char *str = "text";
16200 len = mbstowcs(NULL, str, 0);
16201 return (len != 4);
16202}
16203
16204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016205if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016206 ac_cv_broken_mbstowcs=no
16207else
Matthias Kloseb9621712010-04-24 17:59:49 +000016208 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16211 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016212fi
16213
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016214fi
16215
Matthias Kloseb9621712010-04-24 17:59:49 +000016216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16217$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016218if test "$ac_cv_broken_mbstowcs" = yes
16219then
16220
Matthias Kloseb9621712010-04-24 17:59:49 +000016221$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016222
16223fi
16224
Antoine Pitroub52ec782009-01-25 16:34:23 +000016225# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16227$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016228
16229# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016230if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016231 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016232if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016233then
16234
Matthias Kloseb9621712010-04-24 17:59:49 +000016235$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016236
Matthias Kloseb9621712010-04-24 17:59:49 +000016237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16238$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016239fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016240if test "$withval" = no
16241then
16242
16243$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16244
Matthias Kloseb9621712010-04-24 17:59:49 +000016245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16246$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016247fi
16248
Antoine Pitrou042b1282010-08-13 21:15:58 +000016249else
16250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16251$as_echo "no value specified" >&6; }
16252fi
16253
Antoine Pitroub52ec782009-01-25 16:34:23 +000016254
Matthias Kloseb17289e2012-03-15 19:51:34 +010016255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16256$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16257if ${ac_cv_computed_gotos+:} false; then :
16258 $as_echo_n "(cached) " >&6
16259else
16260 if test "$cross_compiling" = yes; then :
16261 if test "${with_computed_gotos+set}" = set; then
16262 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16263 else
16264 ac_cv_computed_gotos=no
16265 fi
16266else
16267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16268/* end confdefs.h. */
16269
16270int main(int argc, char **argv)
16271{
16272 static void *targets[1] = { &&LABEL1 };
16273 goto LABEL2;
16274LABEL1:
16275 return 0;
16276LABEL2:
16277 goto *targets[0];
16278 return 1;
16279}
16280
16281_ACEOF
16282if ac_fn_c_try_run "$LINENO"; then :
16283 ac_cv_computed_gotos=yes
16284else
16285 ac_cv_computed_gotos=no
16286fi
16287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16288 conftest.$ac_objext conftest.beam conftest.$ac_ext
16289fi
16290
16291fi
16292
16293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16294$as_echo "$ac_cv_computed_gotos" >&6; }
16295case "$ac_cv_computed_gotos" in yes*)
16296
16297$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16298
16299esac
16300
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016301case $ac_sys_system in
16302AIX*)
16303
16304$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16305 ;;
16306esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016307
Michael W. Hudson54241132001-12-07 15:38:26 +000016308
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016309
16310
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016311for h in `(cd $srcdir;echo Python/thread_*.h)`
16312do
16313 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16314done
16315
Michael W. Hudson54241132001-12-07 15:38:26 +000016316
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016317SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16319$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016320for dir in $SRCDIRS; do
16321 if test ! -d $dir; then
16322 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016323 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016324done
Matthias Kloseb9621712010-04-24 17:59:49 +000016325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16326$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016327
Stefan Krah1919b7e2012-03-21 18:25:23 +010016328# Availability of -O2:
16329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16330$as_echo_n "checking for -O2... " >&6; }
16331saved_cflags="$CFLAGS"
16332CFLAGS="-O2"
16333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16334/* end confdefs.h. */
16335
16336int
16337main ()
16338{
16339
16340
16341 ;
16342 return 0;
16343}
16344_ACEOF
16345if ac_fn_c_try_compile "$LINENO"; then :
16346 have_O2=yes
16347else
16348 have_O2=no
16349fi
16350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16352$as_echo "$have_O2" >&6; }
16353CFLAGS="$saved_cflags"
16354
16355# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16356# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16358$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16359saved_cflags="$CFLAGS"
16360CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16361if test "$have_O2" = no; then
16362 CFLAGS=""
16363fi
16364if test "$cross_compiling" = yes; then :
16365 have_glibc_memmove_bug=undefined
16366else
16367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16368/* end confdefs.h. */
16369
16370#include <stdio.h>
16371#include <stdlib.h>
16372#include <string.h>
16373void foo(void *p, void *q) { memmove(p, q, 19); }
16374int main() {
16375 char a[32] = "123456789000000000";
16376 foo(&a[9], a);
16377 if (strcmp(a, "123456789123456789000000000") != 0)
16378 return 1;
16379 foo(a, &a[9]);
16380 if (strcmp(a, "123456789000000000") != 0)
16381 return 1;
16382 return 0;
16383}
16384
16385_ACEOF
16386if ac_fn_c_try_run "$LINENO"; then :
16387 have_glibc_memmove_bug=no
16388else
16389 have_glibc_memmove_bug=yes
16390fi
16391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16392 conftest.$ac_objext conftest.beam conftest.$ac_ext
16393fi
16394
16395CFLAGS="$saved_cflags"
16396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16397$as_echo "$have_glibc_memmove_bug" >&6; }
16398if test "$have_glibc_memmove_bug" = yes; then
16399
16400$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16401
16402fi
16403
16404if test "$have_gcc_asm_for_x87" = yes; then
16405 # Some versions of gcc miscompile inline asm:
16406 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16407 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16408 case $CC in
16409 *gcc*)
16410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16411$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16412 saved_cflags="$CFLAGS"
16413 CFLAGS="-O2"
16414 if test "$cross_compiling" = yes; then :
16415 have_ipa_pure_const_bug=undefined
16416else
16417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16418/* end confdefs.h. */
16419
16420 __attribute__((noinline)) int
16421 foo(int *p) {
16422 int r;
16423 asm ( "movl \$6, (%1)\n\t"
16424 "xorl %0, %0\n\t"
16425 : "=r" (r) : "r" (p) : "memory"
16426 );
16427 return r;
16428 }
16429 int main() {
16430 int p = 8;
16431 if ((foo(&p) ? : p) != 6)
16432 return 1;
16433 return 0;
16434 }
16435
16436_ACEOF
16437if ac_fn_c_try_run "$LINENO"; then :
16438 have_ipa_pure_const_bug=no
16439else
16440 have_ipa_pure_const_bug=yes
16441fi
16442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16443 conftest.$ac_objext conftest.beam conftest.$ac_ext
16444fi
16445
16446 CFLAGS="$saved_cflags"
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16448$as_echo "$have_ipa_pure_const_bug" >&6; }
16449 if test "$have_ipa_pure_const_bug" = yes; then
16450
16451$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16452
16453 fi
16454 ;;
16455 esac
16456fi
16457
Victor Stinner4f5366e2015-01-09 02:13:19 +010016458# Check for stdatomic.h
16459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16460$as_echo_n "checking for stdatomic.h... " >&6; }
16461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16462/* end confdefs.h. */
16463
16464
16465 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016466 atomic_int value = ATOMIC_VAR_INIT(1);
16467 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016468 int main() {
16469 int loaded_value = atomic_load(&value);
16470 return 0;
16471 }
16472
16473
16474_ACEOF
16475if ac_fn_c_try_link "$LINENO"; then :
16476 have_stdatomic_h=yes
16477else
16478 have_stdatomic_h=no
16479fi
16480rm -f core conftest.err conftest.$ac_objext \
16481 conftest$ac_exeext conftest.$ac_ext
16482
16483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16484$as_echo "$have_stdatomic_h" >&6; }
16485
16486if test "$have_stdatomic_h" = yes; then
16487
16488$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16489
16490fi
16491
16492# Check for GCC >= 4.7 __atomic builtins
16493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16494$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16496/* end confdefs.h. */
16497
16498
16499 volatile int val = 1;
16500 int main() {
16501 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16502 return 0;
16503 }
16504
16505
16506_ACEOF
16507if ac_fn_c_try_link "$LINENO"; then :
16508 have_builtin_atomic=yes
16509else
16510 have_builtin_atomic=no
16511fi
16512rm -f core conftest.err conftest.$ac_objext \
16513 conftest$ac_exeext conftest.$ac_ext
16514
16515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16516$as_echo "$have_builtin_atomic" >&6; }
16517
16518if test "$have_builtin_atomic" = yes; then
16519
16520$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16521
16522fi
16523
Ned Deily322f5ba2013-11-21 23:01:59 -080016524# ensurepip option
16525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16526$as_echo_n "checking for ensurepip... " >&6; }
16527
16528# Check whether --with-ensurepip was given.
16529if test "${with_ensurepip+set}" = set; then :
16530 withval=$with_ensurepip;
16531else
16532 with_ensurepip=upgrade
16533fi
16534
16535case $with_ensurepip in #(
16536 yes|upgrade) :
16537 ENSUREPIP=upgrade ;; #(
16538 install) :
16539 ENSUREPIP=install ;; #(
16540 no) :
16541 ENSUREPIP=no ;; #(
16542 *) :
16543 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16544esac
16545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16546$as_echo "$ENSUREPIP" >&6; }
16547
16548
Victor Stinner35a97c02015-03-08 02:59:09 +010016549# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16551$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16553/* end confdefs.h. */
16554
16555
16556 #include <dirent.h>
16557
16558 int main() {
16559 struct dirent entry;
16560 return entry.d_type == DT_UNKNOWN;
16561 }
16562
16563
16564_ACEOF
16565if ac_fn_c_try_link "$LINENO"; then :
16566 have_dirent_d_type=yes
16567else
16568 have_dirent_d_type=no
16569fi
16570rm -f core conftest.err conftest.$ac_objext \
16571 conftest$ac_exeext conftest.$ac_ext
16572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16573$as_echo "$have_dirent_d_type" >&6; }
16574
16575if test "$have_dirent_d_type" = yes; then
16576
16577$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16578
16579fi
16580
Victor Stinner9eb57c52015-03-19 22:21:49 +010016581# check if the Linux getrandom() syscall is available
16582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16583$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16585/* end confdefs.h. */
16586
16587
Victor Stinner1b80b242016-04-12 22:34:58 +020016588 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016589 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016590 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016591
16592 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016593 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016594 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016595 const int flags = GRND_NONBLOCK;
16596 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016597 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016598 return 0;
16599 }
16600
16601
16602_ACEOF
16603if ac_fn_c_try_link "$LINENO"; then :
16604 have_getrandom_syscall=yes
16605else
16606 have_getrandom_syscall=no
16607fi
16608rm -f core conftest.err conftest.$ac_objext \
16609 conftest$ac_exeext conftest.$ac_ext
16610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16611$as_echo "$have_getrandom_syscall" >&6; }
16612
16613if test "$have_getrandom_syscall" = yes; then
16614
16615$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16616
16617fi
16618
Victor Stinner3abf44e2015-09-18 15:38:37 +020016619# check if the getrandom() function is available
16620# the test was written for the Solaris function of <sys/random.h>
16621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16622$as_echo_n "checking for the getrandom() function... " >&6; }
16623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16624/* end confdefs.h. */
16625
16626
16627 #include <sys/random.h>
16628
16629 int main() {
16630 char buffer[1];
16631 const size_t buflen = sizeof(buffer);
16632 const int flags = 0;
16633 /* ignore the result, Python checks for ENOSYS at runtime */
16634 (void)getrandom(buffer, buflen, flags);
16635 return 0;
16636 }
16637
16638
16639_ACEOF
16640if ac_fn_c_try_link "$LINENO"; then :
16641 have_getrandom=yes
16642else
16643 have_getrandom=no
16644fi
16645rm -f core conftest.err conftest.$ac_objext \
16646 conftest$ac_exeext conftest.$ac_ext
16647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16648$as_echo "$have_getrandom" >&6; }
16649
16650if test "$have_getrandom" = yes; then
16651
16652$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16653
16654fi
16655
Guido van Rossum627b2d71993-12-24 10:39:16 +000016656# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016657ac_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 +000016658
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016659ac_config_files="$ac_config_files Modules/ld_so_aix"
16660
Martin v. Löwis11437992002-04-12 09:54:03 +000016661cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016662# This file is a shell script that caches the results of configure
16663# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016664# scripts and configure runs, see configure's option --config-cache.
16665# It is not useful on other systems. If it contains results you don't
16666# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016667#
Martin v. Löwis11437992002-04-12 09:54:03 +000016668# config.status only pays attention to the cache file if you give it
16669# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016670#
Skip Montanaro6dead952003-09-25 14:50:04 +000016671# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016672# loading this file, other *unset* `ac_cv_foo' will be assigned the
16673# following values.
16674
16675_ACEOF
16676
Guido van Rossumf78abae1997-01-21 22:02:36 +000016677# The following way of writing the cache mishandles newlines in values,
16678# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016679# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016680# Ultrix sh set writes to stderr and can't be redirected directly,
16681# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016682(
16683 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16684 eval ac_val=\$$ac_var
16685 case $ac_val in #(
16686 *${as_nl}*)
16687 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016688 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16689$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690 esac
16691 case $ac_var in #(
16692 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16694 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 esac ;;
16696 esac
16697 done
16698
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16701 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016702 # `set' does not quote correctly, so add quotes: double-quote
16703 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016705 "s/'/'\\\\''/g;
16706 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016708 *)
16709 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016711 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712 esac |
16713 sort
16714) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016715 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016717 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016719 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16720 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16722 :end' >>confcache
16723if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16724 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016725 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016726 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16727$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016728 if test ! -f "$cache_file" || test -h "$cache_file"; then
16729 cat confcache >"$cache_file"
16730 else
16731 case $cache_file in #(
16732 */* | ?:*)
16733 mv -f confcache "$cache_file"$$ &&
16734 mv -f "$cache_file"$$ "$cache_file" ;; #(
16735 *)
16736 mv -f confcache "$cache_file" ;;
16737 esac
16738 fi
16739 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016740 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016741 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16742$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016743 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016744fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016745rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016746
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016747test "x$prefix" = xNONE && prefix=$ac_default_prefix
16748# Let make expand exec_prefix.
16749test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016750
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016751DEFS=-DHAVE_CONFIG_H
16752
Skip Montanaro6dead952003-09-25 14:50:04 +000016753ac_libobjs=
16754ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016755U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016756for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16757 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016758 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016759 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16761 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016762 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16763 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016764done
16765LIBOBJS=$ac_libobjs
16766
16767LTLIBOBJS=$ac_ltlibobjs
16768
16769
Martin v. Löwis11437992002-04-12 09:54:03 +000016770
Matthias Kloseb9621712010-04-24 17:59:49 +000016771
Victor Stinnere0be4232011-10-25 13:06:09 +020016772: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016773ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016774ac_clean_files_save=$ac_clean_files
16775ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016776{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16777$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16778as_write_fail=0
16779cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016780#! $SHELL
16781# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016782# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016783# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016784# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016785
Martin v. Löwis11437992002-04-12 09:54:03 +000016786debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016787ac_cs_recheck=false
16788ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016789
Matthias Kloseb9621712010-04-24 17:59:49 +000016790SHELL=\${CONFIG_SHELL-$SHELL}
16791export SHELL
16792_ASEOF
16793cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16794## -------------------- ##
16795## M4sh Initialization. ##
16796## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798# Be more Bourne compatible
16799DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016800if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 emulate sh
16802 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016803 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016804 # is contrary to our usage. Disable this feature.
16805 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016807else
Matthias Kloseb9621712010-04-24 17:59:49 +000016808 case `(set -o) 2>/dev/null` in #(
16809 *posix*) :
16810 set -o posix ;; #(
16811 *) :
16812 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016813esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016814fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016815
16816
Matthias Kloseb9621712010-04-24 17:59:49 +000016817as_nl='
16818'
16819export as_nl
16820# Printing a long string crashes Solaris 7 /usr/bin/printf.
16821as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16822as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16823as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16824# Prefer a ksh shell builtin over an external printf program on Solaris,
16825# but without wasting forks for bash or zsh.
16826if test -z "$BASH_VERSION$ZSH_VERSION" \
16827 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16828 as_echo='print -r --'
16829 as_echo_n='print -rn --'
16830elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16831 as_echo='printf %s\n'
16832 as_echo_n='printf %s'
16833else
16834 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16835 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16836 as_echo_n='/usr/ucb/echo -n'
16837 else
16838 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16839 as_echo_n_body='eval
16840 arg=$1;
16841 case $arg in #(
16842 *"$as_nl"*)
16843 expr "X$arg" : "X\\(.*\\)$as_nl";
16844 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16845 esac;
16846 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16847 '
16848 export as_echo_n_body
16849 as_echo_n='sh -c $as_echo_n_body as_echo'
16850 fi
16851 export as_echo_body
16852 as_echo='sh -c $as_echo_body as_echo'
16853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016854
16855# The user is always right.
16856if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016857 PATH_SEPARATOR=:
16858 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16859 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16860 PATH_SEPARATOR=';'
16861 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016864
16865# IFS
16866# We need space, tab and new line, in precisely that order. Quoting is
16867# there to prevent editors from complaining about space-tab.
16868# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16869# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016870IFS=" "" $as_nl"
16871
16872# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016873as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016874case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875 *[\\/]* ) as_myself=$0 ;;
16876 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016877for as_dir in $PATH
16878do
16879 IFS=$as_save_IFS
16880 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016881 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16882 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885 ;;
16886esac
16887# We did not find ourselves, most probably we were run as `sh COMMAND'
16888# in which case we are not to be found in the path.
16889if test "x$as_myself" = x; then
16890 as_myself=$0
16891fi
16892if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016893 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16894 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895fi
16896
Matthias Kloseb9621712010-04-24 17:59:49 +000016897# Unset variables that we do not need and which cause bugs (e.g. in
16898# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16899# suppresses any "Segmentation fault" message there. '((' could
16900# trigger a bug in pdksh 5.2.14.
16901for as_var in BASH_ENV ENV MAIL MAILPATH
16902do eval test x\${$as_var+set} = xset \
16903 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016904done
16905PS1='$ '
16906PS2='> '
16907PS4='+ '
16908
16909# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016910LC_ALL=C
16911export LC_ALL
16912LANGUAGE=C
16913export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914
Matthias Kloseb9621712010-04-24 17:59:49 +000016915# CDPATH.
16916(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16917
16918
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016919# as_fn_error STATUS ERROR [LINENO LOG_FD]
16920# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016921# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16922# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016923# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016924as_fn_error ()
16925{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016926 as_status=$1; test $as_status -eq 0 && as_status=1
16927 if test "$4"; then
16928 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16929 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016930 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016931 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016932 as_fn_exit $as_status
16933} # as_fn_error
16934
16935
16936# as_fn_set_status STATUS
16937# -----------------------
16938# Set $? to STATUS, without forking.
16939as_fn_set_status ()
16940{
16941 return $1
16942} # as_fn_set_status
16943
16944# as_fn_exit STATUS
16945# -----------------
16946# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16947as_fn_exit ()
16948{
16949 set +e
16950 as_fn_set_status $1
16951 exit $1
16952} # as_fn_exit
16953
16954# as_fn_unset VAR
16955# ---------------
16956# Portably unset VAR.
16957as_fn_unset ()
16958{
16959 { eval $1=; unset $1;}
16960}
16961as_unset=as_fn_unset
16962# as_fn_append VAR VALUE
16963# ----------------------
16964# Append the text in VALUE to the end of the definition contained in VAR. Take
16965# advantage of any shell optimizations that allow amortized linear growth over
16966# repeated appends, instead of the typical quadratic growth present in naive
16967# implementations.
16968if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16969 eval 'as_fn_append ()
16970 {
16971 eval $1+=\$2
16972 }'
16973else
16974 as_fn_append ()
16975 {
16976 eval $1=\$$1\$2
16977 }
16978fi # as_fn_append
16979
16980# as_fn_arith ARG...
16981# ------------------
16982# Perform arithmetic evaluation on the ARGs, and store the result in the
16983# global $as_val. Take advantage of shells that can avoid forks. The arguments
16984# must be portable across $(()) and expr.
16985if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16986 eval 'as_fn_arith ()
16987 {
16988 as_val=$(( $* ))
16989 }'
16990else
16991 as_fn_arith ()
16992 {
16993 as_val=`expr "$@" || test $? -eq 1`
16994 }
16995fi # as_fn_arith
16996
16997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998if expr a : '\(a\)' >/dev/null 2>&1 &&
16999 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17000 as_expr=expr
17001else
17002 as_expr=false
17003fi
17004
17005if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17006 as_basename=basename
17007else
17008 as_basename=false
17009fi
17010
Matthias Kloseb9621712010-04-24 17:59:49 +000017011if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17012 as_dirname=dirname
17013else
17014 as_dirname=false
17015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017as_me=`$as_basename -- "$0" ||
17018$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17019 X"$0" : 'X\(//\)$' \| \
17020 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017021$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022 sed '/^.*\/\([^/][^/]*\)\/*$/{
17023 s//\1/
17024 q
17025 }
17026 /^X\/\(\/\/\)$/{
17027 s//\1/
17028 q
17029 }
17030 /^X\/\(\/\).*/{
17031 s//\1/
17032 q
17033 }
17034 s/.*/./; q'`
17035
Matthias Kloseb9621712010-04-24 17:59:49 +000017036# Avoid depending upon Character Ranges.
17037as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17038as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17039as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17040as_cr_digits='0123456789'
17041as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042
17043ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017044case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017046 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017048 xy) ECHO_C='\c';;
17049 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17050 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017051 esac;;
17052*)
17053 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017054esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017055
Martin v. Löwis11437992002-04-12 09:54:03 +000017056rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057if test -d conf$$.dir; then
17058 rm -f conf$$.dir/conf$$.file
17059else
17060 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017063if (echo >conf$$.file) 2>/dev/null; then
17064 if ln -s conf$$.file conf$$ 2>/dev/null; then
17065 as_ln_s='ln -s'
17066 # ... but there are two gotchas:
17067 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17068 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017069 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017070 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017071 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017072 elif ln conf$$.file conf$$ 2>/dev/null; then
17073 as_ln_s=ln
17074 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017075 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017076 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017077else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017078 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17081rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017082
Matthias Kloseb9621712010-04-24 17:59:49 +000017083
17084# as_fn_mkdir_p
17085# -------------
17086# Create "$as_dir" as a directory, including parents if necessary.
17087as_fn_mkdir_p ()
17088{
17089
17090 case $as_dir in #(
17091 -*) as_dir=./$as_dir;;
17092 esac
17093 test -d "$as_dir" || eval $as_mkdir_p || {
17094 as_dirs=
17095 while :; do
17096 case $as_dir in #(
17097 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17098 *) as_qdir=$as_dir;;
17099 esac
17100 as_dirs="'$as_qdir' $as_dirs"
17101 as_dir=`$as_dirname -- "$as_dir" ||
17102$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17103 X"$as_dir" : 'X\(//\)[^/]' \| \
17104 X"$as_dir" : 'X\(//\)$' \| \
17105 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17106$as_echo X"$as_dir" |
17107 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17108 s//\1/
17109 q
17110 }
17111 /^X\(\/\/\)[^/].*/{
17112 s//\1/
17113 q
17114 }
17115 /^X\(\/\/\)$/{
17116 s//\1/
17117 q
17118 }
17119 /^X\(\/\).*/{
17120 s//\1/
17121 q
17122 }
17123 s/.*/./; q'`
17124 test -d "$as_dir" && break
17125 done
17126 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017127 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017128
17129
17130} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017131if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017132 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017133else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017135 as_mkdir_p=false
17136fi
17137
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017138
17139# as_fn_executable_p FILE
17140# -----------------------
17141# Test if FILE is an executable regular file.
17142as_fn_executable_p ()
17143{
17144 test -f "$1" && test -x "$1"
17145} # as_fn_executable_p
17146as_test_x='test -x'
17147as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017148
17149# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017150as_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 +000017151
17152# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017153as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
17155
Martin v. Löwis11437992002-04-12 09:54:03 +000017156exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017157## ----------------------------------- ##
17158## Main body of $CONFIG_STATUS script. ##
17159## ----------------------------------- ##
17160_ASEOF
17161test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017162
Matthias Kloseb9621712010-04-24 17:59:49 +000017163cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17164# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017165# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166# values after options handling.
17167ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017168This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017169generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017170
17171 CONFIG_FILES = $CONFIG_FILES
17172 CONFIG_HEADERS = $CONFIG_HEADERS
17173 CONFIG_LINKS = $CONFIG_LINKS
17174 CONFIG_COMMANDS = $CONFIG_COMMANDS
17175 $ $0 $@
17176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177on `(hostname || uname -n) 2>/dev/null | sed 1q`
17178"
17179
Martin v. Löwis11437992002-04-12 09:54:03 +000017180_ACEOF
17181
Matthias Kloseb9621712010-04-24 17:59:49 +000017182case $ac_config_files in *"
17183"*) set x $ac_config_files; shift; ac_config_files=$*;;
17184esac
17185
17186case $ac_config_headers in *"
17187"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17188esac
17189
17190
17191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017192# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017193config_files="$ac_config_files"
17194config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017197
Matthias Kloseb9621712010-04-24 17:59:49 +000017198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017199ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017200\`$as_me' instantiates files and other configuration actions
17201from templates according to the current configuration. Unless the files
17202and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017203
Matthias Kloseb9621712010-04-24 17:59:49 +000017204Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017205
17206 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017208 --config print configuration, then exit
17209 -q, --quiet, --silent
17210 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 -d, --debug don't remove temporary files
17212 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017213 --file=FILE[:TEMPLATE]
17214 instantiate the configuration file FILE
17215 --header=FILE[:TEMPLATE]
17216 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017217
17218Configuration files:
17219$config_files
17220
17221Configuration headers:
17222$config_headers
17223
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017224Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017227cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17228ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017229ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017230python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017231configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017232 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017233
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017234Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017235This config.status script is free software; the Free Software Foundation
17236gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237
17238ac_pwd='$ac_pwd'
17239srcdir='$srcdir'
17240INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017241MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017242test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017243_ACEOF
17244
Matthias Kloseb9621712010-04-24 17:59:49 +000017245cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17246# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017247ac_need_defaults=:
17248while test $# != 0
17249do
17250 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017251 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17253 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017254 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017255 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017256 --*=)
17257 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17258 ac_optarg=
17259 ac_shift=:
17260 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017261 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017262 ac_option=$1
17263 ac_optarg=$2
17264 ac_shift=shift
17265 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017266 esac
17267
Skip Montanaro6dead952003-09-25 14:50:04 +000017268 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017269 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017270 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17271 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017272 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 $as_echo "$ac_cs_version"; exit ;;
17274 --config | --confi | --conf | --con | --co | --c )
17275 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017277 debug=: ;;
17278 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017279 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017280 case $ac_optarg in
17281 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017282 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017283 esac
17284 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017285 ac_need_defaults=false;;
17286 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017287 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017288 case $ac_optarg in
17289 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17290 esac
17291 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017292 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 --he | --h)
17294 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017295 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017296Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017298 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017299 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17300 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17301 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017302
17303 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017304 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017305Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017306
Matthias Kloseb9621712010-04-24 17:59:49 +000017307 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017308 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017309
17310 esac
17311 shift
17312done
17313
Skip Montanaro6dead952003-09-25 14:50:04 +000017314ac_configure_extra_args=
17315
17316if $ac_cs_silent; then
17317 exec 6>/dev/null
17318 ac_configure_extra_args="$ac_configure_extra_args --silent"
17319fi
17320
17321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017322cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017323if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017324 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017325 shift
17326 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17327 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017329 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017330fi
17331
Martin v. Löwis11437992002-04-12 09:54:03 +000017332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017333cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334exec 5>>config.log
17335{
17336 echo
17337 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17338## Running $as_me. ##
17339_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017340 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017344cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017346
Matthias Kloseb9621712010-04-24 17:59:49 +000017347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348
17349# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017350for ac_config_target in $ac_config_targets
17351do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352 case $ac_config_target in
17353 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17354 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17355 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017356 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17357 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017358 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17359 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017360 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017361 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017362 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363
Victor Stinnere0be4232011-10-25 13:06:09 +020017364 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017365 esac
17366done
17367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368
Martin v. Löwis11437992002-04-12 09:54:03 +000017369# If the user did not use the arguments to specify the items to instantiate,
17370# then the envvar interface is used. Set only those that are not.
17371# We use the long form for the default assignment because of an extremely
17372# bizarre bug on SunOS 4.1.3.
17373if $ac_need_defaults; then
17374 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17375 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17376fi
17377
Skip Montanaro6dead952003-09-25 14:50:04 +000017378# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017380# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381# Hook for its removal unless debugging.
17382# Note that there is a small window in which the directory will not be cleaned:
17383# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017384$debug ||
17385{
Victor Stinnere0be4232011-10-25 13:06:09 +020017386 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017388 : "${ac_tmp:=$tmp}"
17389 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017391 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017392}
Martin v. Löwis11437992002-04-12 09:54:03 +000017393# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017394
Martin v. Löwis11437992002-04-12 09:54:03 +000017395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017397 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017398} ||
17399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400 tmp=./conf$$-$RANDOM
17401 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017402} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017403ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017404
Matthias Kloseb9621712010-04-24 17:59:49 +000017405# Set up the scripts for CONFIG_FILES section.
17406# No need to generate them if there are no CONFIG_FILES.
17407# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017409
Matthias Kloseb9621712010-04-24 17:59:49 +000017410
17411ac_cr=`echo X | tr X '\015'`
17412# On cygwin, bash can eat \r inside `` if the user requested igncr.
17413# But we know of no other shell where ac_cr would be empty at this
17414# point, so we can use a bashism as a fallback.
17415if test "x$ac_cr" = x; then
17416 eval ac_cr=\$\'\\r\'
17417fi
17418ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17419if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017420 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017421else
17422 ac_cs_awk_cr=$ac_cr
17423fi
17424
Victor Stinnere0be4232011-10-25 13:06:09 +020017425echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017426_ACEOF
17427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428
Matthias Kloseb9621712010-04-24 17:59:49 +000017429{
17430 echo "cat >conf$$subs.awk <<_ACEOF" &&
17431 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17432 echo "_ACEOF"
17433} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017434 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17435ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017436ac_delim='%!_!# '
17437for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017438 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017439 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440
Matthias Kloseb9621712010-04-24 17:59:49 +000017441 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17442 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443 break
17444 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017445 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446 else
17447 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449done
Matthias Kloseb9621712010-04-24 17:59:49 +000017450rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451
Matthias Kloseb9621712010-04-24 17:59:49 +000017452cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017453cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017455sed -n '
17456h
17457s/^/S["/; s/!.*/"]=/
17458p
17459g
17460s/^[^!]*!//
17461:repl
17462t repl
17463s/'"$ac_delim"'$//
17464t delim
17465:nl
17466h
17467s/\(.\{148\}\)..*/\1/
17468t more1
17469s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17470p
17471n
17472b repl
17473:more1
17474s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17475p
17476g
17477s/.\{148\}//
17478t nl
17479:delim
17480h
17481s/\(.\{148\}\)..*/\1/
17482t more2
17483s/["\\]/\\&/g; s/^/"/; s/$/"/
17484p
17485b
17486:more2
17487s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17488p
17489g
17490s/.\{148\}//
17491t delim
17492' <conf$$subs.awk | sed '
17493/^[^""]/{
17494 N
17495 s/\n//
17496}
17497' >>$CONFIG_STATUS || ac_write_fail=1
17498rm -f conf$$subs.awk
17499cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17500_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017501cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017502 for (key in S) S_is_set[key] = 1
17503 FS = ""
17504
17505}
17506{
17507 line = $ 0
17508 nfields = split(line, field, "@")
17509 substed = 0
17510 len = length(field[1])
17511 for (i = 2; i < nfields; i++) {
17512 key = field[i]
17513 keylen = length(key)
17514 if (S_is_set[key]) {
17515 value = S[key]
17516 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17517 len += length(value) + length(field[++i])
17518 substed = 1
17519 } else
17520 len += 1 + keylen
17521 }
17522
17523 print line
17524}
17525
17526_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17529if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17530 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17531else
17532 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017533fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017534 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017535_ACEOF
17536
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017537# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17538# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539# trailing colons and then remove the whole line if VPATH becomes empty
17540# (actually we leave an empty line to preserve line numbers).
17541if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017542 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17543h
17544s///
17545s/^/:/
17546s/[ ]*$/:/
17547s/:\$(srcdir):/:/g
17548s/:\${srcdir}:/:/g
17549s/:@srcdir@:/:/g
17550s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017552x
17553s/\(=[ ]*\).*/\1/
17554G
17555s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556s/^[^=]*=[ ]*$//
17557}'
17558fi
17559
Matthias Kloseb9621712010-04-24 17:59:49 +000017560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017561fi # test -n "$CONFIG_FILES"
17562
Matthias Kloseb9621712010-04-24 17:59:49 +000017563# Set up the scripts for CONFIG_HEADERS section.
17564# No need to generate them if there are no CONFIG_HEADERS.
17565# This happens for instance with `./config.status Makefile'.
17566if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017567cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017568BEGIN {
17569_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570
Matthias Kloseb9621712010-04-24 17:59:49 +000017571# Transform confdefs.h into an awk script `defines.awk', embedded as
17572# here-document in config.status, that substitutes the proper values into
17573# config.h.in to produce config.h.
17574
17575# Create a delimiter string that does not exist in confdefs.h, to ease
17576# handling of long lines.
17577ac_delim='%!_!# '
17578for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017579 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17580 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017581 break
17582 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017583 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017584 else
17585 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17586 fi
17587done
17588
17589# For the awk script, D is an array of macro values keyed by name,
17590# likewise P contains macro parameters if any. Preserve backslash
17591# newline sequences.
17592
17593ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17594sed -n '
17595s/.\{148\}/&'"$ac_delim"'/g
17596t rset
17597:rset
17598s/^[ ]*#[ ]*define[ ][ ]*/ /
17599t def
17600d
17601:def
17602s/\\$//
17603t bsnl
17604s/["\\]/\\&/g
17605s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17606D["\1"]=" \3"/p
17607s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17608d
17609:bsnl
17610s/["\\]/\\&/g
17611s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17612D["\1"]=" \3\\\\\\n"\\/p
17613t cont
17614s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17615t cont
17616d
17617:cont
17618n
17619s/.\{148\}/&'"$ac_delim"'/g
17620t clear
17621:clear
17622s/\\$//
17623t bsnlc
17624s/["\\]/\\&/g; s/^/"/; s/$/"/p
17625d
17626:bsnlc
17627s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17628b cont
17629' <confdefs.h | sed '
17630s/'"$ac_delim"'/"\\\
17631"/g' >>$CONFIG_STATUS || ac_write_fail=1
17632
17633cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17634 for (key in D) D_is_set[key] = 1
17635 FS = ""
17636}
17637/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17638 line = \$ 0
17639 split(line, arg, " ")
17640 if (arg[1] == "#") {
17641 defundef = arg[2]
17642 mac1 = arg[3]
17643 } else {
17644 defundef = substr(arg[1], 2)
17645 mac1 = arg[2]
17646 }
17647 split(mac1, mac2, "(") #)
17648 macro = mac2[1]
17649 prefix = substr(line, 1, index(line, defundef) - 1)
17650 if (D_is_set[macro]) {
17651 # Preserve the white space surrounding the "#".
17652 print prefix "define", macro P[macro] D[macro]
17653 next
17654 } else {
17655 # Replace #undef with comments. This is necessary, for example,
17656 # in the case of _POSIX_SOURCE, which is predefined and required
17657 # on some systems where configure will not decide to define it.
17658 if (defundef == "undef") {
17659 print "/*", prefix defundef, macro, "*/"
17660 next
17661 }
17662 }
17663}
17664{ print }
17665_ACAWK
17666_ACEOF
17667cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017668 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017669fi # test -n "$CONFIG_HEADERS"
17670
17671
17672eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17673shift
17674for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675do
17676 case $ac_tag in
17677 :[FHLC]) ac_mode=$ac_tag; continue;;
17678 esac
17679 case $ac_mode$ac_tag in
17680 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017681 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682 :[FH]-) ac_tag=-:-;;
17683 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17684 esac
17685 ac_save_IFS=$IFS
17686 IFS=:
17687 set x $ac_tag
17688 IFS=$ac_save_IFS
17689 shift
17690 ac_file=$1
17691 shift
17692
17693 case $ac_mode in
17694 :L) ac_source=$1;;
17695 :[FH])
17696 ac_file_inputs=
17697 for ac_f
17698 do
17699 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017700 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701 *) # Look for the file first in the build tree, then in the source tree
17702 # (if the path is not absolute). The absolute path cannot be DOS-style,
17703 # because $ac_f cannot contain `:'.
17704 test -f "$ac_f" ||
17705 case $ac_f in
17706 [\\/$]*) false;;
17707 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17708 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017709 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17712 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713 done
17714
17715 # Let's still pretend it is `configure' which instantiates (i.e., don't
17716 # use $as_me), people would be surprised to read:
17717 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017718 configure_input='Generated from '`
17719 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17720 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 if test x"$ac_file" != x-; then
17722 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017723 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17724$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017726 # Neutralize special characters interpreted by sed in replacement strings.
17727 case $configure_input in #(
17728 *\&* | *\|* | *\\* )
17729 ac_sed_conf_input=`$as_echo "$configure_input" |
17730 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17731 *) ac_sed_conf_input=$configure_input;;
17732 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733
17734 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017735 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17736 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737 esac
17738 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017739 esac
17740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017742$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017743 X"$ac_file" : 'X\(//\)[^/]' \| \
17744 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017746$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17748 s//\1/
17749 q
17750 }
17751 /^X\(\/\/\)[^/].*/{
17752 s//\1/
17753 q
17754 }
17755 /^X\(\/\/\)$/{
17756 s//\1/
17757 q
17758 }
17759 /^X\(\/\).*/{
17760 s//\1/
17761 q
17762 }
17763 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017764 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 ac_builddir=.
17766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767case "$ac_dir" in
17768.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17769*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017770 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017772 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773 case $ac_top_builddir_sub in
17774 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17775 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17776 esac ;;
17777esac
17778ac_abs_top_builddir=$ac_pwd
17779ac_abs_builddir=$ac_pwd$ac_dir_suffix
17780# for backward compatibility:
17781ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017782
17783case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017785 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017786 ac_top_srcdir=$ac_top_builddir_sub
17787 ac_abs_top_srcdir=$ac_pwd ;;
17788 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017789 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790 ac_top_srcdir=$srcdir
17791 ac_abs_top_srcdir=$srcdir ;;
17792 *) # Relative name.
17793 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17794 ac_top_srcdir=$ac_top_build_prefix$srcdir
17795 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017796esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017798
Martin v. Löwis11437992002-04-12 09:54:03 +000017799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800 case $ac_mode in
17801 :F)
17802 #
17803 # CONFIG_FILE
17804 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017805
17806 case $INSTALL in
17807 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017810 ac_MKDIR_P=$MKDIR_P
17811 case $MKDIR_P in
17812 [\\/$]* | ?:[\\/]* ) ;;
17813 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17814 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017815_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816
Matthias Kloseb9621712010-04-24 17:59:49 +000017817cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818# If the template does not know about datarootdir, expand it.
17819# FIXME: This hack should be removed a few years after 2.60.
17820ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017821ac_sed_dataroot='
17822/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823 p
17824 q
17825}
17826/@datadir@/p
17827/@docdir@/p
17828/@infodir@/p
17829/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017830/@mandir@/p'
17831case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832*datarootdir*) ac_datarootdir_seen=yes;;
17833*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17835$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017837cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838 ac_datarootdir_hack='
17839 s&@datadir@&$datadir&g
17840 s&@docdir@&$docdir&g
17841 s&@infodir@&$infodir&g
17842 s&@localedir@&$localedir&g
17843 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017844 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845esac
17846_ACEOF
17847
17848# Neutralize VPATH when `$srcdir' = `.'.
17849# Shell code in configure.ac might set extrasub.
17850# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017851cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17852ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017853$extrasub
17854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017856:t
17857/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017858s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017860s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861s&@srcdir@&$ac_srcdir&;t t
17862s&@abs_srcdir@&$ac_abs_srcdir&;t t
17863s&@top_srcdir@&$ac_top_srcdir&;t t
17864s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17865s&@builddir@&$ac_builddir&;t t
17866s&@abs_builddir@&$ac_abs_builddir&;t t
17867s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17868s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017869s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017871"
Victor Stinnere0be4232011-10-25 13:06:09 +020017872eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17873 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017875test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017876 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17877 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17878 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017880which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017881$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017882which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017883
Victor Stinnere0be4232011-10-25 13:06:09 +020017884 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017885 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017886 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17887 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017888 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017889 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890 ;;
17891 :H)
17892 #
17893 # CONFIG_HEADER
17894 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017895 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017896 {
17897 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017898 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17899 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017900 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017901 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017902 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17903$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017905 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017906 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017907 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017908 fi
17909 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017910 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017911 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017912 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017913 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017916
17917 esac
17918
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017919
17920 case $ac_file$ac_mode in
17921 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17922
17923 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924done # for ac_tag
17925
Guido van Rossum627b2d71993-12-24 10:39:16 +000017926
Matthias Kloseb9621712010-04-24 17:59:49 +000017927as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017928_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017929ac_clean_files=$ac_clean_files_save
17930
Matthias Kloseb9621712010-04-24 17:59:49 +000017931test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017932 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017933
Martin v. Löwis11437992002-04-12 09:54:03 +000017934
17935# configure is writing to config.log, and then calls config.status.
17936# config.status does its own redirection, appending to config.log.
17937# Unfortunately, on DOS this fails, as config.log is still kept open
17938# by configure, so config.status won't be able to write to it; its
17939# output is simply discarded. So we exec the FD to /dev/null,
17940# effectively closing config.log, so it can be properly (re)opened and
17941# appended to by config.status. When coming back to configure, we
17942# need to make the FD available again.
17943if test "$no_create" != yes; then
17944 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017945 ac_config_status_args=
17946 test "$silent" = yes &&
17947 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017948 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017949 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 exec 5>>config.log
17951 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17952 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017953 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017954fi
17955if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17956 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17957$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017958fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017959
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017960
Christian Heimes75ed8902013-11-20 01:11:18 +010017961echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017962if test ! -f Modules/Setup
17963then
17964 cp $srcdir/Modules/Setup.dist Modules/Setup
17965fi
17966
Christian Heimes75ed8902013-11-20 01:11:18 +010017967echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017968if test ! -f Modules/Setup.local
17969then
17970 echo "# Edit this file for local setup changes" >Modules/Setup.local
17971fi
17972
Christian Heimes75ed8902013-11-20 01:11:18 +010017973echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017974$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17975 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017976 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017977mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017978
17979if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17980 echo "" >&6
17981 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017982 echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017983 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017984 echo "" >&6
17985 echo "" >&6
17986fi
17987